Skip to content

Refactor migration doctests and run as tests - #8133

Merged
matthew-brett merged 5 commits into
scikit-image:mainfrom
matthew-brett:move-ski2-doctest-tests
Apr 29, 2026
Merged

matthew-brett merged 5 commits into
scikit-image:mainfrom
matthew-brett:move-ski2-doctest-tests

Conversation

@matthew-brett

Copy link
Copy Markdown
Contributor

Refactor the migration doc code into a utility function, and make new
script to run doctests only. Use that script to test migration doctests
as part of the standard all-platform test runs.

@greptile-apps

greptile-apps Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Refactor migration doctests and run as t..." | Re-trigger Greptile

Comment thread doc/tools/migration_utils.py Resolved
Comment thread doc/tools/migration_utils.py Resolved
Comment thread doc/tools/migration_utils.py Resolved
Refactor the migration doc code into a utility function, and make new
script to run doctests only.  Use that script to test migration doctests
as part of the standard all-platform test runs.
@matthew-brett
matthew-brett force-pushed the move-ski2-doctest-tests branch from 36ea8b9 to f1909bb Compare April 27, 2026 12:44
@greptile-apps

greptile-apps Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "Refactor migration doctests and run as t..." | Re-trigger Greptile

Comment thread doc/Makefile Resolved

@lagru lagru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. :)

Comment thread doc/tools/doctest_migration.py Resolved
@lagru lagru added the 🤖 type: Infrastructure CI, packaging, tools and automation label Apr 27, 2026
@lagru

This comment was marked as outdated.

@greptile-apps

greptile-apps Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Reviews (3): Last reviewed commit: "Remove unused imports (apply commit hook..." | Re-trigger Greptile

@matthew-brett

Copy link
Copy Markdown
Contributor Author

OK to merge this one?

@stefanv stefanv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments; please self-merge when ready.

RUNNER = doctest.DocTestRunner()


class TrackerDict(dict):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cute :)

Comment thread doc/Makefile Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some missing phony target.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Comment thread doc/Makefile Resolved
Comment thread doc/Makefile Resolved
Comment thread .github/workflows/test-linux.yaml Outdated
run: |
$PYTEST --doctest-plus --showlocals --pyargs skimage ./tests

- name: Run migration doctests

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we need to run this more than once; a single time along with the docs build should be sufficient.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - I'll revert to the previous incantation, which was just at the doc build.

@greptile-apps

greptile-apps Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Reviews (4): Last reviewed commit: "Apply suggestions from code review" | Re-trigger Greptile

@matthew-brett matthew-brett left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed, I think.

Comment thread .github/workflows/test-linux.yaml Outdated
run: |
$PYTEST --doctest-plus --showlocals --pyargs skimage ./tests

- name: Run migration doctests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - I'll revert to the previous incantation, which was just at the doc build.

Comment thread doc/Makefile Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@greptile-apps

greptile-apps Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Reviews (5): Last reviewed commit: "Move tests back to doc build" | Re-trigger Greptile

@matthew-brett
matthew-brett merged commit 195db5d into scikit-image:main Apr 29, 2026
19 of 22 checks passed
@stefanv stefanv added this to the 0.27 milestone Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 type: Infrastructure CI, packaging, tools and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants