Skip to content

Update sphinx to 4.2.0 #2261

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 21 commits into from
Oct 28, 2021
Merged

Update sphinx to 4.2.0 #2261

merged 21 commits into from
Oct 28, 2021

Conversation

trsvchn
Copy link
Collaborator

@trsvchn trsvchn commented Oct 12, 2021

Fixes #2224

Description:

Update sphinx to 4.2.0

Note: before merging:

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

Sorry, something went wrong.

trsvchn and others added 7 commits October 7, 2021 14:19

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
trsvchn and others added 3 commits October 13, 2021 01:07
This reverts commit eb8dae7.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ydcjeff
Copy link
Contributor

ydcjeff commented Oct 19, 2021

When merging this PR, I would suggest to add -j auto -WT --keep-going --color in

SPHINXOPTS =

  • -j auto is using available cpus.
  • -W is Turn warnings into errors. This means that the build stops at the first warning and sphinx-build exits with exit status 1.
  • -T is Display the full traceback when an unhandled exception occurs. Otherwise, only a summary is displayed and the traceback information is saved to a file for further analysis.
  • --keep-going is With -W option, keep going processing when getting warnings to the end of build, and sphinx-build exits with exit status 1.
  • --color enables color output.

And remove SPHINXOPTS defined under .github directory.

Taken from pytorch.

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 19, 2021

@trsvchn can you share your findings about sphinx 4.X here please and move forward with this PR.

@trsvchn
Copy link
Collaborator Author

trsvchn commented Oct 19, 2021

When merging this PR, I would suggest to add -j auto -WT --keep-going --color in

SPHINXOPTS =

* `-j auto` is using available cpus.

* `-W` is Turn warnings into errors. This means that the build stops at the first warning and sphinx-build exits with exit status 1.

* `-T` is Display the full traceback when an unhandled exception occurs. Otherwise, only a summary is displayed and the traceback information is saved to a file for further analysis.

* `--keep-going` is With -W option, keep going processing when getting warnings to the end of build, and sphinx-build exits with exit status 1.

* `--color` enables color output.

And remove SPHINXOPTS defined under .github directory.

Taken from pytorch.

Yeah, That's good idea!

@trsvchn
Copy link
Collaborator Author

trsvchn commented Oct 19, 2021

@trsvchn can you share your findings about sphinx 4.X here please and move forward with this PR.

Similar idea to upgrade sphinx, but they ended up with 3.5.4
pytorch/pytorch#61601

Looks like new sphinx generates html with another structure, and the theme css should be adjusted
For example (sphinx 4.2.0 on the left)
Screenshot from 2021-10-13 19-19-40

Screenshot from 2021-10-13 19-21-32

trsvchn and others added 7 commits October 20, 2021 18:47

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@trsvchn trsvchn requested a review from vfdev-5 October 27, 2021 20:37
@trsvchn
Copy link
Collaborator Author

trsvchn commented Oct 27, 2021

kindly asking @ydcjeff for the final review! :)

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Oct 27, 2021

@trsvchn we have "Notes" folded but others unfolded, can we make all unfolded ? Code snippets are more compacted:

Otherwise, OK for me

@trsvchn
Copy link
Collaborator Author

trsvchn commented Oct 27, 2021

Snippets are now ok, thanks for spotting that!
Unlike problem with unfolding by default. Need some time...

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @trsvchn !

I think we can pause on unfolding Notes for this PR.

trsvchn and others added 2 commits October 28, 2021 03:00

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@vfdev-5 vfdev-5 merged commit 7c596fc into pytorch:master Oct 28, 2021
@oke-aditya
Copy link

Hi sorry for not helping on this :(
This seems great!
Even pytorch domain libraries don't use 4.2 !

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

Successfully merging this pull request may close these issues.

Update sphinx to 3.5.4 or latest
4 participants