Skip to content

PR: Convert array_object.md to rst #345

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

Merged
merged 12 commits into from
Jan 20, 2022
Merged

Conversation

steff456
Copy link
Member

@steff456 steff456 commented Dec 14, 2021

This PR converts the array object markdown into rst

Ref: #283

Note: It seems that the circleci redirector action only works if I open the PR from my own master branch. Given that I'm opening multiple PRs from branches, I'll update the link for the preview manually for each.
Preview: https://38-335160819-gh.circle-artifacts.com/0/build/latest/index.html

@steff456 steff456 added the Maintenance Bug fix, typo fix, or general maintenance. label Dec 14, 2021
@steff456 steff456 added this to the v2022 milestone Dec 14, 2021
@steff456 steff456 requested review from rgommers and kgryte December 14, 2021 17:21
@steff456 steff456 self-assigned this Dec 14, 2021
@rgommers rgommers modified the milestones: v2022, v2021 Jan 3, 2022
@asmeurer
Copy link
Member

I think the main question here is if we're OK with the notes in the various functions being replaced from note directives, which render as blue "Note" boxes (see for instance https://data-apis.org/array-api/latest/API_specification/array_object.html#floordiv-self-other) with a simple "notes" section, which is how numpydoc renders the Notes section. One downside is that notes no longer appear next to a specific part of the docstring. They only appear together in the notes section.

If we're fine with this, I only have the one minor comment about a formatting issue. If not, we should change the "Notes" sections to use .. note:: directives to match the way it currently looks in the Markdown. @rgommers @kgryte any thoughts?

@steff456
Copy link
Member Author

steff456 commented Jan 19, 2022

Just as a clarification, at the end I decided to compress all the notes in just one section because as we are using Numpy style documentation I'm unable to call the .. note:: directive inside the docstrings. I've been researching, and I think the closest I can get is to activate one option in napoleon which will render the notes in a box as before, but I think I still cannot create one admonition for each one.

Edit: I found a way to do it 🎉 and updated this in the last commit

@asmeurer
Copy link
Member

Great. This looks good now.

@asmeurer asmeurer merged commit 5601318 into data-apis:main Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Bug fix, typo fix, or general maintenance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants