From f1ac1383e06c6a8563c733dd0949b80ddf056ee4 Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 24 Jan 2022 17:45:26 -0500 Subject: [PATCH 1/9] Add make tutorial to docs CI workflow --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fd67dd5d7..c314be2d9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,7 @@ jobs: run: | make docs make doctest + make tutorial unit: runs-on: ubuntu-20.04 needs: docs From b44bf589c493f0f736c000c0194aefd2f877c461 Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 24 Jan 2022 18:00:27 -0500 Subject: [PATCH 2/9] docs requirements --- docs/requirements.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index da561a25c1..fd45fd94dc 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,3 +7,6 @@ opt_einsum>=2.3.2 pyro-api>=0.1.1 tqdm>=4.36 funsor[torch] +nbformat +nbsphinx>=0.3.2 +nbstripout From 42d9ac0ba99104ccbe9df3743bea05ebc951f3c5 Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 24 Jan 2022 18:33:57 -0500 Subject: [PATCH 3/9] requirements --- docs/requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index fd45fd94dc..f273d47e60 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -10,3 +10,5 @@ funsor[torch] nbformat nbsphinx>=0.3.2 nbstripout +pypandoc +ninja From 191df8ac37ca57c553eacb983729adf5fb4d6c56 Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 19 Dec 2022 14:20:43 -0500 Subject: [PATCH 4/9] update --- .github/workflows/ci.yml | 8 +++++++- docs/requirements.txt | 5 ----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c314be2d9d..a9ff0c540f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,12 +57,18 @@ jobs: pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html pip install .[test] pip install -r docs/requirements.txt + # requirements for tutorials + pip install nbformat + pip install nbsphinx>=0.3.2 + pip install nbstripout + pip install pypandoc + pip install ninja pip freeze - name: Build docs and run doctest run: | make docs make doctest - make tutorial + SPHINXOPTS="-E -W" make tutorial unit: runs-on: ubuntu-20.04 needs: docs diff --git a/docs/requirements.txt b/docs/requirements.txt index f273d47e60..da561a25c1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,8 +7,3 @@ opt_einsum>=2.3.2 pyro-api>=0.1.1 tqdm>=4.36 funsor[torch] -nbformat -nbsphinx>=0.3.2 -nbstripout -pypandoc -ninja From bc1b06bad0ec7a90d860c21cb05544a545f39c8b Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 19 Dec 2022 14:28:08 -0500 Subject: [PATCH 5/9] install pandoc in docs ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9ff0c540f..572893ebb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: run: | sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update - sudo apt-get install gcc-8 g++-8 ninja-build graphviz + sudo apt-get install gcc-8 g++-8 ninja-build graphviz pandoc python -m pip install --upgrade pip wheel 'setuptools!=58.5.*' # Keep track of pyro-api master branch pip install https://github.com/pyro-ppl/pyro-api/archive/master.zip From d013ba017e437327bff4bd175289f10b96758e28 Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 19 Dec 2022 14:29:27 -0500 Subject: [PATCH 6/9] merge conflict --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 572893ebb9..40159b8622 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: run: | sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update - sudo apt-get install gcc-8 g++-8 ninja-build graphviz pandoc + sudo apt-get install gcc-8 g++-8 ninja-build graphviz python -m pip install --upgrade pip wheel 'setuptools!=58.5.*' # Keep track of pyro-api master branch pip install https://github.com/pyro-ppl/pyro-api/archive/master.zip @@ -58,6 +58,7 @@ jobs: pip install .[test] pip install -r docs/requirements.txt # requirements for tutorials + sudo apt-get install pandoc pip install nbformat pip install nbsphinx>=0.3.2 pip install nbstripout From e7c680ce71a60940d5adbf04d4631882f9a8f18f Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 19 Dec 2022 15:24:08 -0500 Subject: [PATCH 7/9] dont fail on warnings for tutorials --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cc0e941c8..b49af2f6dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: pip install torch==1.11.0+cpu torchvision==0.12.0+cpu -f https://download.pytorch.org/whl/torch_stable.html pip install .[test] pip install -r docs/requirements.txt - # requirements for tutorials + # requirements for tutorials (from .[dev]) sudo apt-get install pandoc pip install nbformat pip install nbsphinx>=0.3.2 @@ -69,7 +69,7 @@ jobs: run: | make docs make doctest - SPHINXOPTS="-E -W" make tutorial + SPHINXOPTS="-E" make tutorial unit: runs-on: ubuntu-20.04 needs: docs From 489375dd2135c83209b0eda973f45d0d64e4bb9d Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 19 Dec 2022 15:35:43 -0500 Subject: [PATCH 8/9] create separate stage --- .github/workflows/ci.yml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b49af2f6dc..c6d34955f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,34 @@ jobs: pip install torch==1.11.0+cpu torchvision==0.12.0+cpu -f https://download.pytorch.org/whl/torch_stable.html pip install .[test] pip install -r docs/requirements.txt + pip freeze + - name: Build docs and run doctest + run: | + make docs + make doctest + tutorials-html: + runs-on: ubuntu-20.04 + needs: lint + strategy: + matrix: + python-version: [3.7] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo apt-get update + sudo apt-get install gcc-8 g++-8 ninja-build graphviz pandoc + python -m pip install --upgrade pip wheel 'setuptools!=58.5.*,<60' + # Keep track of pyro-api master branch + pip install https://github.com/pyro-ppl/pyro-api/archive/master.zip + pip install torch==1.11.0+cpu torchvision==0.12.0+cpu -f https://download.pytorch.org/whl/torch_stable.html + pip install .[test] + pip install -r docs/requirements.txt # requirements for tutorials (from .[dev]) sudo apt-get install pandoc pip install nbformat @@ -65,10 +93,8 @@ jobs: pip install pypandoc pip install ninja pip freeze - - name: Build docs and run doctest + - name: Build HTML from tutorials run: | - make docs - make doctest SPHINXOPTS="-E" make tutorial unit: runs-on: ubuntu-20.04 From 4ba3734bdf28a75ab0f873986e23275d382185b9 Mon Sep 17 00:00:00 2001 From: Eli Date: Mon, 19 Dec 2022 15:41:04 -0500 Subject: [PATCH 9/9] examples stage should depend on html --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6d34955f0..faf990552c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,7 +130,7 @@ jobs: COVERALLS_FLAG_NAME: ${{ matrix.test-name }} examples: runs-on: ubuntu-20.04 - needs: docs + needs: [docs, tutorials-html] strategy: matrix: python-version: [3.7]