From fb3463f40ae6b19f58fbc893863c78064bdfe5c0 Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Tue, 3 Feb 2026 23:15:39 +0100 Subject: [PATCH 1/7] Docs CI: cache, VTK-osmesa, remove RTD Revamp documentation CI: rename workflow, remove scheduled run and ReadTheDocs config, and add caching for Sphinx output. Set USE_CACHE env, change job id to build-doc, make apt-get install use -y, clarify install steps and use a multiline step to uninstall vtk and install vtk-osmesa for headless rendering. Add actions/cache for docs/_build keyed by source and docs files. Update docs/conf.py canonical_url to the GitHub Pages docs URL and delete .readthedocs.yaml to consolidate docs builds under GitHub Actions. --- .github/workflows/build-docs.yml | 31 +++++++++++++++++++++---------- .readthedocs.yaml | 26 -------------------------- docs/conf.py | 2 +- 3 files changed, 22 insertions(+), 37 deletions(-) delete mode 100644 .readthedocs.yaml diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index c39a8667..5734a638 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -1,4 +1,4 @@ -name: Build Documentation +name: Documentation on: workflow_dispatch: @@ -11,20 +11,19 @@ on: - main - master - schedule: - - cron: "0 0 * * *" +env: + USE_CACHE: "true" concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - build-and-deploy: + build-doc: runs-on: "ubuntu-latest" env: PYVISTA_OFF_SCREEN: "True" ALLOW_PLOTTING: true - SHELLOPTS: "errexit:pipefail" steps: - uses: actions/checkout@v4 @@ -35,15 +34,27 @@ jobs: cache: "pip" - name: Install libGLU - run: sudo apt-get install libglu1-mesa + run: sudo apt-get install -y libglu1-mesa - - name: Install + - name: Install package with docs dependencies run: pip install .[docs] - - name: Install vtk - run: pip uninstall vtk -y && pip install vtk-osmesa --extra-index-url https://wheels.vtk.org + - name: Install VTK-OSMesa for headless rendering + run: | + pip uninstall vtk -y + pip install vtk-osmesa --extra-index-url https://wheels.vtk.org - - name: Build docs + - name: Cache Sphinx build directory + uses: actions/cache@v4 + if: env.USE_CACHE == 'true' + with: + path: docs/_build/ + key: doc-build-${{ hashFiles('microgen/__init__.py') }}-${{ hashFiles('docs/**/*.rst') }} + restore-keys: | + doc-build-${{ hashFiles('microgen/__init__.py') }}- + doc-build- + + - name: Build Documentation run: make -C docs html - name: Upload HTML documentation diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index fed32f3f..00000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# .readthedocs.yml -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -version: 2 - -build: - os: "ubuntu-22.04" - tools: - python: "3.12" - jobs: - post_install: # https://github.com/pyvista/pyvista/discussions/4024 - - pip uninstall vtk -y - - pip install vtk-osmesa --extra-index-url https://wheels.vtk.org - apt_packages: - - libglu1-mesa - -sphinx: - configuration: docs/conf.py - -python: - install: - - method: pip - path: . - extra_requirements: - - docs diff --git a/docs/conf.py b/docs/conf.py index c95fa01b..2d63351c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -67,7 +67,7 @@ # html_theme = "sphinx_rtd_theme" html_theme_options = { - "canonical_url": "https://microgen.readthedocs.io/en/latest/", + "canonical_url": "https://3mah.github.io/microgen-docs/", # 'logo_only': False, # 'display_version': True, # 'prev_next_buttons_location': 'bottom', From 5a361bf4a98b7fe1c01757589c0bf0bd7aa4fefd Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Tue, 3 Feb 2026 23:18:11 +0100 Subject: [PATCH 2/7] Update README.md --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 55f52e52..c26bbf23 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Generation of 3D objects is achievable through functions that utilize Open CASCA | -------------- | ---------------- | | PyPI package | [![PyPI](https://badge.fury.io/py/microgen.svg)](https://pypi.org/project/microgen/) | | Conda forge package | [![Conda](https://anaconda.org/conda-forge/microgen/badges/version.svg)](https://anaconda.org/conda-forge/microgen) | -| Documentation | [![Documentation](https://readthedocs.org/projects/microgen/badge/?version=latest)](https://microgen.readthedocs.io/en/latest/?badge=latest) | +| Documentation | [![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue)](https://3mah.github.io/microgen-docs/) | | Status | [![Status](https://github.com/3MAH/microgen/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/3MAH/microgen) | | Citation | [![DOI](https://zenodo.org/badge/380437028.svg)](https://zenodo.org/badge/latestdoi/380437028) | | License | [![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) | @@ -68,73 +68,73 @@ Click on the image to be redirected to the corresponding example on Microgen's d ### Basic shapes - + - + ### Repeated cells - + - + ### Strut-based Lattices - + - + ### Triply Periodic Minimal Surfaces (TPMS) - + - + - + - + ### 3D operations - + - + - + - + ### Mesh - + - + - + - + - + From 12fa3b8db54dad47ac733f105d979b7ce12b4c92 Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Tue, 3 Feb 2026 23:20:28 +0100 Subject: [PATCH 3/7] Update documentation URLs to GitHub Pages Replace ReadTheDocs documentation links with the GitHub Pages site (https://3mah.github.io/microgen-docs/) in conda.recipe/meta.yaml and pyproject.toml so package metadata points to the hosted docs. --- conda.recipe/meta.yaml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 49da977e..d5bfc196 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -44,7 +44,7 @@ about: license: GPL-3.0-or-later license_family: GPL license_file: LICENSE - doc_url: https://microgen.readthedocs.io + doc_url: https://3mah.github.io/microgen-docs/ dev_url: https://github.com/3MAH/microgen extra: diff --git a/pyproject.toml b/pyproject.toml index 35ad8790..df6f4d99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ jupyter = [ all = ["microgen[dev, docs, jupyter]"] [project.urls] -Documentation = 'https://microgen.readthedocs.io/en/latest' +Documentation = 'https://3mah.github.io/microgen-docs/' "Bug Tracker" = 'https://github.com/3MAH/microgen/issues' "Source Code" = 'https://github.com/3MAH/microgen' From e56bda464dea7b09edb0fd7af7074473e8b4ed04 Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Tue, 24 Feb 2026 23:47:32 +0100 Subject: [PATCH 4/7] Update README.md Co-authored-by: Yasmin Legerstee <125015797+ylgrst@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c26bbf23..ead65df0 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Click on the image to be redirected to the corresponding example on Microgen's d ### Strut-based Lattices - + From 65d5ff1f8fa033ce6d03211e821d4a8b0c503a4b Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Tue, 24 Feb 2026 23:47:49 +0100 Subject: [PATCH 5/7] Update README.md Co-authored-by: Yasmin Legerstee <125015797+ylgrst@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ead65df0..7c32a156 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Click on the image to be redirected to the corresponding example on Microgen's d - + From abc585bed9e6ab37bd660a2f26166d2777bcbd2a Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Wed, 25 Feb 2026 16:59:00 +0100 Subject: [PATCH 6/7] Update integration.yml --- .github/workflows/integration.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 06fa0935..29940903 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -13,6 +13,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + PYVISTA_OFF_SCREEN: "True" + jobs: run-examples: runs-on: ${{ matrix.os }} From 96f573ef74befdf6100312abcfdf17326696f890 Mon Sep 17 00:00:00 2001 From: Yves Chemisky Date: Tue, 3 Mar 2026 16:23:15 +0100 Subject: [PATCH 7/7] Update build-docs.yml --- .github/workflows/build-docs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 67fc05d4..67d91613 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -11,9 +11,6 @@ on: - main - master -env: - USE_CACHE: "true" - concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true