Skip to content
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

Raise RTD doc build warnings as errors #1823

Merged
merged 8 commits into from
May 22, 2020
Merged

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented May 13, 2020

What does this PR do?

Follow up to #1821 as discussed on slack

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@mergify mergify bot requested a review from a team May 13, 2020 23:20
@awaelchli awaelchli added ci Continuous Integration docs Documentation related labels May 13, 2020
@Borda Borda added this to the 0.7.6 milestone May 14, 2020
@mergify mergify bot requested a review from a team May 14, 2020 08:21
@Borda Borda changed the title [blocked by #1821] Raise RTD doc build warnings as errors Raise RTD doc build warnings as errors May 14, 2020
@Borda Borda marked this pull request as ready for review May 14, 2020 12:41
@mergify
Copy link
Contributor

mergify bot commented May 14, 2020

This pull request is now in conflict... :(

@Borda
Copy link
Member

Borda commented May 14, 2020

RTD build - https://readthedocs.org/projects/pytorch-lightning/builds/11039117/

UPDATE: it seems to be freezing before beginning on Triggered state
ref: readthedocs/readthedocs.org#2257 readthedocs/readthedocs.org#435

@Borda Borda changed the title Raise RTD doc build warnings as errors [wip] Raise RTD doc build warnings as errors May 14, 2020
@Borda Borda removed this from the 0.7.6 milestone May 14, 2020
docs/source/conf.py Outdated Show resolved Hide resolved
@pep8speaks
Copy link

pep8speaks commented May 14, 2020

Hello @awaelchli! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-05-14 14:05:32 UTC

@mergify mergify bot requested a review from a team May 14, 2020 12:58
@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #1823 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #1823   +/-   ##
======================================
  Coverage      88%     88%           
======================================
  Files          71      71           
  Lines        4458    4458           
======================================
  Hits         3915    3915           
  Misses        543     543           

@Borda
Copy link
Member

Borda commented May 14, 2020

@awaelchli seems to be failing https://readthedocs.org/projects/pytorch-lightning/builds/11039178/

The name of the builder is: epub/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/recommonmark/parser.py:65: UserWarning: Container node skipped: type=document
  warn("Container node skipped: type={0}".format(mdnode.t))

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app.build(args.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/application.py", line 349, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 299, in build_update
    len(to_build))
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 364, in build
    self.finish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/builders/html.py", line 638, in finish
    self.handle_finish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/builders/epub3.py", line 81, in handle_finish
    self.build_toc()
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/builders/_epub_base.py", line 705, in build_toc
    self.check_refnodes(refnodes)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/builders/_epub_base.py", line 211, in check_refnodes
    logger.warning(__('duplicated ToC entry found: %s'), node['refuri'])
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/logging/__init__.py", line 1736, in warning
    self.log(WARNING, msg, *args, **kwargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/util/logging.py", line 124, in log
    super().log(level, msg, *args, **kwargs)
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/logging/__init__.py", line 1768, in log
    self.logger.log(level, msg, *args, **kwargs)
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/logging/__init__.py", line 1449, in log
    self._log(level, msg, args, **kwargs)
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/logging/__init__.py", line 1519, in _log
    self.handle(record)
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/logging/__init__.py", line 1529, in handle
    self.callHandlers(record)
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/logging/__init__.py", line 1591, in callHandlers
    hdlr.handle(record)
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/logging/__init__.py", line 901, in handle
    rv = self.filter(record)
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/logging/__init__.py", line 762, in filter
    result = f.filter(record)
  File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch-lightning/envs/docs-rtd-warn-as-error/lib/python3.7/site-packages/sphinx/util/logging.py", line 406, in filter
    raise SphinxWarning(message)
sphinx.errors.SphinxWarning: duplicated ToC entry found: hooks.xhtml

Warning, treated as error:
duplicated ToC entry found: hooks.xhtml

maybe just disable whole epub build as we do not use it anyway...?

@Borda
Copy link
Member

Borda commented May 14, 2020

.readthedocs.yml Outdated Show resolved Hide resolved
@Borda
Copy link
Member

Borda commented May 14, 2020

@awaelchli
Copy link
Contributor Author

the build seems fine now, shall we remove the suppress warning now?

@mergify mergify bot requested a review from a team May 14, 2020 14:13
@Borda
Copy link
Member

Borda commented May 14, 2020

the build seems fine now, shall we remove the suppress warning now?

true :]

@awaelchli awaelchli changed the title [wip] Raise RTD doc build warnings as errors Raise RTD doc build warnings as errors May 14, 2020
@Borda Borda self-requested a review May 21, 2020 17:10
@Borda Borda added the ready PRs ready to be merged label May 21, 2020
@Borda Borda added this to the 0.7.7 milestone May 21, 2020
@mergify mergify bot requested a review from a team May 21, 2020 17:11
@williamFalcon williamFalcon merged commit 868dde2 into master May 22, 2020
@Borda Borda deleted the docs/RTD-warn-as-error branch May 22, 2020 06:47
@Borda Borda modified the milestones: 0.7.7, 0.8.0 May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration docs Documentation related ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants