Repository navigation
build(selenium-devtools-py): make the adapter fit to publish, and keep it that way #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2ff793d
test(selenium-devtools-py): stop the config tests spawning a dashboard
vishnuv688 b76ddd8
build(selenium-devtools-py): state the distribution's metadata
vishnuv688 aa78857
build(selenium-devtools-py): decide the version from change fragments
vishnuv688 611fe4a
ci: refuse a Python release the pinned backend cannot serve
vishnuv688 79057ad
ci(selenium-devtools-py): run the release checks CI already runs
vishnuv688 f55642e
fix(ci): close the gaps review found in the Python release flow
vishnuv688 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Python package checks | ||
| description: Install, test and build the Python adapter — the checks CI and the release share. | ||
|
|
||
| # One definition because both callers must agree. Running the release guard | ||
| # weaker than CI is the failure this replaces: it used to test without | ||
| # installing, and the tests that pin selenium's BiDi surface skip when selenium | ||
| # is absent, so a bump that moved those internals passed the guard and degraded | ||
| # at runtime. | ||
|
|
||
| inputs: | ||
| working-directory: | ||
| description: The package root. | ||
| required: false | ||
| default: packages/selenium-devtools-py | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| # Every step names the directory: a composite action does not inherit the | ||
| # caller's `defaults.run.working-directory`. | ||
| - name: Install the adapter and its runtime dependency | ||
| shell: bash | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: pip install -e '.[test]' | ||
|
|
||
| - name: Contract is in sync with shared | ||
| shell: bash | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: | | ||
| python scripts/gen_contract.py | ||
| git diff --exit-code src/selenium_devtools/_contract.py | ||
|
|
||
| - name: 🧪 Unit tests | ||
| shell: bash | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: PYTHONPATH=src python -m unittest discover -s tests | ||
|
|
||
| # Packaging used to be exercised for the first time at release, where a | ||
| # broken `pyproject.toml` surfaces with the publish button already pressed. | ||
| - name: 📦 Build sdist + wheel | ||
| shell: bash | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: | | ||
| python -m pip install --upgrade build twine | ||
| python -m build | ||
| twine check --strict dist/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # selenium-devtools-py | ||
|
|
||
| Assembled at release from the fragments in `changes/` — see that directory's | ||
| README. Changesets generates the npm packages' changelogs from the pnpm | ||
| workspace, which this package is not a member of, so it has its own mechanism | ||
| of the same shape. | ||
|
|
||
| ## 0.1.0 | ||
|
|
||
| First release. | ||
|
|
||
| Python Selenium adapter for the WebdriverIO DevTools dashboard, feeding the same | ||
| backend and UI as the JavaScript adapters over the language-neutral | ||
| `{scope, data}` WebSocket contract. | ||
|
|
||
| - **Live mode** — command capture and the test tree, browser console and network | ||
| over BiDi, assertion rows, per-command screenshots and selectors, DOM replay, | ||
| and a pushed CDP screencast. | ||
| - **Trace mode** — the same portable `trace.zip` the JavaScript adapters write, | ||
| with action snapshots, sources and a transcript. Built by the backend on the | ||
| adapter's behalf, since this package ships no Node. | ||
| - **Run controls** — Run, Rerun, Run-all and Preserve & Rerun, with reruns | ||
| selected by pytest nodeid and spawned in pytest's own rootdir. | ||
| - **pytest plugin** — auto-discovered, opt-in per run (`--devtools`, | ||
| `--devtools-trace`), per project (`[tool.pytest.ini_options]`) or per shell | ||
| (`DEVTOOLS_ENABLE`). Installing it never changes how an existing suite behaves. | ||
| - Ships `py.typed`, so the annotations already on the public API reach a | ||
| consumer's type checker instead of resolving to `Any`. | ||
| - Requires Python 3.10+, `selenium>=4.44`, and Node.js 18+ on PATH for the | ||
| backend. | ||
|
|
||
| Known gaps against the JavaScript adapters are listed under Roadmap in the | ||
| README. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2023 WebdriverIO | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.