From c5d24bede2c5f4653e61d8ef972dcbb501cce0c1 Mon Sep 17 00:00:00 2001 From: Corentin Carton de Wiart Date: Mon, 14 Oct 2024 14:12:27 +0100 Subject: [PATCH 1/2] fix docs and added docs test in CI --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ docs/content/api-reference.rst | 8 ++++++++ docs/environment.yml | 1 + pyflow/__init__.py | 1 + 4 files changed, 32 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd25111..3f43595 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,28 @@ jobs: - run: black --check . - run: flake8 . + docs: + name: docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: test + environment-file: docs/environment.yml + python-version: 3.8 + auto-activate-base: false + - name: Conda check + shell: bash -l {0} + run: | + conda info + conda list + - name: Install pyflow and docs + shell: bash -l {0} # required to load conda I think + run: | + cd docs + make html + setup: name: setup runs-on: ubuntu-latest diff --git a/docs/content/api-reference.rst b/docs/content/api-reference.rst index 50d2372..d384f16 100644 --- a/docs/content/api-reference.rst +++ b/docs/content/api-reference.rst @@ -49,6 +49,14 @@ Variable .. autoclass:: pyflow.Edit +GeneratedVariable +~~~~~~~~~~~~~~~~~ + +.. _GeneratedVariable: + +.. autoclass:: pyflow.GeneratedVariable + + .. _Trigger: Trigger diff --git a/docs/environment.yml b/docs/environment.yml index 8b75fd8..5c13735 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -11,6 +11,7 @@ dependencies: - requests - pytest - pygraphviz + - pandoc - pip: - ipykernel - nbsphinx diff --git a/pyflow/__init__.py b/pyflow/__init__.py index 10d2f97..d7c962e 100644 --- a/pyflow/__init__.py +++ b/pyflow/__init__.py @@ -11,6 +11,7 @@ Defstatus, Edit, Event, + GeneratedVariable, InLimit, Inlimit, Label, From 752bccf406d85d2765d68bcfa672181ee9d8d56c Mon Sep 17 00:00:00 2001 From: Corentin Carton de Wiart Date: Mon, 14 Oct 2024 14:16:28 +0100 Subject: [PATCH 2/2] debug docs action --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f43595..676c362 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: - name: Install pyflow and docs shell: bash -l {0} # required to load conda I think run: | + python -m pip install . cd docs make html