From 0aa2c7bece3305b63467c9ee71f0d0ae88b049f6 Mon Sep 17 00:00:00 2001 From: kshitij-maths Date: Sat, 6 Dec 2025 00:33:50 +0100 Subject: [PATCH 1/5] fix: LaTeX rendering issue --- docs/source/.nojekyll | 0 docs/source/bffd.rst | 2 +- docs/source/cffd.rst | 2 +- docs/source/conf.py | 3 ++- docs/source/contributing.rst | 1 + docs/source/vffd.rst | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 docs/source/.nojekyll diff --git a/docs/source/.nojekyll b/docs/source/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/docs/source/bffd.rst b/docs/source/bffd.rst index 418dbfc3..6e481bf6 100644 --- a/docs/source/bffd.rst +++ b/docs/source/bffd.rst @@ -1,5 +1,5 @@ Barycenter Free-form Deformation -===================== +================================ .. currentmodule:: pygem.bffd diff --git a/docs/source/cffd.rst b/docs/source/cffd.rst index 373a362e..e7ba3db6 100644 --- a/docs/source/cffd.rst +++ b/docs/source/cffd.rst @@ -1,5 +1,5 @@ Constrained Free-form Deformation -===================== +================================= .. currentmodule:: pygem.cffd diff --git a/docs/source/conf.py b/docs/source/conf.py index 9642306f..4c4e0d64 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -41,6 +41,7 @@ "sphinx.ext.coverage", "sphinx.ext.viewcode", "sphinx.ext.ifconfig", + "sphinx.ext.mathjax", ] intersphinx_mapping = { @@ -174,7 +175,7 @@ # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -html_extra_path = ["_tutorials"] +html_extra_path = ["_tutorials", ".nojekyll"] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 98679f4a..482aff2e 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -21,6 +21,7 @@ Common Development Tasks **Running tests:** .. code-block:: bash + pip install -e ".[dev]" # or ".[test]" if just running tests pytest diff --git a/docs/source/vffd.rst b/docs/source/vffd.rst index 1f2b4453..91b7a93f 100644 --- a/docs/source/vffd.rst +++ b/docs/source/vffd.rst @@ -1,5 +1,5 @@ Volume Free-form Deformation -===================== +============================ .. currentmodule:: pygem.vffd From 7af58bde107a5267e37d54c32d129417d68580ff Mon Sep 17 00:00:00 2001 From: kshitij-maths Date: Tue, 9 Dec 2025 15:47:15 +0100 Subject: [PATCH 2/5] Update deployer workflow and docs configuration --- .github/workflows/sphinx-build.yml | 24 +++++++++++++++++------- docs/source/conf.py | 14 +++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/sphinx-build.yml b/.github/workflows/sphinx-build.yml index 34194771..85e2bc1a 100644 --- a/.github/workflows/sphinx-build.yml +++ b/.github/workflows/sphinx-build.yml @@ -7,25 +7,25 @@ on: jobs: docs: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup miniconda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true - python-version: 3.7 + python-version: 3.10 - - name: Conda install dependecies + - name: Conda install dependencies shell: bash -l {0} - run: conda install --yes -c conda-forge pythonocc-core=7.4.0 numpy scipy matplotlib vtk nose setuptools coveralls sphinx_rtd_theme sphinx python=3.7 + run: conda install --yes -c conda-forge pythonocc-core numpy scipy matplotlib vtk nose setuptools coveralls sphinx_rtd_theme sphinx python=3.10 - name: Conda info shell: bash -l {0} run: conda info - - name: Conda info + - name: Build Documentation shell: bash -l {0} run: cd docs && sphinx-build -b html -d build/doctrees --keep-going --no-color -w '/tmp/sphinx-log' source build/html @@ -44,3 +44,13 @@ jobs: #deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }} publish_dir: ./docs/build/html allow_empty_commit: true + + release_github: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 4c4e0d64..332d770c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -45,10 +45,10 @@ ] intersphinx_mapping = { - "python": ("http://docs.python.org/3", None), - "numpy": ("http://docs.scipy.org/doc/numpy/", None), - "scipy": ("http://docs.scipy.org/doc/scipy/reference/", None), - "matplotlib": ("http://matplotlib.sourceforge.net/", None), + "python": ("https://docs.python.org/3", None), + "numpy": ("https://numpy.org/doc/stable/", None), + "scipy": ("https://docs.scipy.org/doc/scipy/", None), + "matplotlib": ("https://matplotlib.org/stable", None), } # Add any paths that contain templates here, relative to this directory. @@ -87,7 +87,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -133,7 +133,7 @@ # classes and attributes. As side effects, this option ... ??? # If false, ... ???. # The default is True. -viewcode_import = True +# viewcode_import = True # -- Options for HTML output ---------------------------------------------- @@ -149,7 +149,7 @@ # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". From e26ba3ec21e06a33fd3c69240fe9304d0fe46baa Mon Sep 17 00:00:00 2001 From: Nicola Demo Date: Thu, 11 Dec 2025 10:40:17 +0100 Subject: [PATCH 3/5] Refactor Sphinx build workflow for deployment Updated the workflow to improve documentation deployment and added a release step. --- .github/workflows/sphinx-build.yml | 42 ++++++++++++++---------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/.github/workflows/sphinx-build.yml b/.github/workflows/sphinx-build.yml index 85e2bc1a..f606ac7a 100644 --- a/.github/workflows/sphinx-build.yml +++ b/.github/workflows/sphinx-build.yml @@ -1,4 +1,4 @@ -name: "Deploy Documentation" +name: "Continuous Deployment" on: push: @@ -6,7 +6,10 @@ on: - "*" jobs: - docs: + + ############################################################################# + # Create and online deployment of the documentation ######################### + docs: ####################################################################### runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -17,35 +20,28 @@ jobs: auto-update-conda: true python-version: 3.10 - - name: Conda install dependencies - shell: bash -l {0} - run: conda install --yes -c conda-forge pythonocc-core numpy scipy matplotlib vtk nose setuptools coveralls sphinx_rtd_theme sphinx python=3.10 - - - name: Conda info - shell: bash -l {0} - run: conda info + - name: Install Dependencies (conda and pip) + shell: bash + run: | + conda install --yes -c conda-forge pythonocc-core + python -m pip install --upgrade pip + python -m pip install .[doc] - name: Build Documentation - shell: bash -l {0} - run: cd docs && sphinx-build -b html -d build/doctrees --keep-going --no-color -w '/tmp/sphinx-log' source build/html - - #- name: Create the new documentation - #uses: ammaraskar/sphinx-action@master - #with: - #docs-folder: "docs/" - #pre-build-command: "ls -l /usr/share" - #build-command: "sphinx-build -b html -d build/doctrees --keep-going --no-color -w '/tmp/sphinx-log' source build/html" - + run: | + make html + working-directory: docs/ - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - #deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }} publish_dir: ./docs/build/html allow_empty_commit: true - - release_github: + + ############################################################################# + ## Create a public "Release" on the Github page ############################# + release_github: ############################################################# runs-on: ubuntu-latest permissions: contents: write @@ -53,4 +49,4 @@ jobs: - uses: actions/checkout@v4 - uses: ncipollo/release-action@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} From 43a6ff8d0b889ec3df39023b1f8b52e1aaecba66 Mon Sep 17 00:00:00 2001 From: Nicola Demo Date: Thu, 11 Dec 2025 11:25:21 +0100 Subject: [PATCH 4/5] Update create-tag workflow with English descriptions --- .github/workflows/create-tag.yml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/create-tag.yml diff --git a/.github/workflows/create-tag.yml b/.github/workflows/create-tag.yml new file mode 100644 index 00000000..b74b7352 --- /dev/null +++ b/.github/workflows/create-tag.yml @@ -0,0 +1,42 @@ +name: Create Git Tag + +on: + workflow_dispatch: + inputs: + tag_name: + description: "Tag name (eg. v1.3.0)" + required: true + type: string + +permissions: + contents: write + +jobs: + create_tag: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # serve per i tag + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Check if the tag is already existing + run: | + TAG="${{ inputs.tag_name }}" + git fetch --tags + if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then + echo "❌ Tag $TAG esiste già" + exit 1 + fi + + - name: Create and push the tag + run: | + TAG="${{ inputs.tag_name }}" + git tag "$TAG" + git push origin "$TAG" From 955aeeede47d8c6ef8accbdd1973c0f8d4cd12e1 Mon Sep 17 00:00:00 2001 From: Nicola Demo Date: Thu, 11 Dec 2025 11:37:05 +0100 Subject: [PATCH 5/5] Update pyproject.toml --- pyproject.toml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9b5b8369..49b2a81c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ -[build-system] -requires = ["setuptools>=45", "wheel"] -build-backend = "setuptools.build_meta" - [project] name = "pygem" -dynamic = ["version"] +dynamic = "2.0.1" description = "Python Geometrical Morphing" readme = {file = "README.md", content-type = "text/markdown"} -keywords = ["dimension_reduction", "mathematics", "ffd", "morphing", "iges", "stl", "vtk", "openfoam"] +keywords = [ + "vtk", "free-form-deformation", "iges", "radial-basis-function", + "deformation", "shape design", "inverse-distance-weighting", + "custom deformation", "mesh parameterization" +] authors = [ {name = "Marco Tezzele", email = "marcotez@gmail.com"}, {name = "Nicola Demo", email = "demo.nicola@gmail.com"}, @@ -68,21 +68,15 @@ dev = [ "pylint" ] +[build-system] +requires = ["setuptools>=45", "wheel"] +build-backend = "setuptools.build_meta" + [tool.setuptools] include-package-data = true [tool.setuptools.packages.find] -where = ["."] include = ["pygem*"] -exclude = ["tests*", "docs*", "tutorials*"] - -[tool.setuptools.dynamic] -version = { attr = "pygem.meta.__version__" } [tool.black] line-length = 80 -target-version = ['py39'] - -[tool.flake8] -ignore = "F401" -