From b818cf7c5bb815ad39636994ed98026c61c41430 Mon Sep 17 00:00:00 2001 From: Arina Danilina Date: Tue, 11 Jul 2023 16:54:19 +0200 Subject: [PATCH 01/29] test example CI --- .github/workflows/test-examples.yml | 57 +++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/test-examples.yml diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml new file mode 100644 index 000000000..fba4c494b --- /dev/null +++ b/.github/workflows/test-examples.yml @@ -0,0 +1,57 @@ +name: Test examples + +on: + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -e {0} # -e to fail on error + + strategy: + fail-fast: false + matrix: + example: + - 100_push_pull.ipynb + os: + - ubuntu-latest + python: + - "3.10" + + env: + OS: ${{ matrix.os }} + PYTHON: ${{ matrix.python }} + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + cache: "pip" + cache-dependency-path: "**/pyproject.toml" + submodules: true + + - name: Install test dependencies + run: | + python -m pip install --upgrade pip wheel + - name: Install dependencies + run: | + pip install ".[doc]" + pip install jupytext + - name: Test + env: + MPLBACKEND: agg + PLATFORM: ${{ matrix.os }} + DISPLAY: :42 + run: | + jupytext -k python3 --execute ../../docs/notebooks/examples/plotting/${{ matrix.example }} From 4a6be3711ebd4e2b0977b7fc37d50d945e8706ef Mon Sep 17 00:00:00 2001 From: giovp Date: Tue, 11 Jul 2023 20:10:11 +0200 Subject: [PATCH 02/29] try to correct path --- .github/workflows/test-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index fba4c494b..7151d6984 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -54,4 +54,4 @@ jobs: PLATFORM: ${{ matrix.os }} DISPLAY: :42 run: | - jupytext -k python3 --execute ../../docs/notebooks/examples/plotting/${{ matrix.example }} + jupytext -k python3 --execute ./docs/notebooks/examples/plotting/${{ matrix.example }} From a497dff25c84adf5f183a002917979665fa8e085 Mon Sep 17 00:00:00 2001 From: giovp Date: Tue, 11 Jul 2023 20:34:10 +0200 Subject: [PATCH 03/29] update --- .github/workflows/test-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 7151d6984..51f92ea16 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -54,4 +54,4 @@ jobs: PLATFORM: ${{ matrix.os }} DISPLAY: :42 run: | - jupytext -k python3 --execute ./docs/notebooks/examples/plotting/${{ matrix.example }} + jupytext --execute ./docs/notebooks/examples/plotting/${{ matrix.example }} From b1a09790535fe058ce6eac8361fad300463aabd9 Mon Sep 17 00:00:00 2001 From: giovp Date: Tue, 11 Jul 2023 21:13:36 +0200 Subject: [PATCH 04/29] update test --- .github/workflows/test-examples.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 51f92ea16..de07e0621 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -20,8 +20,6 @@ jobs: strategy: fail-fast: false matrix: - example: - - 100_push_pull.ipynb os: - ubuntu-latest python: @@ -54,4 +52,4 @@ jobs: PLATFORM: ${{ matrix.os }} DISPLAY: :42 run: | - jupytext --execute ./docs/notebooks/examples/plotting/${{ matrix.example }} + jupytext --execute ./docs/notebooks/examples/plotting/500_passing_marginals.ipynb From 4b84ebaf0c124792b59897baaf0b4c4a916ba405 Mon Sep 17 00:00:00 2001 From: giovp Date: Tue, 11 Jul 2023 21:22:34 +0200 Subject: [PATCH 05/29] add to tox --- .github/workflows/test-examples.yml | 35 +++++++---------------------- pyproject.toml | 10 +++++++++ 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index de07e0621..fc7e986d2 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -1,4 +1,4 @@ -name: Test examples +name: Test on: push: @@ -13,21 +13,11 @@ concurrency: jobs: test: runs-on: ${{ matrix.os }} - defaults: - run: - shell: bash -e {0} # -e to fail on error - strategy: fail-fast: false matrix: - os: - - ubuntu-latest - python: - - "3.10" - - env: - OS: ${{ matrix.os }} - PYTHON: ${{ matrix.python }} + os: [ubuntu-latest] + python: ["3.10"] steps: - uses: actions/checkout@v3 @@ -35,21 +25,12 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - cache: "pip" - cache-dependency-path: "**/pyproject.toml" - submodules: true - - name: Install test dependencies + - name: Install pip dependencies run: | - python -m pip install --upgrade pip wheel - - name: Install dependencies - run: | - pip install ".[doc]" - pip install jupytext + python -m pip install --upgrade pip + pip install tox + - name: Test - env: - MPLBACKEND: agg - PLATFORM: ${{ matrix.os }} - DISPLAY: :42 run: | - jupytext --execute ./docs/notebooks/examples/plotting/500_passing_marginals.ipynb + tox -e py-${{ matrix.python }} examples-docs diff --git a/pyproject.toml b/pyproject.toml index f14e6f6fb..5edd55076 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -290,6 +290,16 @@ commands = # TODO(michalk8): uncomment after https://github.com/theislab/moscot/issues/490 # make spelling {posargs} +[testenv:examples-docs] +description = Test examples in docs. +deps = +extras = docs +ignore_errors = true +pass_env = PYENCHANT_LIBRARY_PATH +changedir = {tox_root}{/}docs +commands = + jupytext --execute ./docs/notebooks/examples/plotting/500_passing_marginals.ipynb + [testenv:clean-docs] description = Remove the documentation. deps = From 00c9ffb487bd58a8a9b6a7afd9d8d7f637a20e0d Mon Sep 17 00:00:00 2001 From: giovp Date: Tue, 11 Jul 2023 21:59:29 +0200 Subject: [PATCH 06/29] rename --- .github/workflows/test-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index fc7e986d2..11b39e425 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -1,4 +1,4 @@ -name: Test +name: Test examples on: push: From 97f50df6d2676d444695391eab2fb9809ef0a0bb Mon Sep 17 00:00:00 2001 From: giovp Date: Tue, 11 Jul 2023 22:01:45 +0200 Subject: [PATCH 07/29] fix tox --- .github/workflows/test-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 11b39e425..374df30c9 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -33,4 +33,4 @@ jobs: - name: Test run: | - tox -e py-${{ matrix.python }} examples-docs + tox examples-docs -e py-${{ matrix.python }} From 87c37b7488c212f368d9ee1ebdbac2512556f5b8 Mon Sep 17 00:00:00 2001 From: giovp Date: Tue, 11 Jul 2023 22:15:25 +0200 Subject: [PATCH 08/29] add to tox --- .github/workflows/test-examples.yml | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 374df30c9..b1c080eb0 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -33,4 +33,4 @@ jobs: - name: Test run: | - tox examples-docs -e py-${{ matrix.python }} + tox -e examples-docs diff --git a/pyproject.toml b/pyproject.toml index 5edd55076..bf3b46899 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -294,11 +294,11 @@ commands = description = Test examples in docs. deps = extras = docs -ignore_errors = true pass_env = PYENCHANT_LIBRARY_PATH +allowlist_externals = jupytext changedir = {tox_root}{/}docs commands = - jupytext --execute ./docs/notebooks/examples/plotting/500_passing_marginals.ipynb + jupytext --execute ./notebooks/examples/plotting/500_passing_marginals.ipynb [testenv:clean-docs] description = Remove the documentation. From f5e033573f98389485c04b1e3e2d9541f1f5b089 Mon Sep 17 00:00:00 2001 From: giovp Date: Wed, 12 Jul 2023 15:17:11 +0200 Subject: [PATCH 09/29] update --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f4f237d1c..5d03b0e5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -298,7 +298,7 @@ pass_env = PYENCHANT_LIBRARY_PATH allowlist_externals = jupytext changedir = {tox_root}{/}docs commands = - jupytext --execute ./notebooks/examples/plotting/500_passing_marginals.ipynb + jupytext -k python3 --execute ./notebooks/examples/plotting/500_passing_marginals.ipynb [testenv:clean-docs] description = Remove the documentation. From 025477145b656e87d9d9ebe741f1bce7cf2857e7 Mon Sep 17 00:00:00 2001 From: giovp Date: Wed, 12 Jul 2023 15:59:45 +0200 Subject: [PATCH 10/29] update path --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5d03b0e5a..136711339 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -294,11 +294,10 @@ commands = description = Test examples in docs. deps = extras = docs -pass_env = PYENCHANT_LIBRARY_PATH allowlist_externals = jupytext changedir = {tox_root}{/}docs commands = - jupytext -k python3 --execute ./notebooks/examples/plotting/500_passing_marginals.ipynb + jupytext --execute ./notebooks/examples/problems/500_passing_marginals.ipynb [testenv:clean-docs] description = Remove the documentation. From c87d2e0540b0dbc424067f89a3b45790f607c5aa Mon Sep 17 00:00:00 2001 From: giovp Date: Wed, 12 Jul 2023 16:08:21 +0200 Subject: [PATCH 11/29] add kernel --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 136711339..6a99cb4c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -297,7 +297,7 @@ extras = docs allowlist_externals = jupytext changedir = {tox_root}{/}docs commands = - jupytext --execute ./notebooks/examples/problems/500_passing_marginals.ipynb + jupytext -k python3 --execute ./notebooks/examples/problems/500_passing_marginals.ipynb [testenv:clean-docs] description = Remove the documentation. From 8580acdcfb199a77461bddf2a9f5dab1ddecd483 Mon Sep 17 00:00:00 2001 From: giovp Date: Wed, 12 Jul 2023 16:13:25 +0200 Subject: [PATCH 12/29] fix deps --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6a99cb4c6..fc4de9d24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -292,7 +292,6 @@ commands = [testenv:examples-docs] description = Test examples in docs. -deps = extras = docs allowlist_externals = jupytext changedir = {tox_root}{/}docs From f57fd60c2727657a96958d3b718aa2cf2da1a28d Mon Sep 17 00:00:00 2001 From: giovp Date: Wed, 12 Jul 2023 16:23:37 +0200 Subject: [PATCH 13/29] readd deps --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fc4de9d24..bf81b005e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -278,7 +278,6 @@ commands = [testenv:lint-docs] description = Lint the documentation. -deps = extras = docs ignore_errors = true allowlist_externals = make @@ -292,6 +291,7 @@ commands = [testenv:examples-docs] description = Test examples in docs. +deps = extras = docs allowlist_externals = jupytext changedir = {tox_root}{/}docs From 5dc07d16505621e5a68b2e73ae0c1fbfd3003e48 Mon Sep 17 00:00:00 2001 From: giovp Date: Wed, 12 Jul 2023 16:27:36 +0200 Subject: [PATCH 14/29] add env --- .github/workflows/test-examples.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index b1c080eb0..b3eb8435c 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -31,6 +31,10 @@ jobs: python -m pip install --upgrade pip pip install tox - - name: Test + - name: Test examples + env: + MPLBACKEND: agg + PLATFORM: ${{ matrix.os }} + DISPLAY: :42 run: | tox -e examples-docs From fe908aad64e27731d2fe4cad16423545de9f1415 Mon Sep 17 00:00:00 2001 From: giovp Date: Wed, 12 Jul 2023 16:43:18 +0200 Subject: [PATCH 15/29] update --- .github/workflows/test-examples.yml | 4 ---- pyproject.toml | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index b3eb8435c..83ad3c3bb 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -32,9 +32,5 @@ jobs: pip install tox - name: Test examples - env: - MPLBACKEND: agg - PLATFORM: ${{ matrix.os }} - DISPLAY: :42 run: | tox -e examples-docs diff --git a/pyproject.toml b/pyproject.toml index bf81b005e..465a112c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -291,12 +291,11 @@ commands = [testenv:examples-docs] description = Test examples in docs. -deps = extras = docs allowlist_externals = jupytext changedir = {tox_root}{/}docs commands = - jupytext -k python3 --execute ./notebooks/examples/problems/500_passing_marginals.ipynb + jupytext --execute ./notebooks/examples/problems/500_passing_marginals.ipynb [testenv:clean-docs] description = Remove the documentation. From 689c41465b85f1f98273c75432ce8c4079a03e67 Mon Sep 17 00:00:00 2001 From: giovp Date: Sun, 16 Jul 2023 21:20:11 +0200 Subject: [PATCH 16/29] update ci --- .github/workflows/test-examples.yml | 1 + pyproject.toml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 83ad3c3bb..8f1616b32 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -25,6 +25,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} + submodules: true - name: Install pip dependencies run: | diff --git a/pyproject.toml b/pyproject.toml index 465a112c2..e4f3ae679 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -291,6 +291,8 @@ commands = [testenv:examples-docs] description = Test examples in docs. +use_develop = true +deps = extras = docs allowlist_externals = jupytext changedir = {tox_root}{/}docs From 8413ac835cbd52c23d69489999c9263531d3d31e Mon Sep 17 00:00:00 2001 From: giovp Date: Sun, 16 Jul 2023 21:25:00 +0200 Subject: [PATCH 17/29] add submodules --- .github/workflows/test-examples.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 8f1616b32..9d77d340c 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -21,11 +21,12 @@ jobs: steps: - uses: actions/checkout@v3 + with: + submodules: true - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - submodules: true - name: Install pip dependencies run: | From a8bc83b9cd931a1ff370cd464f7ee327ee8115e9 Mon Sep 17 00:00:00 2001 From: giovp Date: Sun, 16 Jul 2023 21:39:24 +0200 Subject: [PATCH 18/29] add recursive --- .github/workflows/test-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 9d77d340c..60154f9a1 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: true + submodules: recursive - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v4 with: From cfb500da25a526820bb48bcef89d90f3c27fe8f2 Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Mon, 4 Mar 2024 14:35:51 +0100 Subject: [PATCH 19/29] change command to build the docs --- .github/workflows/test-examples.yml | 2 +- pyproject.toml | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 60154f9a1..c44fcabcd 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -35,4 +35,4 @@ jobs: - name: Test examples run: | - tox -e examples-docs + tox -e build-docs diff --git a/pyproject.toml b/pyproject.toml index e52a49150..65ca913fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -293,15 +293,14 @@ commands = # TODO(michalk8): uncomment after https://github.com/theislab/moscot/issues/490 # make spelling {posargs} -[testenv:examples-docs] -description = Test examples in docs. +[testenv:build-docs] +description = Build the docs and run the notebooks. use_develop = true deps = extras = docs -allowlist_externals = jupytext changedir = {tox_root}{/}docs commands = - jupytext --execute ./notebooks/examples/problems/500_passing_marginals.ipynb + sphinx-build -b html . _build/html -D nb_execution_mode=force [testenv:clean-docs] description = Remove the documentation. From 2b04abbe812e7a6095afdff722b23ecd00862ef0 Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Mon, 4 Mar 2024 14:40:47 +0100 Subject: [PATCH 20/29] new name just to test CI --- .github/workflows/test-examples.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index c44fcabcd..60154f9a1 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -35,4 +35,4 @@ jobs: - name: Test examples run: | - tox -e build-docs + tox -e examples-docs diff --git a/pyproject.toml b/pyproject.toml index 65ca913fb..ec470732e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -293,7 +293,7 @@ commands = # TODO(michalk8): uncomment after https://github.com/theislab/moscot/issues/490 # make spelling {posargs} -[testenv:build-docs] +[testenv:examples-docs] description = Build the docs and run the notebooks. use_develop = true deps = From d6c9eb28de0ccc04979900e2cd80ee7856e01eff Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Mon, 4 Mar 2024 14:55:21 +0100 Subject: [PATCH 21/29] specify kernel --- .github/workflows/test-examples.yml | 5 ++++- docs/conf.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 60154f9a1..1d2583770 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -32,7 +32,10 @@ jobs: run: | python -m pip install --upgrade pip pip install tox - + - name: Install Jupyter Kernel + run: | + python -m pip install ipykernel + python -m ipykernel install --user --name=github-actions-kernel --display-name="Python ${matrix.python} (GitHub Actions)" - name: Test examples run: | tox -e examples-docs diff --git a/docs/conf.py b/docs/conf.py index 5fa891ac2..6bf945dd8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -163,3 +163,5 @@ }, ], } + +nbsphinx_kernel_name = 'github-actions-kernel' From 5cd729c63160a7da3f5235ffafc53fa62c04d347 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:56:06 +0000 Subject: [PATCH 22/29] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 6bf945dd8..e91f4959a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -164,4 +164,4 @@ ], } -nbsphinx_kernel_name = 'github-actions-kernel' +nbsphinx_kernel_name = "github-actions-kernel" From 5187384217434805f5a00cc05feec922be8a4748 Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Mon, 4 Mar 2024 15:02:04 +0100 Subject: [PATCH 23/29] remove display name --- .github/workflows/test-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 1d2583770..e57320657 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -35,7 +35,7 @@ jobs: - name: Install Jupyter Kernel run: | python -m pip install ipykernel - python -m ipykernel install --user --name=github-actions-kernel --display-name="Python ${matrix.python} (GitHub Actions)" + python -m ipykernel install --user --name=github-actions-kernel - name: Test examples run: | tox -e examples-docs From a7d93775d11c86f616d75817a817b6441e684123 Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Mon, 4 Mar 2024 15:11:21 +0100 Subject: [PATCH 24/29] rename kernel --- .github/workflows/test-examples.yml | 2 +- docs/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index e57320657..92c6a3f0b 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -35,7 +35,7 @@ jobs: - name: Install Jupyter Kernel run: | python -m pip install ipykernel - python -m ipykernel install --user --name=github-actions-kernel + python -m ipykernel install --user --name=moscot - name: Test examples run: | tox -e examples-docs diff --git a/docs/conf.py b/docs/conf.py index e91f4959a..8d06e96eb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -164,4 +164,4 @@ ], } -nbsphinx_kernel_name = "github-actions-kernel" +nbsphinx_kernel_name = "moscot" From a426a54ed54fbed03b86c167947c5e2d16795553 Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Mon, 4 Mar 2024 18:32:01 +0100 Subject: [PATCH 25/29] fix tox env --- .github/workflows/test-examples.yml | 4 ---- pyproject.toml | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index 92c6a3f0b..deedc6aca 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -32,10 +32,6 @@ jobs: run: | python -m pip install --upgrade pip pip install tox - - name: Install Jupyter Kernel - run: | - python -m pip install ipykernel - python -m ipykernel install --user --name=moscot - name: Test examples run: | tox -e examples-docs diff --git a/pyproject.toml b/pyproject.toml index ec470732e..b38df13b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -296,11 +296,12 @@ commands = [testenv:examples-docs] description = Build the docs and run the notebooks. use_develop = true -deps = +deps = ipykernel extras = docs changedir = {tox_root}{/}docs commands = - sphinx-build -b html . _build/html -D nb_execution_mode=force + python -m ipykernel install --user --name=moscot + sphinx-build -b html . _build/html -D nb_execution_mode=force -D nbsphinx_kernel_name=moscot [testenv:clean-docs] description = Remove the documentation. From 05d2e7b37798f149f7209a9fe271e23c085172af Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Thu, 7 Mar 2024 13:55:19 +0100 Subject: [PATCH 26/29] use jupytext --- .github/workflows/test-examples.yml | 4 ++++ docs/conf.py | 2 -- pyproject.toml | 11 ++++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-examples.yml b/.github/workflows/test-examples.yml index deedc6aca..3c05d35fc 100644 --- a/.github/workflows/test-examples.yml +++ b/.github/workflows/test-examples.yml @@ -33,5 +33,9 @@ jobs: python -m pip install --upgrade pip pip install tox - name: Test examples + env: + MPLBACKEND: agg + PLATFORM: ${{ matrix.os }} + DISPLAY: :42 run: | tox -e examples-docs diff --git a/docs/conf.py b/docs/conf.py index 8d06e96eb..5fa891ac2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -163,5 +163,3 @@ }, ], } - -nbsphinx_kernel_name = "moscot" diff --git a/pyproject.toml b/pyproject.toml index b38df13b2..b37782be6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -294,14 +294,19 @@ commands = # make spelling {posargs} [testenv:examples-docs] -description = Build the docs and run the notebooks. +description = Run the notebooks. use_develop = true -deps = ipykernel +deps = + ipykernel + jupytext + nbconvert extras = docs changedir = {tox_root}{/}docs commands = python -m ipykernel install --user --name=moscot - sphinx-build -b html . _build/html -D nb_execution_mode=force -D nbsphinx_kernel_name=moscot + jupytext -k moscot --execute notebooks/examples/plotting/*ipynb + jupytext -k moscot --execute notebooks/examples/problems/*ipynb + jupytext -k moscot --execute notebooks/examples/solvers/*ipynb [testenv:clean-docs] description = Remove the documentation. From 5ab4ed4b589ffca6831e66a541f3866e16289a8a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:57:05 +0000 Subject: [PATCH 27/29] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b37782be6..7e584025e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -296,7 +296,7 @@ commands = [testenv:examples-docs] description = Run the notebooks. use_develop = true -deps = +deps = ipykernel jupytext nbconvert From 20a668444d594cf61b9e946817e2da131ae2feb0 Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Thu, 7 Mar 2024 14:24:56 +0100 Subject: [PATCH 28/29] print notebook name --- pyproject.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7e584025e..f8e833829 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -294,19 +294,20 @@ commands = # make spelling {posargs} [testenv:examples-docs] +allowlist_externals = bash description = Run the notebooks. use_develop = true -deps = +deps = ipykernel jupytext nbconvert + leidenalg extras = docs changedir = {tox_root}{/}docs commands = python -m ipykernel install --user --name=moscot - jupytext -k moscot --execute notebooks/examples/plotting/*ipynb - jupytext -k moscot --execute notebooks/examples/problems/*ipynb - jupytext -k moscot --execute notebooks/examples/solvers/*ipynb + bash -c "for nb in notebooks/examples/plotting/*.ipynb notebooks/examples/problems/*ipynb notebooks/examples/solvers/*ipynb; do echo Running $nb; jupytext -k moscot --execute $nb; done" + [testenv:clean-docs] description = Remove the documentation. From a32b0ffa3ac61f1a3554ae44ca920b9f8750eb5d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:25:39 +0000 Subject: [PATCH 29/29] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f8e833829..3190970f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -297,7 +297,7 @@ commands = allowlist_externals = bash description = Run the notebooks. use_develop = true -deps = +deps = ipykernel jupytext nbconvert