Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge PyChaste into Chaste develop #286

Merged
merged 89 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 84 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
b565f19
#273 add minimal pychaste config
kwabenantim Jun 10, 2024
e28ff41
#273 add pychaste test cmake
kwabenantim Jun 10, 2024
c2deed5
#273 add pychaste VtkScene
kwabenantim Jun 10, 2024
d83a160
#273 Rename codegen env chaste env
kwabenantim Jun 18, 2024
3fe845b
#273 add all pychaste but wrappers and docs
kwabenantim Jun 25, 2024
f77729e
#273 add fixed pychaste wrappers
kwabenantim Jul 9, 2024
631b2ba
Merge branch 'develop' into 273-pychaste-merge
kwabenantim Jul 9, 2024
2ecdd99
#273 Add pychaste-test workflow
kwabenantim Jul 9, 2024
ecf015c
#273 Add pychaste wrapper diff test
kwabenantim Jul 9, 2024
a51678b
#273 Fix pychaste for vtk 9.0
kwabenantim Jul 9, 2024
335678a
#273 Move pychaste-test workflow
kwabenantim Jul 23, 2024
41fd50e
#273 Remove pychaste component if not enabled
kwabenantim Jul 23, 2024
f32eaca
#273 Skip pychaste config if disabled
kwabenantim Jul 24, 2024
ee0d2cb
#273 Add wrapper fixes from cppwg
kwabenantim Jul 29, 2024
1c51632
#273 Generate copyright text in pychaste wrappers
kwabenantim Aug 5, 2024
84d68db
#273 fix pychaste copyright notice whitespace
kwabenantim Aug 5, 2024
be3ffb4
#273 Add pychaste continuous test pack
kwabenantim Aug 5, 2024
651108b
#273 Generate missing pychaste wrappers in cmake
kwabenantim Aug 17, 2024
17088d5
#273 Restructure pychaste layout
kwabenantim Aug 18, 2024
a42dcc4
#273 Update pychaste-test actions
kwabenantim Aug 18, 2024
3a42207
#273 Add pychaste tutorials
kwabenantim Aug 18, 2024
2b37be5
#273 Organise pychaste cpp and py code under src
kwabenantim Aug 18, 2024
ce92267
#273 Fix pychaste test paths
kwabenantim Aug 18, 2024
b1facb6
#273 Add pyproject.toml
kwabenantim Aug 18, 2024
dd9fce0
#273 Fix pychaste import errors
kwabenantim Aug 18, 2024
b1c37de
#273 Track pychaste py src files in cmake
kwabenantim Aug 19, 2024
17cc2f0
#273 Refactor pychaste jupyter classes
kwabenantim Aug 19, 2024
1742a83
#273 Add pychaste requirements
kwabenantim Aug 19, 2024
0ff301a
#273 Test for new classes
kwabenantim Sep 15, 2024
90d6433
#273 Add modification notice to wrappers
kwabenantim Sep 16, 2024
dbdd477
#273 Rename pychaste tests
kwabenantim Sep 17, 2024
1637524
#273 update pychaste workflow
kwabenantim Sep 17, 2024
87469de
#273 Fix TestPyFileFinder
kwabenantim Sep 17, 2024
7bb70e7
wrap PetscSetupUtils & setup petsc in python test
MILeach Sep 17, 2024
0b6951a
Merge pull request #315 from Chaste/273-pychaste-merge-fix-petsc-setup
kwabenantim Sep 18, 2024
be1afb7
#273 Add SetupTestPyWrapperChanges
kwabenantim Sep 20, 2024
caf6ea4
#273 Expand TestPyWrapperChanges
kwabenantim Sep 20, 2024
f931d06
#273 Update TestPyWrapperChanges
kwabenantim Sep 21, 2024
1c7bd9c
#273 Update pychaste workflow
kwabenantim Sep 21, 2024
c5eb959
#273 Turn off vtk warnings VtkScene tests
kwabenantim Sep 21, 2024
3e36752
#273 Auto-sorted pychaste wrappers
kwabenantim Sep 22, 2024
7191d14
#273 Flatten generated wrapper structure
kwabenantim Sep 24, 2024
b34ba0c
#273 Rename pychaste wrappers
kwabenantim Sep 24, 2024
46f8a8f
#273 rename _pychaste_pychaste _pychaste_lib
kwabenantim Sep 24, 2024
685be4a
#273 Add pychaste template syntax
kwabenantim Sep 24, 2024
337409c
Merge branch 'develop' into 273-pychaste-merge
kwabenantim Sep 24, 2024
5c94a2f
#273 Update VertexMesh and MeshBasedCellPopulation wrappers
kwabenantim Sep 24, 2024
a2cafa9
#273 Rename pychaste lib.main.cpp
kwabenantim Sep 26, 2024
9fabcba
#273 Remove unused AbstractPythonOdeSystemInformation
kwabenantim Sep 26, 2024
9fac882
#273 Format pychaste cpp code
kwabenantim Sep 26, 2024
4d21224
#273 Update TestPyImports
kwabenantim Sep 26, 2024
2cd3114
#273 Fix pychaste test name consistency
kwabenantim Sep 27, 2024
9972ef1
#273 Update pychaste wrapper config
kwabenantim Sep 28, 2024
1aca2ca
#273 Accept classes in TemplateClassDict
kwabenantim Sep 30, 2024
7e13b2e
#273 Fix VTK object converters
kwabenantim Oct 14, 2024
ba67f57
#273 Fix UBLAS object converters
kwabenantim Oct 14, 2024
ab5d281
#273 Fix vertex based py tutorial
kwabenantim Oct 14, 2024
ce8a623
#273 Fix typecasters
kwabenantim Nov 12, 2024
05ea43a
#273 Fix jupyter imports
kwabenantim Nov 12, 2024
9f4e90f
#273 Add custom wrapper for ReplicatableVector
kwabenantim Nov 12, 2024
b5d3861
#273 Standardise pychaste typecaster naming
kwabenantim Nov 12, 2024
f2345ed
#273 Add licenses for pychaste 3rdparty typecasters
kwabenantim Nov 12, 2024
580c7d5
#273 Remove stub pychaste ode test
kwabenantim Nov 12, 2024
5494648
#273 Fix pychaste infra checks
kwabenantim Nov 12, 2024
0d04c46
Merge branch 'develop' into 273-pychaste-merge
kwabenantim Nov 12, 2024
0fc8a73
#273 Find petsc4py before petsc
kwabenantim Nov 12, 2024
dc8ddf8
#273 Fix pychaste wrapper sort order
kwabenantim Nov 13, 2024
6f00077
#273 Test pychaste on ubuntu noble
kwabenantim Nov 14, 2024
b164bc6
#273 Update base classes in pychaste wrappers
kwabenantim Nov 22, 2024
52b2838
#273 Update pychaste ubuntu workflow
kwabenantim Nov 22, 2024
6f48f96
#273 Add typecaster modification note
kwabenantim Nov 22, 2024
1fe5205
#273 Add pychaste conda tests
kwabenantim Nov 23, 2024
ebf6c84
#273 Simplify pychaste wrapper generation
kwabenantim Nov 25, 2024
f0faebe
#273 update pychaste wrapper default args
kwabenantim Nov 26, 2024
579bb13
#273 Fix pychaste workflows
kwabenantim Nov 26, 2024
7be0e88
#273 Update pychaste wrapper numeric default args
kwabenantim Nov 26, 2024
36702ae
#273 Fix pychaste numeric default args
kwabenantim Nov 26, 2024
ae60a31
#273 Add deprecated pychaste classes with warnings
kwabenantim Dec 4, 2024
f8f8354
#273 Add infra script and workflow for pychaste tutorials
kwabenantim Dec 6, 2024
828a410
#273 Remove generated pychaste wrappers
kwabenantim Dec 6, 2024
b187f88
#273 Fix pychaste wrapper generation
kwabenantim Dec 8, 2024
4045f91
#273 Use new-style pychaste template class syntax
kwabenantim Dec 8, 2024
33a7a81
#273 Use pybind11_add_module
kwabenantim Dec 9, 2024
387ca67
#273 Update pychaste tutorials
kwabenantim Dec 9, 2024
223a53a
#273 Add pychaste manual wrapper re-generation
kwabenantim Dec 11, 2024
a1b3b49
#273 Fix pychaste visuals for VTK 9.1+
kwabenantim Dec 11, 2024
93881c7
#273 Update pychaste deprecated syntax warning
kwabenantim Dec 11, 2024
ceee600
#273 Repair pychaste rendering for VTK 9.1+
kwabenantim Dec 20, 2024
1cbb573
#273 Add three.js license
kwabenantim Dec 20, 2024
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
90 changes: 90 additions & 0 deletions .github/workflows/pychaste-conda-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: PyChaste conda tests

on:
workflow_dispatch:
pull_request:
branches:
- "**"

# Limit concurrent runs to one per branch
concurrency:
group: pychaste-conda-tests-${{ github.ref }}
cancel-in-progress: true

jobs:
pychaste-conda-tests:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:off') }}

strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

runs-on: ubuntu-latest

env:
CHASTE_TEST_OUTPUT: ${{ github.workspace }}/testoutput

defaults:
run:
shell: bash -el {0} # -l needed to activate conda

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Make build and test directories
run: |
mkdir -p build
mkdir -p ${CHASTE_TEST_OUTPUT}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y castxml clang cmake xvfb

- name: Setup Miniconda Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
use-mamba: true
miniforge-version: latest
environment-file: pychaste/src/py/conda/environment.yml
python-version: ${{ matrix.python-version }}
channels: conda-forge,pychaste

- name: Configure PyChaste
run: |
cmake \
-DChaste_ENABLE_PYCHASTE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${CONDA_PREFIX}" \
-DCMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
-DCMAKE_LIBRARY_PATH="${CONDA_PREFIX}/lib" \
-DBUILD_SHARED_LIBS=ON \
-DBOOST_ROOT="${CONDA_PREFIX}" \
-DHDF5_C_COMPILER_EXECUTABLE="${CONDA_PREFIX}/bin/h5pcc" \
-DPETSC_DIR="${CONDA_PREFIX}" \
-DPYTHON_EXECUTABLE="$(which python)" \
-DVTK_DIR="${CONDA_PREFIX}" \
-DXERCESC_INCLUDE="${CONDA_PREFIX}/include" \
-DXERCESC_LIBRARY="${CONDA_PREFIX}/lib/libxerces-c.so" \
-DXSD_EXECUTABLE="${CONDA_PREFIX}/bin/xsd" \
..
working-directory: build

- name: Build PyChaste
run: |
make -j $(nproc) pychaste
working-directory: build

- name: Install PyChaste
run: |
python3 -m pip install -v pychaste/package
working-directory: build

- name: Run PyChaste tests
run: |
xvfb-run --server-args="-screen 0 1024x768x24" \
ctest -j $(nproc) -L pychaste --output-on-failure
working-directory: build
89 changes: 89 additions & 0 deletions .github/workflows/pychaste-ubuntu-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: PyChaste Ubuntu tests

on:
workflow_dispatch:
pull_request:
branches:
- "**"

# Limit concurrent runs to one per branch
concurrency:
group: pychaste-ubuntu-tests-${{ github.ref }}
cancel-in-progress: true

jobs:
pychaste-ubuntu-tests:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:off') }}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "ubuntu-24.04"]

runs-on: ${{ matrix.os }}

env:
CHASTE_TEST_OUTPUT: ${{ github.workspace }}/testoutput

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Make build and test directories
run: |
mkdir -p build
mkdir -p ${CHASTE_TEST_OUTPUT}

- name: Install Chaste dependencies
run: |
codename=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d= -f2)
sudo wget -O /usr/share/keyrings/chaste.asc https://chaste.github.io/chaste.asc
echo "deb [signed-by=/usr/share/keyrings/chaste.asc] https://chaste.github.io/ubuntu ${codename}/" \
| sudo tee -a /etc/apt/sources.list.d/chaste.list
sudo apt-get update
sudo apt-get install -y chaste-dependencies

- name: Install extra PyChaste dependencies
run: |
for vtk_ver in $(seq 7 9); do
installed=1
dpkg -s "libvtk${vtk_ver}-dev" || installed=0
if [ "${installed}" -eq 1 ]; then
break
fi
done

sudo apt-get install -y \
castxml \
clang \
python3-matplotlib \
python3-mpi4py \
python3-notebook \
python3-numpy \
python3-petsc4py-real \
python3-pip \
python3-vtk${vtk_ver} \
python3-xvfbwrapper \
xvfb

- name: Configure PyChaste
run: |
cmake -DCMAKE_BUILD_TYPE=Release -DChaste_ENABLE_PYCHASTE=ON ..
working-directory: build

- name: Build PyChaste
run: |
make -j $(nproc) pychaste
working-directory: build

- name: Install PyChaste
run: |
PIP_BREAK_SYSTEM_PACKAGES=1 \
python3 -m pip install -v --user pychaste/package
working-directory: build

- name: Run PyChaste tests
run: |
xvfb-run --server-args="-screen 0 1024x768x24" \
ctest -j $(nproc) -L pychaste --output-on-failure
working-directory: build
77 changes: 77 additions & 0 deletions .github/workflows/update-pychaste-tutorials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Update pychaste tutorials

on:
pull_request:
branches:
- '**'
push:
branches:
- develop
workflow_dispatch:

jobs:

generate-tutorial-markdown:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:off') }}
steps:
- name: checkout Chaste
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history in order to get revision info for tutorial files

- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: install dependencies
run: |
python -m pip install jupyterlab

- name: generate pychaste tutorial markdown
run: |
python GeneratePyChasteTutorials.py
working-directory: python/infra

- name: upload archive files
uses: actions/upload-artifact@v4
with:
name: pychaste-tutorial-markdown
path: |
pychaste/src/py/doc/tutorial/*.md

upload-to-website:
needs: generate-tutorial-markdown
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Download pychaste-tutorial-markdown
uses: actions/download-artifact@v4
with:
name: pychaste-tutorial-markdown
path: pychaste/src/py/doc/tutorial

- name: Checkout website repository
uses: actions/checkout@v4
with:
repository: Chaste/Chaste.github.io
token: ${{ secrets.WEBSITE_ACCESS }}
path: chaste-website
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Display structure of downloaded files
run: ls -R

- name: Copy markdown to website repository
run: |
cp pychaste/src/py/doc/tutorial/*.md chaste-website/site/content/pychaste/tutorials

- name: Commit and push if changed
run: |
git config user.name "github-action"
git config user.email "github-action"
git add --all
git commit -m "update pychaste tutorials" || echo "No changes to commit"
git push
working-directory: chaste-website
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ _local/
# Temporary build folders for dynamically loaded models
/heart/dynamic/tmp_*_*
/heart/dynamic/luo_rudy_1991_dyn.*
/codegen_python3_venv
/chaste_python3_venv
**/__pycache__/

# Local hostconfig
Expand Down
Loading
Loading