Skip to content

Fix sphinx warnings and turn warnings into errors #1163

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 2 commits into from
Feb 16, 2021

Conversation

NicolasHug
Copy link
Member

Similar to what was done in torchvision pytorch/vision#3290 and torchaudio pytorch/audio#1247

This PR fixes sphinx warnings as well as some other doc layout issues, and sets the

napoleon_numpy_docstring = False
napoleon_google_docstring = True

for sphinx to issue warnings when the wrong parameter syntax is used.

The warnings are now turned into errors. Note: sphinx will now stop compilation at the first warning/error it sees; if we relied on sphinx>=8, we could use the --keep-going option to let it finish.

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #1163 (3d65ca6) into master (651c1f7) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1163   +/-   ##
=======================================
  Coverage   79.63%   79.63%           
=======================================
  Files          47       47           
  Lines        3201     3201           
=======================================
  Hits         2549     2549           
  Misses        652      652           
Impacted Files Coverage Δ
torchtext/datasets/language_modeling.py 90.38% <ø> (ø)
torchtext/datasets/text_classification.py 32.96% <ø> (ø)
torchtext/experimental/vectors.py 90.58% <ø> (ø)
torchtext/experimental/vocab.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 651c1f7...3d65ca6. Read the comment docs.

@cpuhrsch
Copy link
Contributor

cpuhrsch commented Feb 16, 2021

Haha, jinx #1159 - notice that we can also build docs in parallel using the -j flag. I'll rebase.

@cpuhrsch cpuhrsch merged commit 4b2dfb0 into pytorch:master Feb 16, 2021
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.

4 participants