Skip to content

Address autosummary.import_cycle warning - #7486

Merged
stefanv merged 1 commit into
scikit-image:mainfrom
lagru:fix-autosummary-import_cycle-warn
Aug 9, 2024
Merged

stefanv merged 1 commit into
scikit-image:mainfrom
lagru:fix-autosummary-import_cycle-warn

Conversation

@lagru

@lagru lagru commented Aug 5, 2024

Copy link
Copy Markdown
Member

Description

Tries to address #7485, at least temporarily. Will have to monitor sphinx-doc/sphinx#12589 to judge how to properly fix this. In the meantime let's get our CI green again.

Checklist

Release note

For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.

...

@lagru lagru added the 🤖 type: Infrastructure CI, packaging, tools and automation label Aug 5, 2024
@lagru

lagru commented Aug 7, 2024

Copy link
Copy Markdown
Member Author

This passes. @scikit-image/core can we get this in to fix our CI? 😊

@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.

Unsure about the changes in the ad += lines, but merging to get CI green.

@stefanv
stefanv merged commit b3c70ef into scikit-image:main Aug 9, 2024
@stefanv stefanv added this to the 0.25 milestone Aug 9, 2024
@lagru
lagru deleted the fix-autosummary-import_cycle-warn branch August 11, 2024 11:41
Comment thread doc/tools/apigen.py

ad += '.. automodule:: ' + uri + '\n\n'
ad += '.. currentmodule:: ' + uri + '\n\n'
# ad += '.. currentmodule:: ' + uri + '\n\n'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Unsure about the changes in the ad += lines, but merging to get CI green.

Autosummary now warns if the .. currentmodule is specified and then again used as a prefix for the items in the .. autosummary directive.

Which makes me realize that this commented line was an oversight leftover from debugging and should have been uncommented. It doesn't seem to cause an problems but let's put it back in to be safe.

I'm a bit fuzzy on this because I can't find a good answer in Sphinx docs to how those two directives interact and why it seems to work with and without.

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.

2 participants