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

CI: clean building docs #14216

Merged
merged 3 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .github/checkgroup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ subprojects:
paths:
- "docs/source-pytorch/**"
- ".github/workflows/docs-*.yml"
- "requirements/docs.txt"
- "requirements/pytorch/**"
checks:
- "doctest (pytorch)"
Expand Down Expand Up @@ -133,6 +134,7 @@ subprojects:
paths:
- "docs/source-app/**"
- ".github/workflows/docs-*.yml"
- "requirements/docs.txt"
- "requirements/app/**"
checks:
- "doctest (app)"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/docs-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
- name: Install dependencies
env:
FREEZE_REQUIREMENTS: 1
PACKAGE_NAME: ${{ matrix.pkg }}
run: |
sudo apt-get update
sudo apt-get install -y cmake pandoc
pip --version
pip install -q fire
# python -m pip install --upgrade --user pip
pip install -e . --quiet -r requirements/${{ matrix.pkg }}/base.txt -r requirements/${{ matrix.pkg }}/docs.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -e . --quiet -r requirements/${{ matrix.pkg }}/docs.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -r requirements/${{ matrix.pkg }}/devel.txt
pip list
shell: bash
Expand Down Expand Up @@ -91,11 +91,12 @@ jobs:
- name: Install dependencies
env:
FREEZE_REQUIREMENTS: 1
PACKAGE_NAME: ${{ matrix.pkg }}
run: |
sudo apt-get update
sudo apt-get install -y cmake pandoc
pip --version
pip install -e . --quiet -r requirements/${{ matrix.pkg }}/base.txt -r requirements/${{ matrix.pkg }}/docs.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -e . --quiet -r requirements/${{ matrix.pkg }}/docs.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
sudo apt-get update && sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
pip list
Expand Down
17 changes: 4 additions & 13 deletions requirements/app/docs.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
sphinx>=4.0,<5.0
myst-parser>=0.15,<0.17
nbsphinx>=0.8.5, <=0.8.9
-r ../docs.txt

ipython[notebook]
ipython_genutils
pandoc>=1.0, <=2.2
docutils>=0.16, <0.19
sphinxcontrib-fulltoc>=1.0, <=1.2.0
sphinxcontrib-mockautodoc
pytorch-lightning
Copy link
Contributor

Choose a reason for hiding this comment

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

It is required for app docs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, because docs pull-in examples and some examples are a training model...
otherwise, the docs would need to install all particular requirements from each example app


https://storage.googleapis.com/grid-packages/lightning-ai-sphinx-theme/build-31.3.zip
sphinx-autodoc-typehints>=1.0,<1.15 # v1.15 failing on master (#11405)
sphinx-paramlinks>=0.5.1, <=0.5.4
sphinx-togglebutton>=0.2, <=0.3.2
sphinx-copybutton>=0.3, <=0.5.0
sphinx-autobuild
jinja2>=3.0.0,<3.1.0
https://storage.googleapis.com/grid-packages/lightning-ai-sphinx-theme/build-31.3.zip
13 changes: 13 additions & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sphinx>=4.0, <5.0
myst-parser>=0.15, <0.17
nbsphinx>=0.8.5, <=0.8.9
pandoc>=1.0, <=2.2
docutils>=0.16, <0.19
sphinxcontrib-fulltoc>=1.0, <=1.2.0
sphinxcontrib-mockautodoc
sphinx-autodoc-typehints>=1.11, <1.15 # strict; v1.15 failing on master (#11405)
sphinx-paramlinks>=0.5.1, <=0.5.4
sphinx-togglebutton>=0.2, <=0.3.2
sphinx-copybutton>=0.3, <=0.5.0
sphinx-multiproject
jinja2>=3.0.0,<3.1.0
15 changes: 2 additions & 13 deletions requirements/pytorch/docs.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
sphinx>=4.0,<5.0
myst-parser>=0.15,<0.17
nbsphinx>=0.8.5, <=0.8.9
-r ../docs.txt

ipython[notebook]
pandoc>=1.0, <=2.2
docutils>=0.16, <0.19
sphinxcontrib-fulltoc>=1.0, <=1.2.0
sphinxcontrib-mockautodoc
pt-lightning-sphinx-theme @ https://github.com/Lightning-AI/lightning_sphinx_theme/archive/master.zip
sphinx-autodoc-typehints>=1.11,<1.15 # strict; v1.15 failing on master (#11405)
sphinx-paramlinks>=0.5.1, <=0.5.4
sphinx-togglebutton>=0.2, <=0.3.2
sphinx-copybutton>=0.3, <=0.5.0
typing-extensions # already in `requirements.txt` but the docs CI job does not install it
jinja2>=3.0.0,<3.1.0

-r ../../_notebooks/.actions/requirements.txt