This repository was archived by the owner on Oct 31, 2026. It is now read-only.
Repository navigation
Conversation
A push to main now runs the tests its own change can move, from the commit main moved from (github.event.before), the same way a pull request does against its base. A shared change still runs everything, every class and every node; so do a manual run and a new weekly run on Monday. tools/scoped_tests.py --ci also maps an instrument module to the tests that name it and the ones that go through every instrument, a helper in tests/ or tests/support/ to the tests that import it, and an effect to the tests that name it or go through every effect, where each used to run the whole suite or only the class's own tests.
Contributor
Author
|
Closing: this repository is archived. Its packages now live in PyDevices/audioinstruments and PyDevices/audioeffects, each with its own scoped CI. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
A push to main used to run everything: four Pythons on Linux plus Windows and macOS, the whole suite, and all 45 classes and 13 nodes of the lifecycle matrices. That is about 350 runner-minutes and over an hour of wall time for every merge, whatever the merge touched. Pull requests were already scoped by
tools/scoped_tests.py --ci.What changes
tools/scoped_tests.py --cidiffs from the commit main moved from (github.event.before), so a merge is checked for the whole pull request it brings in. A shared change (the base classes,__init__, the kit, the probes,AUDIODSP_PIN, the workflow) still runs everything, including all 45 classes and every node. When that commit is missing from the history (a new branch, a force push), everything runs.audioinstruments.ALL), plus the instrument and roster tests;tests/ortests/support/runs the tests that import it, directly or through other helpers (read withast, imports inside functions included);audioeffects.ALL,kit_options), beside its own tests and the rosters as before.docs/reference/effect-controls.mdrunstest_metadata_contract, which compares it with the classes.CONTRIBUTING.mdandCLAUDE.mdjoin the paths that skip the workflow; no test reads them.Concurrency is unchanged: a new push to a pull request cancels the run it supersedes, and pushes to main are never cancelled, so each one keeps its own record.
How it was checked
Replay over the last 25 commits on main, each a merged pull request. "files" is test files run; "full" is the whole suite.
In every row the new scope keeps each test file the change edited, and never runs less than the pull-request scope did before. The effect rows run more test files than before (the tests that name the class or go through every class), which a pull request now pays for too.
Against what Python really imports. Each of the 85 test modules was imported in a fresh interpreter and every repository file it loaded was listed. For each of those 541 (test, file) pairs outside
lib/audioeffects/*.py, a change to the file runs that test, or the whole suite: 0 misses. Effect modules are left out of that check because importingaudioeffectsloads every effect; their mapping is by name, above.Planted faults. Dropping the last macro label from
tr808and invertingbefore()intests/support/fake_pump.py: the scope pickstest_cpython_instruments,test_metadata_contract,test_sequencerandtest_scheduling_seam, and running those three test modules fails them (8 errors in the instrument library test, 12 in the sequencer).The Scope step itself, run locally for each event: a push with a valid
before(scoped, or everything for a shared change),beforeall zeros,beforenot in the history, a scheduled run, and a pull request labelledlifecycle: all classes. A simulated push of the Vibrato merge runs 26 test files and the lifecycle matrix for Vibrato alone.Runner time. Replayed over October's runs of this workflow since pull requests were scoped (27 pushes, 39 pull requests), with the measured time for runs that stay full and 8 minutes a job for a scoped run (25 for one that touches many classes): pushes go from about 8,400 to 3,700 runner-minutes. Pull requests change little, because they were already scoped. Over the whole of October, pushes would have taken about 20,200 runner-minutes instead of 32,600.
This pull request changes the workflow and the scope tool, so its own CI runs the whole suite.