Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
@@ -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"
56 changes: 31 additions & 25 deletions .github/workflows/sphinx-build.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,52 @@
name: "Deploy Documentation"
name: "Continuous Deployment"

on:
push:
tags:
- "*"

jobs:
docs:
runs-on: ubuntu-18.04

#############################################################################
# Create and online deployment of the documentation #########################
docs: #######################################################################
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

- name: Conda install dependecies
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

- name: Conda info
shell: bash -l {0}
run: conda info
python-version: 3.10

- name: Conda info
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"
- 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
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

#############################################################################
## Create a public "Release" on the Github page #############################
release_github: #############################################################
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 7 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 ----------------------------------------------
Expand All @@ -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
# "<project> v<release> documentation".
Expand Down
26 changes: 10 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"},
Expand Down Expand Up @@ -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"

Loading