From 12c68bdcf025b31ac3b46bc3274aa8c291eee2a8 Mon Sep 17 00:00:00 2001 From: Teresia Olsson Date: Sat, 12 Sep 2026 17:51:30 +0200 Subject: [PATCH 1/5] Update requirements to use latest release. --- docs/requirements.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 7c24842..d6a5769 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ -pyaml-test-lattice==0.1.0a2 -git+https://github.com/python-accelerator-middle-layer/pyaml.git@main -pyaml-cs-oa[tango] @ git+https://github.com/python-accelerator-middle-layer/pyaml-cs-oa.git@main \ No newline at end of file +pyaml +pyaml-cs-oa[tango,epics] +tango-pyaml +pyaml-test-lattice \ No newline at end of file From ba50969c86c173ff62b73cda9a7054511ef7ab28 Mon Sep 17 00:00:00 2001 From: Teresia Olsson Date: Sat, 12 Sep 2026 17:54:31 +0200 Subject: [PATCH 2/5] Move requirements for notebooks into binder folder. --- README.md | 4 ++-- environment.yml => binder/environment.yml | 2 +- {docs => binder}/requirements.txt | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename environment.yml => binder/environment.yml (71%) rename {docs => binder}/requirements.txt (100%) diff --git a/README.md b/README.md index c5b424b..adbb8ca 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ The documentation follows the [Diataxis approach](https://diataxis.fr/). 1. Clone the repository 2. Create a virtual environment and activate it. -3. Install the requirements with `pip install -r requirements.txt -r docs/requirements.txt`. +3. Install the requirements with `pip install -r requirements.txt -r binder/requirements.txt`. 4. Create a new branch. The main branch is protected so you can't push to it directly. 5. Build the docs locally with `./build-docs.sh`. The new version is available in `docs/build/html/index.html`. 6. When the local version looks good, push your changes and make a pull request. Pushes to main will build and deploy the new version. For the notebooks it is necessary to have the required pyAML packages installed in the environment. -If you add a new dependency remember to also add it in the `docs/requirements.txt` or it will not be built correctly. +If you add a new dependency remember to also add it in the `binder/requirements.txt` or it will not be built correctly. ## Developing Content diff --git a/environment.yml b/binder/environment.yml similarity index 71% rename from environment.yml rename to binder/environment.yml index 42b944d..16dd46c 100644 --- a/environment.yml +++ b/binder/environment.yml @@ -5,4 +5,4 @@ dependencies: - python=3.11.0 - pip - pip: - - -r binder/requirements.txt + - -r requirements.txt \ No newline at end of file diff --git a/docs/requirements.txt b/binder/requirements.txt similarity index 100% rename from docs/requirements.txt rename to binder/requirements.txt From 7f0f4a911169b3360c440a838d20278b751639ab Mon Sep 17 00:00:00 2001 From: Teresia Olsson Date: Sat, 12 Sep 2026 18:12:27 +0200 Subject: [PATCH 3/5] Remove binder from deploy workflow. --- .github/workflows/deploy-pages.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index c63aa24..a8ea659 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -30,22 +30,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt -r docs/requirements.txt + pip install -r requirements.txt -r binder/requirements.txt - name: Build Sphinx docs run: ./build-docs.sh - - name: Add Binder environment configuration - run: cp environment.yml docs/build/html/environment.yml - - - name: Publish built docs for Binder - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/build/html - publish_branch: gh-pages - - name: Configure GitHub Pages uses: actions/configure-pages@v6 From 84e8f56b430957622c44c2b03ee6fca82b0f2ac9 Mon Sep 17 00:00:00 2001 From: Teresia Olsson Date: Sat, 12 Sep 2026 18:12:40 +0200 Subject: [PATCH 4/5] Update path for binder. --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index afcfceb..6241f14 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -49,7 +49,7 @@ # the generated documentation and notebooks here. "branch": "gh-pages", "binderhub_url": "https://mybinder.org", - "dependencies": ["../requirements.txt"], + "dependencies": ["../../binder/requirements.txt"], "notebooks_dir": "notebooks", "use_jupyter_lab": True, }, From dddbfee0d8bc6527889cd2f766cd608959dc8b2a Mon Sep 17 00:00:00 2001 From: Teresia Olsson Date: Sat, 12 Sep 2026 18:17:46 +0200 Subject: [PATCH 5/5] Add workflow to build binder branch. --- .github/workflows/binder.yml | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/binder.yml diff --git a/.github/workflows/binder.yml b/.github/workflows/binder.yml new file mode 100644 index 0000000..619e645 --- /dev/null +++ b/.github/workflows/binder.yml @@ -0,0 +1,50 @@ +name: Publish Binder environment + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: write + +jobs: + publish-binder: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt -r binder/requirements.txt + + - name: Build Sphinx documentation + run: ./build-docs.sh + + - name: Prepare Binder branch + run: | + mkdir -p binder-publish/binder + mkdir -p binder-publish/notebooks/tutorials + + # Keep the Binder configuration inside binder/ + cp -a binder/. binder-publish/binder/ + + # Copy notebooks generated by Sphinx-Gallery + cp -a docs/build/html/tutorials/. \ + binder-publish/notebooks/tutorials/ + + - name: Publish binder branch + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: binder-publish + publish_branch: binder + force_orphan: true \ No newline at end of file