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
24 changes: 24 additions & 0 deletions .github/workflows/spack-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,27 @@ jobs:
run: |
spack env activate ./env
python -c "import circulation"

py-cardiac-geometriesx:
needs: style-check
runs-on: ubuntu-latest
container: ubuntu:24.04
strategy:
fail-fast: false
matrix:
version: ["main", "0.12.0"]
spec: ["^py-fenics-dolfinx%c,cxx=gcc@13.3.0"]

steps:
- uses: actions/checkout@v6
with:
path: spack_repos
- uses: ./spack_repos/.github/actions/test-package
with:
spec: py-cardiac-geometriesx@${{ matrix.version }} ${{ matrix.spec }}

- name: Import test
shell: spack-bash {0}
run: |
spack env activate ./env
python -c "import cardiac_geometries"
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack. We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
# spack install py-cardiac-geometries-core
#
# You can edit this file again by typing:
#
# spack edit py-cardiac-geometries-core
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------

from spack_repo.builtin.build_systems.python import PythonPackage

from spack.package import *


class PyCardiacGeometriesCore(PythonPackage):
"""General ODE translator"""

homepage = "https://computationalphysiology.github.io/cardiac-geometries-core"
git = "https://github.com/ComputationalPhysiology/cardiac-geometries-core.git"
url = "https://github.com/ComputationalPhysiology/cardiac-geometries-core/archive/refs/tags/v1.2.2.tar.gz"

# notify when the package is updated.
maintainers("finsberg")

# FIXME: Add the SPDX identifier of the project's license below.
# See https://spdx.org/licenses/ for a list. Upon manually verifying
# the license, set checked_by to your Github username.
license("MIT", checked_by="finsberg")

version("main", branch="main")
version("1.2.2", sha256="bb7a003474d2f2013dcb2190ca1d30527f1e7aee3626114083f0656dc3830b9d")

# Python version and Build backend
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools@61.2:", type="build")

# Core dependencies
depends_on("py-rich-click", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-gmsh@:4.13.1", type=("build", "run"))
depends_on("gmsh@:4.13.1", type=("build", "run"))
# OpenGL dependency for gmsh
depends_on("mesa-glu", type=("build", "run"))
# X11 library
depends_on("libxcursor", type=("build", "run"))
depends_on("libxft", type=("build", "run"))
depends_on("libxrender", type=("build", "run"))
depends_on("libxinerama", type=("build", "run"))
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack. We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
# spack install py-cardiac-geometries-core
#
# You can edit this file again by typing:
#
# spack edit py-cardiac-geometries-core
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------

from spack_repo.builtin.build_systems.python import PythonPackage

from spack.package import *


class PyCardiacGeometriesx(PythonPackage):
"""General ODE translator"""

homepage = "https://computationalphysiology.github.io/cardiac-geometriesx"
git = "https://github.com/ComputationalPhysiology/cardiac-geometriesx.git"
url = "https://github.com/ComputationalPhysiology/cardiac-geometriesx/archive/refs/tags/v0.12.0.tar.gz"

# notify when the package is updated.
maintainers("finsberg")

# FIXME: Add the SPDX identifier of the project's license below.
# See https://spdx.org/licenses/ for a list. Upon manually verifying
# the license, set checked_by to your Github username.
license("MIT", checked_by="finsberg")

version("main", branch="main")
version("0.12.0", sha256="93698a5d0d8ac7751c458dde963116a9c050c6d534b45cd034aa13dd668cc904")

# Python version and Build backend
depends_on("python@3.10:", type=("build", "run"))
depends_on("py-setuptools@61.2:", type="build")

# Core dependencies
depends_on("py-fenics-dolfinx+petsc4py", type=("build", "run"))
depends_on("py-rich-click", type=("build", "run"))
depends_on("py-cardiac-geometries-core", type=("build", "run"))
depends_on("py-structlog", type=("build", "run"))

depends_on("py-io4dolfinx+adios2+xdmf", type=("build", "run"), when="@main:")
depends_on("py-adios4dolfinx", type=("build", "run"), when="@:0.12")
depends_on("py-scifem", type=("build", "run"))
18 changes: 9 additions & 9 deletions spack_repo/scientificcomputing/packages/py_io4dolfinx/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,25 @@ class PyIo4dolfinx(PythonPackage):

depends_on("cxx", type="build")

depends_on("py-fenics-dolfinx@0.9:", when="@1.1:", type="run")
depends_on("py-fenics-dolfinx@main", when="@main", type="run")
depends_on("py-numpy", type="run")
depends_on("py-packaging", type="run")
depends_on("py-fenics-dolfinx@0.10:", when="@1.1:", type=("build", "run"))
depends_on("py-fenics-dolfinx@main", when="@main", type=("build", "run"))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-packaging", type=("build", "run"))
depends_on("py-setuptools@42:", type="build")

with when("+adios2"):
depends_on("adios2@2.9:+python+hdf5+mpi", type=("build", "run"))
depends_on(
"hdf5@1.12:", type="build"
"hdf5@1.12:", type=("build", "run")
) # NOTE: Remove when https://github.com/spack/spack-packages/issues/3566 is resolved
with when("+h5py"):
depends_on("py-h5py+mpi", type="run")
depends_on("py-h5py+mpi", type=("build", "run"))

with when("+vtkhdf"):
depends_on("py-h5py+mpi", type="run")
depends_on("py-h5py+mpi", type=("build", "run"))

with when("+xdmf"):
depends_on("py-h5py+mpi", type="run")
depends_on("py-h5py+mpi", type=("build", "run"))

with when("+pyvista"):
depends_on("py-pyvista", type="run")
depends_on("py-pyvista", type=("build", "run"))
Loading