From 34724acbf7761b78bb5d3ac6685dce6bc4486eeb Mon Sep 17 00:00:00 2001 From: Benjamin Vial Date: Wed, 25 Mar 2026 15:04:26 +0100 Subject: [PATCH 1/3] build(deps): add documentation and development dependencies Add jupyter-book to docs extras and pytest to dev extras. Add MyST configuration file for documentation building. Update .gitignore to exclude MyST build outputs. --- .github/workflows/deploy.yml | 48 ++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ myst.yml | 15 +++++++++++ pyproject.toml | 12 +++++++++ 4 files changed, 78 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 myst.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..1308a3b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,48 @@ +# This file was created automatically with `jupyter-book init --gh-pages` 🪄 💚 +# Ensure your GitHub Pages settings for this repository are set to deploy with **GitHub Actions**. + +name: Jupyter Book (via myst) GitHub Pages Deploy +on: + push: + # Runs on pushes targeting the default branch + branches: [main] +env: + # `BASE_URL` determines, relative to the root of the domain, the URL that your site is served from. + # E.g., if your site lives at `https://mydomain.org/myproject`, set `BASE_URL=/myproject`. + # If, instead, your site lives at the root of the domain, at `https://mydomain.org`, set `BASE_URL=''`. + BASE_URL: /${{ github.event.repository.name }} + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: 'pages' + cancel-in-progress: false +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v3 + - uses: actions/setup-node@v4 + with: + node-version: 18.x + - name: Install Jupyter Book (via myst) + run: npm install -g jupyter-book + - name: Build HTML Assets + run: jupyter-book build --html + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './_build/html' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index aac0927..c47ead1 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ Fig/* *.svg TODO.txt tests/* + +# MyST build outputs +_build diff --git a/myst.yml b/myst.yml new file mode 100644 index 0000000..2775d24 --- /dev/null +++ b/myst.yml @@ -0,0 +1,15 @@ +# See docs at: https://mystmd.org/guide/frontmatter +version: 1 +project: + id: 35d0ad15-d16d-4ba6-b6a0-d74bbaa9d6f0 + # title: + # description: + # keywords: [] + # authors: [] + github: https://github.com/benvial/PyMoosh + # To autogenerate a Table of Contents, run "jupyter book init --write-toc" +site: + template: book-theme + options: + favicon: pymoosh_logo.png + logo: pymoosh_logo.png diff --git a/pyproject.toml b/pyproject.toml index 4dc8aff..23bb6fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ dependencies = [ ] + [project.urls] Homepage = "https://github.com/AnMoreau/PyMoosh" Repository = "https://github.com/AnMoreau/PyMoosh/stable" @@ -35,6 +36,17 @@ Documentation = "https://github.com/AnMoreau/PyMoosh#readme" [tool.setuptools.packages.find] include = ["PyMoosh*"] + +[project.optional-dependencies] +docs = [ + "jupyter-book", +] + +dev = [ + "pytest", +] + + [tool.setuptools] include-package-data = true zip-safe = false \ No newline at end of file From 3f92888dc00dca0e12548b444023e3ab2fcde1e1 Mon Sep 17 00:00:00 2001 From: Benjamin Vial Date: Wed, 25 Mar 2026 15:05:24 +0100 Subject: [PATCH 2/3] change repo url --- myst.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myst.yml b/myst.yml index 2775d24..aa3bc0e 100644 --- a/myst.yml +++ b/myst.yml @@ -6,7 +6,7 @@ project: # description: # keywords: [] # authors: [] - github: https://github.com/benvial/PyMoosh + github: https://github.com/AnMoreau/PyMoosh # To autogenerate a Table of Contents, run "jupyter book init --write-toc" site: template: book-theme From 459b83141203c48746df851887695bedf2c2df42 Mon Sep 17 00:00:00 2001 From: Benjamin Vial Date: Wed, 25 Mar 2026 15:07:25 +0100 Subject: [PATCH 3/3] update ci to suse stable branch --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1308a3b..54ed55c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,7 +5,7 @@ name: Jupyter Book (via myst) GitHub Pages Deploy on: push: # Runs on pushes targeting the default branch - branches: [main] + branches: [stable] env: # `BASE_URL` determines, relative to the root of the domain, the URL that your site is served from. # E.g., if your site lives at `https://mydomain.org/myproject`, set `BASE_URL=/myproject`.