Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
577ca8b
Add actions for installation on Ubuntu and macOS
yguclu Dec 10, 2025
d8b3ad2
Remove references to old files in pip cache dependencies
yguclu Dec 10, 2025
5352f36
Add deploy_check workflow which uploads PSYDAC to TestPyPI
yguclu Dec 10, 2025
aaab2d5
Move install actions to the correct folders and rename them
yguclu Dec 10, 2025
ca21008
Add missing shell property to ubuntu_install action
yguclu Dec 10, 2025
e455fd7
Get correct version string in deploy_check workflow
yguclu Dec 10, 2025
071c60b
Add igakit as a git submodule
yguclu Dec 10, 2025
b79260e
Require Pyccel version >= 2.1.0 and use its subcommands
yguclu Dec 10, 2025
6752bfc
Fix action paths in testing workflow
yguclu Dec 10, 2025
44750bb
Add missing shell property to macos_install action
yguclu Dec 10, 2025
8aacf12
Don't support Python 3.9. Test also with 3.14
yguclu Dec 10, 2025
a00c0b5
Hide direct link to igakit in setup.py
yguclu Dec 10, 2025
326fcab
Fix sed command in deploy_check workflow
yguclu Dec 10, 2025
a918ad4
Use pyccel >= 2.1.0 to build project
yguclu Dec 10, 2025
e0dc4f5
Avoid deprecation warning about license in pyproject.toml
yguclu Dec 10, 2025
4d655e7
Write PSYDAC in all caps
yguclu Dec 10, 2025
77eff8a
Read version from psydac/version.py
yguclu Dec 10, 2025
90b7874
Try workaround from helicopyter project
yguclu Dec 11, 2025
638103a
Add AUTHORS file to source distribution
yguclu Dec 11, 2025
9e5fb1d
Prepare release with packaged igakit (#555)
EmilyBourne Dec 12, 2025
1121c98
Do not require wheel and numpy for building
yguclu Dec 12, 2025
8cc7d54
Update psydac installation instructions
yguclu Dec 12, 2025
4d7559a
Update recommended PETSc version in documentation
yguclu Dec 12, 2025
1d6e4cb
Remove setup.py after migration to meson-python build system
yguclu Dec 12, 2025
e4721c1
Ignore Meson .wraplock files
yguclu Dec 12, 2025
f1cb23a
Build documentation with Python 3.10
yguclu Dec 17, 2025
3a54ae6
Update PETSc version to 3.24.2
yguclu Dec 17, 2025
42d9115
Add deploy workflow to automatically upload new version to PyPI
yguclu Dec 19, 2025
88cf061
Add missing conditional skips in `deploy_check` workflow
yguclu Dec 22, 2025
cba8192
Require numpy < 2.4 because of igakit
yguclu Dec 22, 2025
f52a8b1
Only run deploy_check workflow on PRs to main branch
yguclu Dec 22, 2025
9fc9891
Merge branch 'devel' into prepare-release
yguclu Dec 22, 2025
d7d272b
Fix typo in README.md
yguclu Dec 23, 2025
99b6c0c
Write PSYDAC in all caps in documentation
yguclu Dec 23, 2025
d4ab805
Write PSYDAC in all caps in Jupyter notebooks (examples)
yguclu Dec 23, 2025
9f7b4ba
Write PSYDAC in all caps across the library
yguclu Dec 23, 2025
2c6aa9f
Update copyright year in LICENSE file
yguclu Dec 23, 2025
e63f045
Exclude setup.py from testing workflow
yguclu Dec 23, 2025
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
24 changes: 24 additions & 0 deletions .github/actions/macos_install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'MacOS installation commands'

runs:
using: "composite"
steps:

- name: Install non-Python dependencies on macOS
run: |
brew install make
brew install open-mpi
brew install hdf5-mpi
brew install libomp
GFORTRAN_HOME=$(which gfortran || true)
echo "GFORTRAN_HOME : $GFORTRAN_HOME"
if [[ ! -f "$GFORTRAN_HOME" ]]; then
gfort=$(find ${PATH//:/\/ } -name 'gfortran-*' -exec basename {} \; | sort | tail -n 1 || true)
echo "Found $gfort"
gfort_path=$(which ${gfort})
folder=$(dirname ${gfort_path})
ln -s ${gfort_path} ${folder}/gfortran
fi
echo "MPI_OPTS=--oversubscribe" >> $GITHUB_ENV
echo "/opt/homebrew/opt/make/libexec/gnubin" >> $GITHUB_PATH
shell: bash
22 changes: 22 additions & 0 deletions .github/actions/ubuntu_install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Ubuntu installation commands'

runs:
using: "composite"
steps:

- name: Install non-Python dependencies on Ubuntu
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gfortran openmpi-bin libopenmpi-dev libhdf5-openmpi-dev
version: 1.0
execute_install_scripts: true

# When loading cached apt packages, the default MPI compiler isn't set.
# Workaround is to 'reinstall' openmpi-bin, which doesn't actually perform
# installation (since openmpi-bin already exists), but instead reruns
# `update-alternatives` which fixes the symlinks to mpicc/mpif90.
- name: Reconfigure non-Python dependencies on Ubuntu
run: |
sudo apt-get update
sudo apt-get install --reinstall openmpi-bin libhdf5-openmpi-dev liblapack-dev libblas-dev
shell: bash
131 changes: 131 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Deploy new version to PyPI

on:
workflow_run:
workflows: [testing]
branches: [main]
types:
- completed

jobs:
deployVersion:
runs-on: ubuntu-latest
if: github.repository == 'pyccel/psydac'
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

- name: Install dependencies
uses: ./.github/actions/ubuntu_install

- name: Update build tools
run: |
pip install --upgrade pip
pip install --upgrade build
pip install --upgrade twine

- name: Build and deploy to PyPI
run: |
echo ${{ github.event.workflow_run.head_branch }}
python -m build --sdist
ls dist/*
twine upload --repository pypi dist/* --non-interactive
shell: bash
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

- name: Install psydac package without extra components
run: |
pip install .

- name: "Get tag name"
id: tag_name
run: |
version=$(python -c "from psydac import __version__; print(__version__)")
echo "VERSION=${version}" >> $GITHUB_OUTPUT
echo "TAG_NAME=v${version}" >> $GITHUB_OUTPUT

- name: "Get release notes"
id: release_notes
run: |
echo "## What's Changed" > release_notes.md
# TODO: CHANGELOG parsing can be enabled when file is ready
# START_LINE=$(grep "^## " CHANGELOG.md -n | head -1 | cut -d: -f -1)
# END_LINE=$(grep "^## " CHANGELOG.md -n | head -2 | tail -1 | cut -d: -f -1)
# START_LINE=$((${START_LINE}+1))
# END_LINE=$((${END_LINE}-1))
# echo "## What's Changed" > release_notes.md
# sed -n ${START_LINE},${END_LINE}p CHANGELOG.md >> release_notes.md

- name: "Get contributors"
run: |
# Get relevant commits
LAST_RELEASE_COMMIT=$(git log -2 --pretty=%H | tail -1)
CURRENT_RELEASE_COMMIT=$(git log -1 --pretty=%H)

# Find any new lines in the AUTHORS file
NEW_CONTRIBUTORS=$(git diff --no-indent-heuristic --unified=0 --no-color ${LAST_RELEASE_COMMIT}..${CURRENT_RELEASE_COMMIT} AUTHORS | { grep "^\+[^+]" || true; } | cut -d ' ' -f 2-)
if [ -n "${NEW_CONTRIBUTORS}" ]
then
# If there are new contributors then add a section with their names
echo "## New Contributors" >> release_notes.md
while IFS= read -r c
do
echo "- ${c}" >> release_notes.md
done <<< "${NEW_CONTRIBUTORS}"
echo "" >> release_notes.md
fi

# Find the PR which created the release
PR_ID=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /search/issues?q="${CURRENT_RELEASE_COMMIT}" | jq '.["items"][0]["number"]')
# Extract authors from all commits in the PR
CONTRIBUTORS=$(gh pr view ${PR_ID} --json commits | jq '.["commits"][]["authors"][]["login"]' | tr -d '"' | sort -u)

# Add a hidden section listing the user names of all authors on commits in this release
echo "<details>" >> release_notes.md
echo "" >> release_notes.md
echo "## Contributors" >> release_notes.md
for c in ${CONTRIBUTORS}
do
echo "- @$c" >> release_notes.md
done
echo "" >> release_notes.md
echo "</details>" >> release_notes.md

# Get the full changelog link
PREVIOUS_TAG=$(gh release list --limit 1 --json tagName | jq '.[]["tagName"]' | tr -d '"')

echo "" >> release_notes.md
echo "**Full list of changes**: [${PREVIOUS_TAG}..${tag_name}](https://github.com/pyccel/pyccel/compare/${PREVIOUS_TAG}..${tag_name})" >> release_notes.md

shell: bash
env:
GH_TOKEN: ${{ github.token }}
tag_name: ${{ steps.tag_name.outputs.TAG_NAME }}

- name: "Update repo tags"
uses: EndBug/latest-tag@latest
with:
ref: ${{ steps.tag_name.outputs.TAG_NAME }}

- name: "Update releases"
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/pyccel/pyccel/releases \
-f "tag_name=${tag_name}" -f "name=Version ${version}" -F "body=@release_notes.md" -F "draft=false" -F "prerelease=false" -F "generate_release_notes=false"
shell: bash
env:
tag_name: ${{ steps.tag_name.outputs.TAG_NAME }}
version: ${{ steps.tag_name.outputs.VERSION }}
GH_TOKEN: ${{ github.token }}
101 changes: 101 additions & 0 deletions .github/workflows/deploy_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Check deployment of new version to TestPyPI

on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches: [main]

jobs:
deployTest:
runs-on: ubuntu-latest
if: github.repository == 'pyccel/psydac'
steps:
- id: duplicate_check
uses: fkirc/skip-duplicate-actions@v5
with:
skip_after_successful_duplicate: 'true'
paths: '["psydac/**", "pyproject.toml", "setup.py", ".github/workflows/deploy_check.yml", ".github/actions/**"]'

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Checkout repository
if: steps.duplicate_check.outputs.should_skip != 'true'
uses: actions/checkout@v4
with:
submodules: true

- name: Install dependencies
if: steps.duplicate_check.outputs.should_skip != 'true'
uses: ./.github/actions/ubuntu_install

- name: Update build tools
if: steps.duplicate_check.outputs.should_skip != 'true'
run: |
pip install --upgrade pip
pip install --upgrade build
pip install --upgrade twine

- name: Build and deploy to TestPyPI
if: steps.duplicate_check.outputs.should_skip != 'true'
run: |
CURRENT_VERSION=$(grep 'version *= *"\([0-9\.]*\)"' pyproject.toml | grep '[0-9\.]*' -o)
TEST_VERSION=${CURRENT_VERSION}.dev$(date +%Y%m%d%H%M%S)
sed -i.bak "s/\"${CURRENT_VERSION}\"/\"${TEST_VERSION}\"/g" pyproject.toml && rm pyproject.toml.bak
echo "TEST_VERSION=${TEST_VERSION}" >> $GITHUB_ENV
# Setup dummy user to save temp version for meson
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git commit -m "Save temp version" pyproject.toml
python -m build --sdist
ls dist/*
twine check --strict dist/*
twine upload --repository testpypi dist/* --non-interactive --verbose
sleep 60
shell: bash
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}

- name: Download psydac package from TestPyPI and install it
if: steps.duplicate_check.outputs.should_skip != 'true'
timeout-minutes: 60
run: |
WAIT=20
SUCCESS=0
for i in {1..5}; do
echo "Attempt $i: Installing psydac==${TEST_VERSION}..."""
if pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ psydac[test]=="${TEST_VERSION}"
then
SUCCESS=1
break
else
echo "Install failed. Retrying in $WAIT seconds..."
sleep $WAIT
fi
done

# Final check
if [ "$SUCCESS" -ne 1 ]; then
echo "ERROR: Failed to install psydac==${TEST_VERSION}."
exit 1
fi
shell: bash

- name: Initialize test directory
if: steps.duplicate_check.outputs.should_skip != 'true'
run: |
mkdir pytest
cp mpi_tester.py pytest

- name: Run single-process tests with Pytest
if: steps.duplicate_check.outputs.should_skip != 'true'
working-directory: ./pytest
run: |
pytest -n auto --pyargs psydac -m "not parallel and not petsc"
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.10'
- name: Install non-Python dependencies on Ubuntu
run: |
sudo apt update
Expand Down
51 changes: 9 additions & 42 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
paths:
- 'psydac/**'
- 'pyproject.toml'
- 'setup.py'
- 'pytest.ini'
- 'mpi_tester.py'

Expand All @@ -23,7 +22,6 @@ on:
paths:
- 'psydac/**'
- 'pyproject.toml'
- 'setup.py'
- 'pytest.ini'
- 'mpi_tester.py'

Expand All @@ -36,15 +34,15 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-24.04, macos-14 ]
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
isMerge:
- ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }}
exclude:
- { isMerge: false, python-version: '3.9' , os: macos-14 }
- { isMerge: false, python-version: '3.10', os: ubuntu-24.04 }
- { isMerge: false, python-version: '3.11', os: macos-14 }
- { isMerge: false, python-version: '3.12', os: ubuntu-24.04 }
- { isMerge: false, python-version: '3.13', os: macos-14 }
- { isMerge: false, python-version: '3.10', os: macos-14 }
- { isMerge: false, python-version: '3.11', os: ubuntu-24.04 }
- { isMerge: false, python-version: '3.12', os: macos-14 }
- { isMerge: false, python-version: '3.13', os: ubuntu-24.04 }
- { isMerge: false, python-version: '3.14', os: macos-14 }

name: ${{ matrix.os }} / Python ${{ matrix.python-version }}

Expand All @@ -62,45 +60,14 @@ jobs:
cache: 'pip'
cache-dependency-path: |
pyproject.toml
requirements.txt
requirements_extra.txt

- name: Install non-Python dependencies on Ubuntu
if: matrix.os == 'ubuntu-24.04'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gfortran openmpi-bin libopenmpi-dev libhdf5-openmpi-dev
version: 1.0
execute_install_scripts: true

# When loading cached apt packages, the default MPI compiler isn't set.
# Workaround is to 'reinstall' openmpi-bin, which doesn't actually perform
# installation (since openmpi-bin already exists), but instead reruns
# `update-alternatives` which fixes the symlinks to mpicc/mpif90.
- name: Reconfigure non-Python dependencies on Ubuntu
if: matrix.os == 'ubuntu-24.04'
run: |
sudo apt-get update
sudo apt-get install --reinstall openmpi-bin libhdf5-openmpi-dev liblapack-dev libblas-dev
uses: ./.github/actions/ubuntu_install

- name: Install non-Python dependencies on macOS
if: matrix.os == 'macos-14'
run: |
brew install make
brew install open-mpi
brew install hdf5-mpi
brew install libomp
GFORTRAN_HOME=$(which gfortran || true)
echo "GFORTRAN_HOME : $GFORTRAN_HOME"
if [[ ! -f "$GFORTRAN_HOME" ]]; then
gfort=$(find ${PATH//:/\/ } -name 'gfortran-*' -exec basename {} \; | sort | tail -n 1 || true)
echo "Found $gfort"
gfort_path=$(which ${gfort})
folder=$(dirname ${gfort_path})
ln -s ${gfort_path} ${folder}/gfortran
fi
echo "MPI_OPTS=--oversubscribe" >> $GITHUB_ENV
echo "/opt/homebrew/opt/make/libexec/gnubin" >> $GITHUB_PATH
uses: ./.github/actions/macos_install

- name: Print information on MPI and HDF5 libraries
run: |
Expand Down Expand Up @@ -133,7 +100,7 @@ jobs:
- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Download a specific release of PETSc
run: |
git clone --depth 1 --branch v3.23.2 https://gitlab.com/petsc/petsc.git
git clone --depth 1 --branch v3.24.2 https://gitlab.com/petsc/petsc.git

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Install PETSc with complex support
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ __test__/
.idea

# Visual Studio Code workspace files
*.code-workspace
*.code-workspace

# Meson lock files
*/.wraplock
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "subprojects/igakit"]
path = subprojects/igakit
url = https://github.com/dalcinl/igakit/
Loading