Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add warning for missing import #431

Closed
wants to merge 1 commit into from

Conversation

arwedus
Copy link

@arwedus arwedus commented Apr 4, 2024

This warning is shown by sphinx build now when the "fullname" in the autoapi directive cannot be found in the imports, e.g. .. autoapiclass:: autoapi.mappers.python.objects.PythonPythonMapper give:

reading sources... [100%] reference/templates
WARNING: Failed to import class 'autoapi.mappers.python.objects.PythonPythonMapper' [autoapi.import]

Closes #419

Copy link
Collaborator

@AWhetter AWhetter left a comment

Choose a reason for hiding this comment

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

Apologies for taking so long to look at this.
In addition to my other comments, please could you add a test for this. You'll also need to use towncrier to add a changelog entry.

autoapi/documenters.py Show resolved Hide resolved
autoapi/documenters.py Show resolved Hide resolved
@AWhetter
Copy link
Collaborator

Closing due to lack of follow up. Please feel free to resubmit if you can fix the tests and address the comments.

@AWhetter AWhetter closed this Jul 20, 2024
@arwedus
Copy link
Author

arwedus commented Nov 5, 2024

Hi @AWhetter , I'm picking this up again because we lost our "missing import" warnings again after an update to Autoapi 😄

You mentioned a missing towncrier entry, but https://sphinx-autoapi.readthedocs.io/en/latest/maintenance/release-process.html does not mention towncrier anywhere. Can you be more specific?

I'll also add a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add warning message for unresolved python elements
2 participants