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

Fix failing docs #1821

Merged
merged 10 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ references:
sudo apt-get update && sudo apt-get install -y cmake
pip install "$TORCH_VERSION"
pip install -r requirements.txt -q
sudo pip install pytest pytest-cov pytest-flake8 -q
sudo pip install pytest -q
pip install -r ./tests/requirements-devel.txt -q

tests: &tests
Expand Down Expand Up @@ -63,23 +63,29 @@ references:
run:
name: Make Documentation
command: |
# sudo apt-get install pandoc
# First run the same pipeline as Read-The-Docs
sudo apt-get update && sudo apt-get install -y cmake
pip install -r requirements.txt --user
sudo pip install -r docs/requirements.txt
pip install -r requirements-extra.txt --user # for doctesting loggers etc.
# sphinx-apidoc -o ./docs/source ./pytorch_lightning **/test_* --force --follow-links
cd docs; make clean; make html --debug --jobs 2 SPHINXOPTS="-W"
make doctest; make coverage

test_docs: &test_docs
run:
name: Testing Documentation
command: |
cd docs; make doctest; make coverage

jobs:

Build-Docs:
docker:
- image: circleci/python:3.7
environment:
- TORCH_VERSION: "torch"
steps:
- checkout
- *make_docs
- *install_deps
- *test_docs
Borda marked this conversation as resolved.
Show resolved Hide resolved
- store_artifacts:
# allows us to preview the generated html pages
path: docs/build/html/
Expand Down
3 changes: 3 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
version: 2

# Build documentation in the docs/ directory with Sphinx
# reference: https://docs.readthedocs.io/en/stable/config-file/v2.html#sphinx
sphinx:
configuration: docs/source/conf.py
# TODO: set it true and debug failing
fail_on_warning: false

# Build documentation with MkDocs
#mkdocs:
Expand Down
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ def package_list_from_file(file):
MOCK_MANUAL_PACKAGES = [
'torchvision',
'PIL',
# packages with different package name compare to import name
'yaml',
'comet_ml',
'neptune',
]
autodoc_mock_imports = MOCK_PACKAGES + MOCK_MANUAL_PACKAGES

Expand Down