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
DOC: Bump Python version on RTD build and fix failure #10524
Conversation
This comment has been minimized.
This comment has been minimized.
1 similar comment
Now it is |
This comment has been minimized.
This comment has been minimized.
Will switching from numpydoc to napoleon fix this? Has been on our wish list over at astropy/sphinx-astropy#5 for a while now. UPDATE: Wow, that opened a different can of worms. Maybe similar to problem at scipy/scipy#3915 . |
Found some interesting tidbits at https://stackoverflow.com/questions/11417221/sphinx-autodoc-gives-warning-pyclass-reference-target-not-found-type-warning but doesn't seem to help much in this case. |
Well, the switch to
Aha! numpydoc 1.1.0 broke our RTD job. |
913ad89
to
2960c82
Compare
The RTD failure is going to bite unrelated PRs, so better get this in sooner than later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks for tracking down the issue! Should we open an issue as a reminder to change the version restriction when there is a new numpydoc release?
@pllim - wow, that was good that I saw this, as I was getting quite stuck with similar warnings on my own package. What a mess! I had thought this could be solved with https://github.com/astropy/astropy/blob/master/docs/nitpick-exceptions, but that doesn't work for these errors. Aside: for myself, I added a |
p.s. I now see our very own Erik pointed to this file in the answer on the stack-overflow question you pointed to... Still not sure why it doesn't seem to work here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the more reason to drop numpydoc in favour of napoleon.
Note about the current warnings:
This kind of issue is quite common and due to the inherited-members directive here:
There are three solutions:
This is a real error - 'double array[naxis]' is not a real type, so this should be ``numpy.ndarray` and the description should mention any dimensionality restrictions.
Also a real error I think - should just say Switching to Napoleon would not fix this - napoleon doesn't really support the full numpydoc spec, see sphinx-doc/sphinx#6861 for an example of an issue I ran into. |
Thanks for the inputs, everyone! Re: three solutions -- I did start on first two and then started doubting the reality and rolled back. I mean, numpydoc 1.1.0 is a minor release, so why are things breaking so badly for us? Why didn't it complain until now? As for the third one, I wasn't ready to mess with @embray 's magic in case this breakage will be patched upstream by Re: drop numpydoc in favour of napoleon -- It's not a bed of roses. I got thousands of warnings (like 3k-4k). So how should I proceed? Should I merge this and open a follow-up issue like @mwcraig said? |
My suggestion would be to do what you do right now, for the moment just fix the numpydoc version so tests pass again, and then raise another issue. I did get a sense over at the numpydoc issue that this might get fixed; or perhaps we try to find a fix ourselves so we can nit-pick. |
What about now, @mhvk and @astrofrog ? Hope I didn't go too far with the search and replace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems good enough for now!
Thanks for the review! I'm taking the liberty to merge now so this failure won't be a blocker for other PRs, especially given it's SciPy week. |
To close the loop, follow-up issue is at #10529 |
Wait, what was my magic? I'm a little confused. |
@embray , I think I meant the stuff you posted in https://stackoverflow.com/questions/11417221/sphinx-autodoc-gives-warning-pyclass-reference-target-not-found-type-warning 😅 |
DOC: Bump Python version on RTD build and fix failure
I am backporting this to v4.1.x to fix some docs failures there |
Description
RTD complained about
astropy/table/table.py:docstring of astropy.table.TableColumns.keys::py:class reference target not found: a set-like object providing a view on D's keys
onlatest
build even though the PR merged reported successful RTD build. Hoping that bumping the Python version will fix the problem if it is due to some incompatibilities with older dependencies that cannot be upgraded because Python being used is too old.UPDATE: I think the failure is real. I think we inherited something from Python that doesn't play well with Sphinx.
Looks like there is also
astropy/timeseries/__init__.py:docstring of astropy.timeseries.BoxLeastSquaresResults.clear::py:class reference target not found: None. Remove all items from D.
.UPDATE: Comparing the logs from last successful build and the failed build on
master
branch, I noticed the following:UPDATE: Tried to pin using
docs/requirements.txt
and have it installed via.readthedocs.yml
before editable install part but didn't work. A later download somehow upgraded it back to 1.1.0.TODO: