From b1c42b3918512588eb9ea1d86c882bdd65a4ae4b Mon Sep 17 00:00:00 2001 From: Rasmus Oersoe Date: Fri, 19 Apr 2024 10:27:07 +0200 Subject: [PATCH 1/3] update documentation workflow --- .github/workflows/docs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e7e0f83d8..320780b5b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,9 +22,6 @@ jobs: - name: Build documentation run: | cd docs - python parse_about.py -i ../paper/paper.md -o source/about.md - python parse_install.py -i ../README.md -o source/install.md - python parse_contributing.py -i ../CONTRIBUTING.md -o source/contribute.md make clean sphinx-apidoc \ --module-first \ From df4ca6e1f5d82f9d1b0e6ebd9179b3059c7b02ab Mon Sep 17 00:00:00 2001 From: Rasmus Oersoe Date: Fri, 19 Apr 2024 10:43:14 +0200 Subject: [PATCH 2/3] update names of workflows to be more transparent, add doc dryrun on PR --- .github/workflows/build.yml | 23 ++++++++++++++++++++++- .github/workflows/docker.yml | 2 +- .github/workflows/docs.yml | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 37c6e47d5..08cd72294 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -144,4 +144,25 @@ jobs: set -o pipefail # To propagate exit code from pytest coverage run --source=graphnet -m pytest tests/ --ignore=tests/data/ --ignore=tests/deployment/ --ignore=tests/examples/ --ignore=tests/utilities coverage run -a --source=graphnet -m pytest tests/utilities - coverage report -m \ No newline at end of file + coverage report -m + + docs: + name: Check that documentation compiles + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install package + uses: ./.github/actions/install + - name: Build documentation + run: | + cd docs + make clean + sphinx-apidoc \ + --module-first \ + --separate \ + --force \ + -d 2 \ + --templatedir=source/_templates/ \ + -o source/api ../src/ + sed -i "2s/.*/API/" source/api/graphnet.rst + make html diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 09cb04bf8..063fe1a76 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,7 +12,7 @@ env: jobs: docker: - name: Build and publish + name: Build and Publish Docker Image if: github.repository == 'graphnet-team/graphnet' runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 320780b5b..69e8efdd1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,7 +13,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: docs: - name: Build and publish + name: Build and publish Documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From ada9dde227c373585e3df9c0a8cfda8ce4fb5482 Mon Sep 17 00:00:00 2001 From: Rasmus Oersoe Date: Fri, 19 Apr 2024 10:44:02 +0200 Subject: [PATCH 3/3] update doc dryrun name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08cd72294..7920c722e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -147,7 +147,7 @@ jobs: coverage report -m docs: - name: Check that documentation compiles + name: Documentation Compilation runs-on: ubuntu-latest steps: - uses: actions/checkout@v3