-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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: add autosummary API reference for DType clases. #25656
Conversation
[skip cirrus] [skip actions] [skip azp]
0015e64
to
4f89e36
Compare
Not sure what one can do. Is there a way to manually override one attribute in the docs?
Otherwise, this is good to add, and I am 👍 to just do it, adding seems unrelated to the problems 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.
I vote to get this in despite reflink warnings. I can't think of a quick solution, but IMO it shouldn't be a blocker to getting this in!
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Pulling this in, thanks for taking a look! |
Thanks @ngoldbaum for addressing this. I'll note that I will undo the changes here, because an empty page with a single entry isn't quite right (I just got rid of other such pages): ![]() The warnings can probably get rid of with a |
I've tried basically every possible way of doing this. What came closest was autodoc-skip-member, like so in def skip_member(app, what, name, obj, skip, options):
if name == 'type':
return True
return False
def setup(app):
# Fix for warnings for dtype.type (see gh-25656)
app.connect('autodoc-skip-member', skip_member) That can actually intercept the search for the This is a problem that we need to fix. These are the only warnings in the doc build with the default settings of I think we just keep the nice table in the docs, but revert the auto-generated docs for every class. They don't have that much value, and are a problem in themselves - due to the large amount of repetition, it increases the doc build time by over a minute. And it's all effectively boilerplate - if the docs just say "inherits all the attributes and methods from |
That sounds totally reasonable, as long as we can still cross-reference them and they show up in a docs search. I can take a crack at doing this tomorrow if you'd like. |
That would be helpful, thanks 🙏🏼. Hopefully copying the |
This was supposed to be included in #25507 and was mistakenly left out, introducing some reference warnings.
The net effect of this PR should be to add a new docs page available at
reference/generated/numpy.dtypes.html
, linked to by another page atreference/routines.dtypes.html
.Note that this introduces new reference warnings, due to an issue with how the descriptor and dtypemeta classes are implemented in C, as explained here:
I would personally rather have these spurious reference warnings in the build and also be able to cross-reference the DType classes elsewhere in the docs, but please let me know if we'd rather not introduce the new reference warnings and we need a more permanent fix.