2022-02-02 19:48:15 +00:00
|
|
|
name: Check Docs
|
2020-06-27 20:25:33 +00:00
|
|
|
# https://github.com/marketplace/actions/sphinx-build
|
|
|
|
|
2022-09-08 13:29:28 +00:00
|
|
|
on:
|
2020-09-15 09:55:03 +00:00
|
|
|
push:
|
2022-11-02 10:33:40 +00:00
|
|
|
branches: ["master", "release/*"]
|
2022-11-04 15:36:47 +00:00
|
|
|
# use this event type to share secrets with forks.
|
|
|
|
# it's important that the PR head SHA is checked out to run the changes
|
|
|
|
pull_request_target:
|
2022-11-02 10:33:40 +00:00
|
|
|
branches: ["master", "release/*"]
|
|
|
|
paths:
|
|
|
|
- ".actions/**"
|
2022-11-26 01:16:48 +00:00
|
|
|
- ".github/workflows/docs-checks.yml"
|
2022-11-02 10:33:40 +00:00
|
|
|
- "requirements/**"
|
2022-11-02 21:27:25 +00:00
|
|
|
- "docs/**"
|
2022-11-02 10:33:40 +00:00
|
|
|
- "src/**"
|
|
|
|
- "setup.py"
|
2023-01-19 16:48:28 +00:00
|
|
|
- "pyproject.toml" # includes metadata used in the package creation
|
2022-11-16 10:07:02 +00:00
|
|
|
- "!*.md"
|
|
|
|
- "!**/*.md"
|
2020-06-27 20:25:33 +00:00
|
|
|
|
2022-02-02 19:48:15 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
|
|
|
|
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
|
|
|
|
|
2022-10-25 13:23:26 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2023-02-13 09:59:02 +00:00
|
|
|
env:
|
|
|
|
FREEZE_REQUIREMENTS: "1"
|
|
|
|
TORCH_URL: "https://download.pytorch.org/whl/cpu/torch_stable.html"
|
|
|
|
|
2020-06-27 20:25:33 +00:00
|
|
|
jobs:
|
2022-08-29 18:03:37 +00:00
|
|
|
make-doctest:
|
2023-01-14 03:02:10 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: pytorchlightning/pytorch_lightning:docs
|
Add `lightning_app` docs (#13656)
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* update
* update
* update
* update
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update latest docs
* remove image
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* ci
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* make
* Update .gitignore
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update .github/workflows/docs-deploy.yml
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* update
* update
* update
* update
* Update docs/source-app/_templates/theme_variables.jinja
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/api_reference/api_references.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/api_reference/api_references.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/api_reference/api_references.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/code_samples/convert_pl_to_app/train.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/core_api/lightning_app/communication_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/model_server_app/model_server_app_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/get_started/training_with_apps.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/get_started/training_with_apps.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/get_started/training_with_apps.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/hpo/hpo.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/core_api/lightning_app/communication_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/core_api/lightning_app/communication_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/model_server_app/model_server.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* update
* Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/app.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/app.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* update
* update
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-02-13 09:59:02 +00:00
|
|
|
pkg-name: ["lightning", "pytorch"]
|
2020-06-27 20:25:33 +00:00
|
|
|
steps:
|
2022-09-05 17:13:08 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-06-08 16:30:13 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2022-11-04 15:36:47 +00:00
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2022-11-04 16:51:03 +00:00
|
|
|
|
2022-11-03 11:21:39 +00:00
|
|
|
- uses: aws-actions/configure-aws-credentials@v1
|
2023-02-13 09:59:02 +00:00
|
|
|
if: ${{ matrix.pkg-name == 'lightning' }}
|
2022-11-03 11:21:39 +00:00
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_ID }}
|
|
|
|
aws-region: us-east-1
|
2022-11-04 16:51:03 +00:00
|
|
|
|
2022-11-03 11:21:39 +00:00
|
|
|
- run: aws s3 sync s3://sphinx-packages/ pypi/
|
2023-02-13 09:59:02 +00:00
|
|
|
if: ${{ matrix.pkg-name == 'lightning' }}
|
2022-11-03 11:21:39 +00:00
|
|
|
|
2020-06-27 20:25:33 +00:00
|
|
|
# Note: This uses an internal pip API and may not always work
|
|
|
|
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
|
|
|
|
- name: Cache pip
|
2022-07-14 20:12:56 +00:00
|
|
|
uses: actions/cache@v3
|
2020-06-27 20:25:33 +00:00
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
2023-02-02 10:36:33 +00:00
|
|
|
key: docs-test-${{ matrix.pkg-name }}-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }}
|
|
|
|
restore-keys: docs-test-${{ matrix.pkg-name }}-
|
2020-06-27 20:25:33 +00:00
|
|
|
|
2022-11-02 13:00:48 +00:00
|
|
|
- name: Adjust docs refs
|
2023-02-13 09:59:02 +00:00
|
|
|
if: ${{ matrix.pkg-name == 'lightning' }}
|
2022-11-02 13:00:48 +00:00
|
|
|
run: |
|
|
|
|
pip install -q -r .actions/requirements.txt
|
2022-12-13 05:55:39 +00:00
|
|
|
python .actions/assistant.py copy_replace_imports --source_dir="./docs" \
|
2023-01-04 15:57:18 +00:00
|
|
|
--source_import="pytorch_lightning,lightning_fabric" \
|
|
|
|
--target_import="lightning.pytorch,lightning.fabric"
|
2022-11-02 10:07:06 +00:00
|
|
|
|
2023-02-13 09:59:02 +00:00
|
|
|
- name: adjust paths
|
|
|
|
run: |
|
|
|
|
python -c "n = '${{ matrix.pkg-name }}' ; print('DOCS_DIR=source' + {'lightning': '', 'pytorch': '-pytorch'}.get(n))" >> $GITHUB_ENV
|
|
|
|
python -c "n = '${{ matrix.pkg-name }}' ; print('REQ_DIR=' + {'lightning': 'app'}.get(n, n))" >> $GITHUB_ENV
|
|
|
|
|
2022-11-01 00:44:58 +00:00
|
|
|
- name: Install this package
|
2022-10-22 11:20:49 +00:00
|
|
|
run: |
|
2023-02-13 09:59:02 +00:00
|
|
|
pip install -e .[extra,cloud,ui] -U -r requirements/${{ env.REQ_DIR }}/docs.txt -f pypi -f ${TORCH_URL}
|
2022-11-03 11:21:39 +00:00
|
|
|
pip list
|
2020-06-27 20:25:33 +00:00
|
|
|
|
|
|
|
- name: Test Documentation
|
2020-06-28 03:31:06 +00:00
|
|
|
env:
|
|
|
|
SPHINX_MOCK_REQUIREMENTS: 0
|
2023-02-13 09:59:02 +00:00
|
|
|
working-directory: ./docs/${{ env.DOCS_DIR }}
|
2020-06-27 20:25:33 +00:00
|
|
|
run: |
|
|
|
|
make doctest
|
|
|
|
make coverage
|
|
|
|
|
2022-08-29 18:03:37 +00:00
|
|
|
make-html:
|
2023-01-14 03:02:10 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: pytorchlightning/pytorch_lightning:docs
|
Add `lightning_app` docs (#13656)
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* update
* update
* update
* update
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update latest docs
* remove image
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* ci
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* make
* Update .gitignore
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update .github/workflows/docs-deploy.yml
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* update
* update
* update
* update
* Update docs/source-app/_templates/theme_variables.jinja
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/api_reference/api_references.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/api_reference/api_references.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/api_reference/api_references.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/code_samples/convert_pl_to_app/train.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/core_api/lightning_app/communication_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/model_server_app/model_server_app_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/get_started/training_with_apps.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/get_started/training_with_apps.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/get_started/training_with_apps.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/hpo/hpo.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/core_api/lightning_app/communication_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/core_api/lightning_app/communication_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/github_repo_runner_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_2.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/github_repo_runner_step_4.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/model_server_app/model_server.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* update
* Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/app.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source-app/examples/github_repo_runner/app.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* update
* update
* update
* update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
* update
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2022-07-15 12:45:50 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-02-13 09:59:02 +00:00
|
|
|
pkg-name: ["lightning", "pytorch"]
|
2020-06-27 20:25:33 +00:00
|
|
|
steps:
|
2022-09-05 17:13:08 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-06-08 16:30:13 +00:00
|
|
|
with:
|
|
|
|
submodules: true
|
2022-11-04 15:36:47 +00:00
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2022-11-04 16:51:03 +00:00
|
|
|
|
2022-11-03 11:21:39 +00:00
|
|
|
- uses: aws-actions/configure-aws-credentials@v1
|
2022-11-03 19:33:54 +00:00
|
|
|
if: ${{ matrix.pkg-name != 'pytorch' }}
|
2022-11-03 11:21:39 +00:00
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_ID }}
|
|
|
|
aws-region: us-east-1
|
2022-11-04 16:51:03 +00:00
|
|
|
|
2022-11-03 11:21:39 +00:00
|
|
|
- run: aws s3 sync s3://sphinx-packages/ pypi/
|
2022-11-03 19:33:54 +00:00
|
|
|
if: ${{ matrix.pkg-name != 'pytorch' }}
|
2022-11-03 11:21:39 +00:00
|
|
|
|
2020-06-27 20:25:33 +00:00
|
|
|
# Note: This uses an internal pip API and may not always work
|
|
|
|
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
|
|
|
|
- name: Cache pip
|
2022-07-14 20:12:56 +00:00
|
|
|
uses: actions/cache@v3
|
2020-06-27 20:25:33 +00:00
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
2023-02-13 09:59:02 +00:00
|
|
|
key: docs-make-${{ hashFiles('requirements/${{ matrix.pkg-name }}/*.txt') }}
|
|
|
|
restore-keys: docs-make-
|
|
|
|
|
|
|
|
- name: adjust paths
|
|
|
|
run: |
|
|
|
|
python -c "n = '${{ matrix.pkg-name }}' ; print('DOCS_DIR=source' + {'lightning': '', 'pytorch': '-pytorch'}.get(n))" >> $GITHUB_ENV
|
|
|
|
python -c "n = '${{ matrix.pkg-name }}' ; print('REQ_DIR=' + {'lightning': 'app'}.get(n, n))" >> $GITHUB_ENV
|
2020-06-27 20:25:33 +00:00
|
|
|
|
2022-11-01 00:44:58 +00:00
|
|
|
- name: Install package & dependencies
|
2020-06-27 20:25:33 +00:00
|
|
|
run: |
|
2021-03-05 20:39:52 +00:00
|
|
|
pip --version
|
2023-02-13 09:59:02 +00:00
|
|
|
pip install -e . -U -r requirements/${{ env.REQ_DIR }}/docs.txt -f pypi -f ${TORCH_URL}
|
2020-09-30 12:37:52 +00:00
|
|
|
pip list
|
2020-06-27 20:25:33 +00:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Make Documentation
|
2023-02-13 09:59:02 +00:00
|
|
|
working-directory: ./docs/${{ env.DOCS_DIR }}
|
2023-02-27 20:14:23 +00:00
|
|
|
run: make html --debug --jobs $(nproc) SPHINXOPTS="-W --keep-going"
|
2020-06-27 20:25:33 +00:00
|
|
|
|
2023-01-04 22:05:12 +00:00
|
|
|
- name: Check External Links in Sphinx Documentation (Optional)
|
2023-02-13 09:59:02 +00:00
|
|
|
working-directory: ./docs/${{ env.DOCS_DIR }}
|
2023-02-27 20:14:23 +00:00
|
|
|
run: make linkcheck
|
2023-01-04 22:05:12 +00:00
|
|
|
continue-on-error: true
|
|
|
|
|
2020-06-27 20:25:33 +00:00
|
|
|
- name: Upload built docs
|
2022-07-12 16:34:18 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-06-27 20:25:33 +00:00
|
|
|
with:
|
2022-11-02 13:00:48 +00:00
|
|
|
name: docs-${{ matrix.pkg-name }}-${{ github.sha }}
|
2020-06-27 20:25:33 +00:00
|
|
|
path: docs/build/html/
|