rewired downstream test drivers#672
Merged
RonnyPfannschmidt merged 17 commits intoMay 17, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the bitrotted downstream shell scripts with a structured TOML-based downstream test runner (downstream/run_downstream.py) and adds a manual GitHub Actions workflow to execute the recipes in CI. It also updates release/docs guidance to point maintainers at the new driver.
Changes:
- Removed the legacy
downstream/*.shscripts and replaced them with a PEP 723 Python driver plus per-project TOML recipes. - Added a manual-only
downstreamGitHub Actions workflow that runs a matrix of downstream recipes. - Updated
RELEASING.rstanddownstream/README.mdto document the new invocation and recipe format.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| RELEASING.rst | Updates release instructions to use the new downstream driver. |
| downstream/tox.sh | Removes the legacy tox downstream shell script. |
| downstream/run_downstream.py | Adds the new PEP 723 downstream driver (clone/update, env setup, install, test steps). |
| downstream/recipes/tox.toml | Adds tox downstream recipe definition. |
| downstream/recipes/python-lsp-server.toml | Adds python-lsp-server downstream recipe definition. |
| downstream/recipes/pytest.toml | Adds pytest downstream recipe definition. |
| downstream/recipes/hatch.toml | Adds hatch downstream recipe definition. |
| downstream/recipes/devpi.toml | Adds devpi downstream recipe definition. |
| downstream/recipes/datasette.toml | Adds datasette downstream recipe definition. |
| downstream/recipes/conda.toml | Adds conda downstream recipe definition (bootstrap via sourced script). |
| downstream/README.md | Documents recipe schema and how to run the driver. |
| downstream/python-lsp-server.sh | Removes the legacy python-lsp-server downstream shell script. |
| downstream/pytest.sh | Removes the legacy pytest downstream shell script. |
| downstream/hatch.sh | Removes the legacy hatch downstream shell script. |
| downstream/devpi.sh | Removes the legacy devpi downstream shell script. |
| downstream/datasette.sh | Removes the legacy datasette downstream shell script. |
| downstream/conda.sh | Removes the legacy conda downstream shell script. |
| downstream/.gitignore | Ignores the new python-lsp-server/ clone directory. |
| .github/workflows/downstream.yml | Adds manual workflow to run downstream recipe matrix on GitHub Actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Replace per-project shell scripts with a PEP 723 uv-runnable driver and validated recipe files under downstream/recipes/. Environment kinds (uv-venv, stdlib-venv, none) pair with nested [environment.install] in each TOML. Document the flow in downstream/README.md and RELEASING.rst. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Composer <composer@cursor.com>
Introduce a workflow_dispatch-only workflow that runs each downstream TOML recipe (conda, datasette, devpi, hatch, pytest, python-lsp-server, tox) on ubuntu-latest with Python 3.12 and uv. Matrix jobs are independent (fail-fast: false) and time out after 120 minutes. Trigger from Actions and, when validating a change that needs it, select the relevant branch under "Use workflow from" (for example a pull request head branch). Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Composer <composer@cursor.com>
workflow_dispatch alone does not show checks on a pull request; add a label-gated pull_request trigger (labeled, synchronize) so maintainers can apply run-downstream to opt in. Document that the workflow file must exist on the default branch to appear under upstream Actions. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Composer <composer@cursor.com>
Replace the run-downstream label with a head branch filter so forks without shared labels still opt in (e.g. downstream-driver). Pull requests still target main only. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Composer <composer@cursor.com>
actions/checkout defaults to a shallow clone; pluggy installs as -e ../.. need a real tree (e.g. setuptools-scm). Set fetch-depth: 0. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Composer <composer@cursor.com>
Hatch's backend tests use the pytest-mock "mocker" fixture; include it in the extra uv packages so downstream CI matches a full dev install. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Composer <composer@cursor.com>
- Add env field to TestStep for per-step environment overrides - tox: full clone (fixes 0.1.dev1 version) + CI=false (suppresses list_dependencies/freeze steps that break test expectations) - conda: full clone (fixes vcs_versioning shallow warnings) + CONDA_CHANNELS=defaults,conda-forge for channel-dependent tests - devpi: deselect test_upload.py (upstream conftest bug comparing list code=[200,200,200] against integers) - python-lsp-server: deselect 2 jedi tests needing /tmp/pyenv/ Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
… hack - tox: also override GITHUB_ACTIONS=false (is_ci() checks both CI and GITHUB_ACTIONS env vars) - devpi: switch --deselect to --ignore for test_upload.py (deselect path didn't match pytest node IDs) - conda: remove CONDA_CHANNELS override — it fixes NoChannels tests but breaks channel-configuration tests; remaining failures are upstream conda CI infrastructure issues Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
tox's is_ci() checks presence of CI (any value) and GITHUB_ACTIONS==true. Setting CI=false still leaves it present, so is_ci() returns True. Now empty-string env values mean "remove from environment" in the driver, and tox recipe uses CI="" and GITHUB_ACTIONS="" to fully unset them. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
conda's own CI uses condarc-file to set channels; dev/start alone doesn't write one, so tests creating temporary envs fail with NoChannelsConfiguredError. Add `conda config --add channels defaults` after bootstrap, matching their CI's condarc-defaults configuration. Unlike the CONDA_CHANNELS env var (which conflicted with channel-config tests), writing to .condarc is the proper mechanism that conda's test fixtures handle correctly. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
test_export_from_history_format fails because our pluggy is pip-installed (editable) into the conda env rather than conda-installed, so it's missing from conda's explicit_packages. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
3c0fa96 to
f418924
Compare
Drop stdlib-venv and EnvironmentNone/bootstrap in favour of two environment kinds: uv-venv (venv + uv pip install) and script (self-contained bash script handling the full workflow). - Move conda's inline bash into recipes/conda.bash - Switch pytest recipe from stdlib-venv to uv-venv - Remove PipInstallOptions, StdlibInstall, NoneInstall, BootstrapConfig and related helpers (-104 lines of Python) Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
…cture Drop the `kind` discriminator field from environment configs. The two environment types are now distinguished by their keys: - `editables` present → uv-venv (creates venv, installs via uv pip) - `run` present → script (delegates to bash) Fold `[environment.install]` and `[environment.install.uv]` sub-tables directly into `[environment]`, removing UvInstall/UvInstallOptions models. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
Drop unnecessary dict(), list(), and type annotations where the types are already correct or inferred from context. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
The previous cleanup accidentally dropped the list() wrapper around env.items(), causing a RuntimeError when empty-string values were deleted during iteration. Replace with a dict comprehension instead. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
Revert the review suggestion to use a temporary CONDARC file. Exporting CONDARC overrides the devenv's own .condarc, breaking the bootstrap. Go back to the simple conda config --add that worked. Co-authored-by: Cursor AI <ai@cursor.sh> Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
Member
Author
|
ignoring the hatch errors due to the content |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
there was bitrot in the shell scripts
i added a python driver and a workflow to run them on github
testing them now - in particular conda and hatch may need some more details
psa - im also working on actively removing pluggy from hatch as its used in a non-idiomatic way there that doesn’t bring value