Make doctest-plus work with spin#7786
Merged
stefanv merged 10 commits intoscikit-image:mainfrom May 1, 2025
Merged
Conversation
--import-mode="importlib" is necessary to successfully collect doctests. Otherwise, the doctest-plus plugin will fail because it finds doctests in skimage/ which don't exist at runtime. E.g, `brief_pythran.py` which exists as a file but is only available at runtime with `brief_cy`. However, there's no need to deviate from the default import mode if doctests are not collected.
I don't really see a reason not to do so. And it may catch errors earlier locally. The argument pattern is copied from what other spin commands do. E.g., spin install --no-editable.
lagru
approved these changes
Apr 30, 2025
Member
lagru
left a comment
There was a problem hiding this comment.
Works great. Thanks!
I fixed what I think might have been a small logic hiccup and tweaked the interface a bit (more in the commit messages). Is there a reason not to enable doctesting by default?
Please tweak further or revert if you want!
instead of only when `--doctest` option is passed to spin. E.g. users might accidentally use `spin test -- --doctest-...`.
Since the current proposal is to enable doctests by default, we don't need to tell contributors how to run those.
stefanv
commented
Apr 30, 2025
stefanv
commented
Apr 30, 2025
stefanv
commented
Apr 30, 2025
stefanv
commented
Apr 30, 2025
stefanv
commented
Apr 30, 2025
matthew-brett
added a commit
to matthew-brett/scikit-image
that referenced
this pull request
Jul 7, 2025
* origin/main: Deprecate estimate method in favor of class constructor (scikit-image#7771) Temporary fix for Visual Studio & Clang incompatibility in Windows image (scikit-image#7835) Address deprecations in Pillow 11.3 (scikit-image#7828) Remove unused & obsolete `legacy_datasets`, `legacy_registry` vars (scikit-image#7677) Draft migration guide for skimage2 (scikit-image#7785) Do not report failure in wheels sub-recipe (scikit-image#7806) Use consistent wording in property description. (scikit-image#7804) Add intensity_median to regionprops (scikit-image#7745) CI: Update pypa/gh-action-pypi-publish to v1.12.4 for attestations on PyPI (scikit-image#7793) Document output dtype for transform.resize. (scikit-image#7792) Use `cibuildwheel` to build WASM/Pyodide wheels for `scikit-image`, push nightlies to Anaconda.org (scikit-image#7440) DOC: Include missing gain parameter in adjust_gamma equation (scikit-image#7763) Temporarily pin to `pyodide-build==0.30.0`, and ensure that the correct xbuildenvs are used (scikit-image#7788) Deprecate old names & attributes in RegionProperties (scikit-image#7778) Pin JasonEtco/create-an-issue action to SHA for v2.9.2 (scikit-image#7787) Make doctest-plus work with spin (scikit-image#7786) Report failures on main via issue (scikit-image#7752) Use `workers` instead of alternate parameter names (scikit-image#7302) Fix f-string in otsu plot (scikit-image#7780) Further document use of regionprops function and fix terms. (scikit-image#7518)
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.
/cc @lagru
Closes #7784