Repository navigation
Test only changed subpackages - #8103
Conversation
|
Reviews (8): Last reviewed commit: "fix handling of the base_ref" | Re-trigger Greptile |
|
Question: Should we be also including the test/doc module from the other version (e.g. if something changes in skimage1, also run the doctest/test module for skimage2, and vice versa). |
|
Kicking the build to see if the single MacOS intel error was a fluke. |
|
Suggested way to operationalize this: Add the |
|
Reviews (11): Last reviewed commit: "Merge branch 'main' into test-only-chang..." | Re-trigger Greptile |
|
Reviews (19): Last reviewed commit: "address review" | Re-trigger Greptile |
|
Reviews (20): Last reviewed commit: "fix handling of git base ref" | Re-trigger Greptile |
|
(I don't think the emoji should affect |
|
Linux tests: ~1m Installing clang took 8m! Can we avoid that? |
I believe we should be able to, I'll follow up on that. |
|
Reviews (21): Last reviewed commit: "address review" | Re-trigger Greptile |
|
Reviews (22): Last reviewed commit: "fix handling of label" | Re-trigger Greptile |
|
I made the following updates:
It should be good to go now |
|
Reviews (23): Last reviewed commit: "remove debug comments" | Re-trigger Greptile |
| - name: Install spin | ||
| run: pip install spin |
There was a problem hiding this comment.
Unpinned
spin version will diverge from macOS/Windows
pip install spin installs whatever the latest published version is. macOS and Windows both receive spin==0.13 via setup-build-env.sh → requirements/build.txt. If a future spin release changes any of the internal APIs used in .spin/cmds.py (e.g. spin.cmds.meson._set_pythonpath, spin.util.extend_command), Linux CI will fail or behave differently from the other platforms with no clear signal as to why. Pin the version to match requirements/build.txt.
| - name: Install spin | |
| run: pip install spin | |
| - name: Install spin | |
| run: pip install "$(grep '^spin' requirements/build.txt)" |
|
Awesome, let's give it a try! |
* origin/main: Use standard C99 static inline instead of `__inline` (#8159) Fix structural_similarity win_size / gaussian_weights conflict (#8162) Unwrap seed refactor (#8142) ci: Remove llvm build and add ccache support on windows (#8164) Document warn_external in contributing guide (#8163) CI: Fix emscripten dependencies and clean up wheel test commands (#8147) Test only changed subpackages (#8103) Fix nightlies: update deprecated scipy call, fix underdetermined test Fix minkowski distanced invocation for SciPy >= 1.18 (#8157) Port `structural_similarly` to ski2 (#8104) make spin build requirement a lower bound (#8158)
* origin/main: (254 commits) Refactor, document migration utilities (scikit-image#8184) ci: improve handling of pr labels (scikit-image#8169) Doctest migration in PRs & on all platforms (scikit-image#8141) Update SKIP 4 (import hierarchy, backporting, testing) (scikit-image#8097) One page per function / class in HTML docs for skimage2 (scikit-image#8154) Pin minimum pytest to 9 (scikit-image#8174) docs: make source install instructions more discoverable and add build requirements to top level requirements file (scikit-image#8165) Drop `--maxfail=5` from local pytest config (scikit-image#8170) Use standard C99 static inline instead of `__inline` (scikit-image#8159) Fix structural_similarity win_size / gaussian_weights conflict (scikit-image#8162) Unwrap seed refactor (scikit-image#8142) ci: Remove llvm build and add ccache support on windows (scikit-image#8164) Document warn_external in contributing guide (scikit-image#8163) CI: Fix emscripten dependencies and clean up wheel test commands (scikit-image#8147) Test only changed subpackages (scikit-image#8103) Fix nightlies: update deprecated scipy call, fix underdetermined test Fix minkowski distanced invocation for SciPy >= 1.18 (scikit-image#8157) Port `structural_similarly` to ski2 (scikit-image#8104) make spin build requirement a lower bound (scikit-image#8158) Drop Python 3.11 Support (scikit-image#8153) ...
Description
Simplified version of #7749 that only tests directly changed subpackage(s).
Credit for this feature goes to @mdhaber.
The purpose of the change is to vastly accelerate CI.
The method is to detect which subpackages are touched by a PR, and to only test them.
A side benefit is that if we merge a change that passes with this flag but produces error(s) in test for dependent modules on merge, we will get auto-generated issues that can identify any gaps in the test suite for a given module.
We also make sure that changes in one top level module trigger unit and doctests in the mirrored module (e.g. a change in
src/skimage1/morphologytriggerstests.skimage2.morphology.This PR aims to measure the speed-up that can be achieved, consider the robustness of the approach, and identify any oversights.
I addressed the open comments on the modified files from #7749.
First I verified that there are no tests run in 6d7bf9a when there was no diff. "No modified skimage modules detected.".
Then I verified that only the expected docs/pytest are run in fa0303e: "python -P -m pytest --doctest-plus --config-file /Users/runner/work/scikit-image/scikit-image/pyproject.toml tests/skimage/morphology src/skimage/morphology tests/skimage2/morphology src/_skimage2/morphology". Both the pytest and doctests were run for both packages. The total test time step was 20s vs 4m31s for the equivalent platform and python version.
Checklist
./doc/examplesfor new featuresRelease note
For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.