diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml new file mode 100644 index 0000000..2a77af0 --- /dev/null +++ b/.github/workflows/pr-validation.yml @@ -0,0 +1,24 @@ +name: PR Validation Workflow +permissions: + contents: read + +on: + pull_request: + branches: + - main + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install build and wheel + run: python3 -m pip install build wheel + + - name: Build package + run: make build diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..9049df7 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +graft graphex_webautomation_plugin/docs +global-exclude __pycache__ *.py[cod] \ No newline at end of file diff --git a/graphex_webautomation_plugin/docs/html/changelog.html b/graphex_webautomation_plugin/docs/html/changelog.html new file mode 100644 index 0000000..8c40ea7 --- /dev/null +++ b/graphex_webautomation_plugin/docs/html/changelog.html @@ -0,0 +1,16 @@ + + + + + + + +

Changelog

+

This page was created to track changes to versions of GraphEx-Web-Automation-Plugin. The changelog was created in v1.1.3 and only changes starting from that version are tracked here.

1.1.3

+ + + + \ No newline at end of file diff --git a/graphex_webautomation_plugin/docs/html/index.html b/graphex_webautomation_plugin/docs/html/index.html index a9d5720..327a832 100644 --- a/graphex_webautomation_plugin/docs/html/index.html +++ b/graphex_webautomation_plugin/docs/html/index.html @@ -83,6 +83,7 @@

Filters

  • Fill: Enter text into input fields.

    Example: Suppose we want to fill in the 'Text Input label' input:

    image

    We can do so with the following graph:

    image

    This graph will locate the input element by label and fill it with the appropriate text.

    image

  • Screenshot: Capture visual state of an element or entire page.

    Screenshots of the browser can be logged for easy debugging. Using the fill example above, we can capture the browser screen before and after inputing the text with the following graph.

    image

  • -

    By chaining locators, filters, and actions, you can construct powerful automation sequences that navigate, interact with, and even adapt to the dynamic content of modern webpages. This trifecta forms the bedrock of advanced web automation with Playwright in the graphex-webautomation-plugin.

    +

    By chaining locators, filters, and actions, you can construct powerful automation sequences that navigate, interact with, and even adapt to the dynamic content of modern webpages. This trifecta forms the bedrock of advanced web automation with Playwright in the graphex-webautomation-plugin.

    Changelog

    +

    The changelog for this plugin can be found on this page.

    \ No newline at end of file diff --git a/graphex_webautomation_plugin/docs/markdown/changelog.md b/graphex_webautomation_plugin/docs/markdown/changelog.md new file mode 100644 index 0000000..023ffe3 --- /dev/null +++ b/graphex_webautomation_plugin/docs/markdown/changelog.md @@ -0,0 +1,8 @@ +# Changelog + +This page was created to track changes to versions of GraphEx-Web-Automation-Plugin. The changelog was created in v1.1.3 and only changes starting from that version are tracked here. + +## 1.1.3 + +- Update package metadata for PyPI +- Pin setuptools verison diff --git a/graphex_webautomation_plugin/docs/markdown/index.md b/graphex_webautomation_plugin/docs/markdown/index.md index 504dd0d..6ed9c4c 100644 --- a/graphex_webautomation_plugin/docs/markdown/index.md +++ b/graphex_webautomation_plugin/docs/markdown/index.md @@ -241,6 +241,6 @@ Once you've honed in on the target element(s) using locators and filters, action By chaining locators, filters, and actions, you can construct powerful automation sequences that navigate, interact with, and even adapt to the dynamic content of modern webpages. This trifecta forms the bedrock of advanced web automation with Playwright in the `graphex-webautomation-plugin`. +## Changelog - - +The changelog for this plugin [can be found on this page.](changelog.md) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ca56278 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools==80.9.0", + "wheel" +] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/setup.py b/setup.py index 9e864ab..c3d3dcb 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,56 @@ -from setuptools import setup, find_packages +import os +import io +from pathlib import Path + +from setuptools import find_namespace_packages, setup + +def get_package_data(): + ROOT_PATH = os.path.abspath("./graphex_webautomation_plugin") + DOCS_PATH = os.path.join(ROOT_PATH, "docs") + files = [] + for directory, _, filenames in os.walk(DOCS_PATH): + for filename in filenames: + path = os.path.join(directory, filename) + path = path[len(ROOT_PATH) :].strip("/") + files.append(path) + return {"graphex_webautomation_plugin": files} + +def read_readme(): + readme_path = Path(__file__).parent / "README.md" + with io.open(readme_path, "r", encoding="utf-8") as f: + return f.read() setup( name="graphex-webautomation-plugin", - version="1.1.2", + version="1.1.3", author="The MITRE Corporation", description="A plugin for adding playwright nodes to graphex.", - packages=find_packages(include=["graphex_webautomation_plugin*"]), + long_description=read_readme(), + long_description_content_type="text/markdown", + url="https://github.com/mitre/GraphEx-Web-Automation-Plugin", + project_urls={ + "Documentation": "https://github.com/mitre/GraphEx-Web-Automation-Plugin/blob/main/graphex_webautomation_plugin/docs/markdown/index.md", + "Source": "https://github.com/mitre/GraphEx-Web-Automation-Plugin", + "Issues": "https://github.com/mitre/GraphEx-Web-Automation-Plugin/issues", + "Changelog": "https://github.com/mitre/GraphEx-Web-Automation-Plugin/blob/main/graphex_webautomation_plugin/docs/markdown/changelog.md", + }, + license="Apache-2.0", + license_files=["LICENSE"], + keywords = ["playwright","playwright-plugin","web-automation","browser-automation","automation","visual-programming","python3","python","pip","pypi","headless","ui-testing","functional-testing","test-automation","page-object","selectors","dom","chromium","firefox","webkit","plugin","extension","middleware","hooks","orchestration","workflow","cli","sdk","http","web","tracing","recorder","fixtures"], + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Operating System :: OS Independent", + ], + packages=find_namespace_packages(include=["graphex_webautomation_plugin*"]), + package_data=get_package_data(), python_requires=">=3.8", install_requires=["mitre-graphex>=1.16.0", "playwright==1.46.0"], + include_package_data=True )