From 9184a0a116e1880db3180e412e1b3b978ca703fd Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Thu, 22 Dec 2022 13:48:50 +0100 Subject: [PATCH 01/11] added sphinx build action --- .github/workflows/sphinx_build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/sphinx_build.yml diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml new file mode 100644 index 0000000..2e7ea2a --- /dev/null +++ b/.github/workflows/sphinx_build.yml @@ -0,0 +1,20 @@ +name: documentation + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + docs: + name: Build documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ammaraskar/sphinx-action@master + with: + docs-folder: "docs/" + build-command: "sphinx-build -b html . _build" \ No newline at end of file From 855ad40e07c479e0d02bd70b93579e4987e51a6e Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Thu, 22 Dec 2022 14:22:57 +0100 Subject: [PATCH 02/11] added python dependencies --- .github/workflows/sphinx_build.yml | 22 ++++++++++++++++++---- docs/requirements.txt | 5 +++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 docs/requirements.txt diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index 2e7ea2a..3ec8df6 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -13,8 +13,22 @@ jobs: name: Build documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: ammaraskar/sphinx-action@master + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3:10 + + # this action updates pip, setuptools, and wheel before install + - name: Install Python dependencies + uses: py-actions/py-dependency-install@v4 + with: + path: "docs/requirements.txt" + + - name: Trigger sphinx build + uses: ammaraskar/sphinx-action@master with: - docs-folder: "docs/" - build-command: "sphinx-build -b html . _build" \ No newline at end of file + docs-folder: "docs/" + build-command: "sphinx-build -b html . _build" \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..ac84524 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,5 @@ +numpy +scikit-learn +scipy +tensorflow +h5py From d377b51c9bf2cbe8670040ab937ad98c8963eca4 Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Thu, 22 Dec 2022 14:29:58 +0100 Subject: [PATCH 03/11] changed python version --- .github/workflows/sphinx_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index 3ec8df6..7e00c71 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3:10 + python-version: 3.10 # this action updates pip, setuptools, and wheel before install - name: Install Python dependencies From 4eafc4379d74e8cabb1796af48f79bbe847ff804 Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Thu, 22 Dec 2022 14:32:53 +0100 Subject: [PATCH 04/11] Update sphinx_build.yml --- .github/workflows/sphinx_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index 7e00c71..4aed8d7 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.10 + python-version: '3.10' # this action updates pip, setuptools, and wheel before install - name: Install Python dependencies @@ -31,4 +31,4 @@ jobs: uses: ammaraskar/sphinx-action@master with: docs-folder: "docs/" - build-command: "sphinx-build -b html . _build" \ No newline at end of file + build-command: "sphinx-build -b html . _build" From bf83764b1f06592d3fabec0263c34f00dd201034 Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Thu, 22 Dec 2022 14:40:18 +0100 Subject: [PATCH 05/11] removed amaraskar/sphinx-action, redundant --- .github/workflows/sphinx_build.yml | 10 +++++----- docs/requirements.txt | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index 4aed8d7..992a8f3 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -27,8 +27,8 @@ jobs: with: path: "docs/requirements.txt" - - name: Trigger sphinx build - uses: ammaraskar/sphinx-action@master - with: - docs-folder: "docs/" - build-command: "sphinx-build -b html . _build" + - name: Trigger Sphinx build + run: + cd docs + make html + diff --git a/docs/requirements.txt b/docs/requirements.txt index ac84524..7e3e0f7 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,3 +3,5 @@ scikit-learn scipy tensorflow h5py +sphinx +sphinx-rtd-theme \ No newline at end of file From de622a4035537dda92beaaa93239b2731e5437e8 Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Thu, 22 Dec 2022 14:43:26 +0100 Subject: [PATCH 06/11] Update sphinx_build.yml added | --- .github/workflows/sphinx_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index 992a8f3..ed1dbaf 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -28,7 +28,7 @@ jobs: path: "docs/requirements.txt" - name: Trigger Sphinx build - run: + run: | cd docs make html From 21131b836918c9c5467d4cb0fa7c665a84360c7a Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Tue, 10 Jan 2023 11:40:51 +0100 Subject: [PATCH 07/11] Update .github/workflows/sphinx_build.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Malte Lüken --- .github/workflows/sphinx_build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index ed1dbaf..a5a7887 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -24,8 +24,7 @@ jobs: # this action updates pip, setuptools, and wheel before install - name: Install Python dependencies uses: py-actions/py-dependency-install@v4 - with: - path: "docs/requirements.txt" + run: pip install .[dev] - name: Trigger Sphinx build run: | From 4a847b5bea04004f032213b88fe8cc8dd910eb4a Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Tue, 10 Jan 2023 11:50:44 +0100 Subject: [PATCH 08/11] Update setup.py --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 53d5760..c484935 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,9 @@ def read(fname): "publishing": [ "build", "twine", - "wheel" + "wheel", + "sphinx", + "sphinx-rtd-theme" ] } ) From 8e5b4349f46926fc4e44f50e96ece02f2f1b5186 Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Tue, 10 Jan 2023 11:53:03 +0100 Subject: [PATCH 09/11] Update sphinx_build.yml --- .github/workflows/sphinx_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index a5a7887..c124e05 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -24,7 +24,7 @@ jobs: # this action updates pip, setuptools, and wheel before install - name: Install Python dependencies uses: py-actions/py-dependency-install@v4 - run: pip install .[dev] + run: pip install .[publishing] - name: Trigger Sphinx build run: | From ec14a579c2b059bc6bade11222a59af4cb9dfedb Mon Sep 17 00:00:00 2001 From: Olga Lyashevska Date: Tue, 10 Jan 2023 12:03:46 +0100 Subject: [PATCH 10/11] Delete requirements.txt Not needed anymore, using from publishing --- docs/requirements.txt | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 7e3e0f7..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -numpy -scikit-learn -scipy -tensorflow -h5py -sphinx -sphinx-rtd-theme \ No newline at end of file From d2830e92d9054b895196b0f2fd02c4331bd29346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20L=C3=BCken?= Date: Tue, 10 Jan 2023 12:14:23 +0100 Subject: [PATCH 11/11] Remove 'uses' in docs action --- .github/workflows/sphinx_build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinx_build.yml b/.github/workflows/sphinx_build.yml index c124e05..033661b 100644 --- a/.github/workflows/sphinx_build.yml +++ b/.github/workflows/sphinx_build.yml @@ -23,8 +23,9 @@ jobs: # this action updates pip, setuptools, and wheel before install - name: Install Python dependencies - uses: py-actions/py-dependency-install@v4 - run: pip install .[publishing] + run: | + pip install --upgrade pip setuptools wheel + pip install .[publishing] - name: Trigger Sphinx build run: |