Repository navigation
Doctest migration in PRs & on all platforms - #8141
Conversation
Moving the jinja2 import out of migration_utils.py allows running doctest_migration.py in the CI without having to install doc dependencies.
|
Reviews (1): Last reviewed commit: "Doctest migration in PRs & on all platfo..." | Re-trigger Greptile |
|
Ah yes - this was a version of the changes I reverted in #8133 from a comment by @stefanv . He thought it was not necessary to test on all platforms. Sorry for my ignorance - but why can this not be achieved with: diff --git a/.github/workflows/test-linux.yaml b/.github/workflows/test-linux.yaml
index dd7b6a3fa..847d2f712 100644
--- a/.github/workflows/test-linux.yaml
+++ b/.github/workflows/test-linux.yaml
@@ -128,6 +128,10 @@ jobs:
run: |
$PYTEST --doctest-plus --showlocals --pyargs skimage ./tests
+ - name: Run Skimage2 migration doctests
+ run: |
+ python doc/tools/doctest_migration.py
+
- name: Check benchmarks
run: |
asv check -v -E existing |
Conflicts: .github/workflows/test-linux.yaml
|
Reviews (2): Last reviewed commit: "Merge branch 'main' into doctest-migrati..." | Re-trigger Greptile |
@matthew-brett I don't follow what you are confused about. The change you suggest in your comment is exactly what I included (now patched after recent updates to our linux workflows). If you are asking about the other changes, see the description of f69cfda. |
In these workflows, skimage is not installed because it is build with `spin build`.
I disagree with @stefanv here (without having looked for his commend). Right now we only test it the migration examples on I'm less set on testing on all platforms, but I think it would be prudent to avoid platform-specific errors sneaking through. |
|
Reviews (3): Last reviewed commit: "Use `spin run --` to invoke doctest_migr..." | Re-trigger Greptile |
Stéfan & Steven suggested this rename because the old one seemed ambiguous to them.
|
Reviews (4): Last reviewed commit: "Rename to `run_migration_doctests.py`" | Re-trigger Greptile |
|
Thanks! And sorry for my earlier misunderstanding around what this script does. The renaming makes it very clear 🙏 |
* 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) ...
I noticed in #8057 that our current setup doesn't catch failing examples in our migration guide. So I propose to doctest the migration guide as part of our regular test workflows. That way we catch errors early while working on the migration example and we also test it on all platforms!
Follow-up to #8133.
Release note (optional)