Skip to content

DOC: Unpin numpydoc, add nitpick exception rules - #10530

Merged
mhvk merged 3 commits into
astropy:masterfrom
pllim:rm-numpydoc-pin
Jul 8, 2020
Merged

mhvk merged 3 commits into
astropy:masterfrom
pllim:rm-numpydoc-pin

Conversation

@pllim

@pllim pllim commented Jul 6, 2020

Copy link
Copy Markdown
Member

Follow up of #10524 . Fix #10529. Thanks to numpy/numpydoc#275 (comment) .

@pllim pllim added this to the v4.2 milestone Jul 6, 2020
@pllim pllim changed the title DOC: Unpin numpydoc, add nitpick exception rules [ci skip] DOC: Unpin numpydoc, add nitpick exception rules Jul 6, 2020
@pllim

This comment has been minimized.

Comment thread astropy/wcs/docstrings.py

get_cdelt = """
get_cdelt() -> ``double array[naxis]``
get_cdelt() -> numpy.ndarray

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.

Note: Apparently linking was still attempted despite the double-backticks. This is some C-extension thingy, so I am not going to question it... 🤷

@pllim

pllim commented Jul 6, 2020 •

Copy link
Copy Markdown
Member Author

RTD passed without numpydoc pinning! I'll let the full CI run too, just in case.

UPDATE: CI passed.

@pllim
pllim requested a review from mhvk July 6, 2020 20:52

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great! And sorry to see that list of tuple doesn't work... One suggestion: let's keep the exceptions together in one file...

Comment thread docs/conf.py Outdated
nitpicky = True
nitpick_ignore = []
# This list is from https://github.com/numpy/numpydoc/issues/275
nitpick_ignore = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should add them to nitpick_exceptions; I found it needs to be without the quotes:

# sphinx doing strange things with dict methods
py:class None.  Remove all items from D.
py:class a set-like object providing a view on D's items
py:class a set-like object providing a view on D's keys
py:class v, remove specified key and return the corresponding value.
py:class None.  Update D from dict/iterable E and F.
py:class an object providing a view on D's values
py:class a shallow copy of D

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.

Done. Thanks!

@astrofrog

Copy link
Copy Markdown
Member

Thanks! Is there a reason the nitpick exceptions can’t live in the dedicated file?

@pllim

pllim commented Jul 7, 2020

Copy link
Copy Markdown
Member Author

Is there a reason the nitpick exceptions can’t live in the dedicated file?

No. I wasn't even aware the is a dedicated file. Personally, I like all the settings in one place but I'll move it as requested.

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All OK now, great!

@mhvk
mhvk merged commit 8d1d429 into astropy:master Jul 8, 2020
@pllim
pllim deleted the rm-numpydoc-pin branch July 9, 2020 14:57
astrofrog pushed a commit that referenced this pull request Aug 3, 2020
DOC: Unpin numpydoc, add nitpick exception rules
@eteq eteq modified the milestones: v4.2, v4.1 Aug 3, 2020
@astrofrog

Copy link
Copy Markdown
Member

I am backporting this to v4.1.x to fix some docs failures there

@pllim pllim mentioned this pull request Aug 27, 2020
@astrofrog astrofrog modified the milestones: v4.1, v4.0.2 Oct 8, 2020
astrofrog pushed a commit that referenced this pull request Oct 8, 2020
DOC: Unpin numpydoc, add nitpick exception rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MNT: Undo numpydoc pin when we can

4 participants