Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6efd73e
Add script for meshing
finsberg Feb 24, 2025
5652625
Use conda in CI
finsberg Feb 24, 2025
e754f06
Add environment.yml file
finsberg Feb 25, 2025
7da554a
Do not specify mamba-verrsion
finsberg Feb 25, 2025
2893026
Try to use miniforge
finsberg Feb 25, 2025
588c247
Do not auto-update conda
finsberg Feb 25, 2025
dad5861
Add pip as dependency
finsberg Feb 25, 2025
0abb14d
Set lower bound on fenicsx
finsberg Feb 25, 2025
da4440d
Use python3.12 to build docs
finsberg Feb 25, 2025
7e84e72
Remove option about use_only_tar_bz2
finsberg Feb 25, 2025
fc696c1
Skip tests on windows (since fenicsx is not available there)
finsberg Feb 25, 2025
c855352
Add license
finsberg Feb 25, 2025
a6909e6
Add cli example
finsberg Feb 25, 2025
3163c75
Do not specify python version in build docs workflow
finsberg Feb 25, 2025
7b072a2
Try add some pvista deps
finsberg Feb 25, 2025
67dfdb8
Add sudo
finsberg Feb 25, 2025
f660837
Move back to using docker for docs
finsberg Feb 25, 2025
500eabe
Add wildmeshing to test dependencies
finsberg Feb 25, 2025
02ac3fd
Do not specify lower bound on fenicsx
finsberg Feb 25, 2025
c19dcef
Do not specify miniforge verrsioN
finsberg Feb 25, 2025
0a23966
Try to set bash shell
finsberg Feb 25, 2025
d22e207
Try to set som lbgl env variable and add __future__ annotations import
finsberg Feb 25, 2025
148a482
Use optional rather thant | to support python3.9
finsberg Feb 26, 2025
5e26a4b
Try to add some more dependencies for pyvista
finsberg Feb 26, 2025
2f930fa
Try to add start_xvfb
finsberg Feb 27, 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
15 changes: 6 additions & 9 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ on:
workflow_dispatch:

env:
DEB_PYTHON_INSTALL_LAYOUT: deb_system
HDF5_MPI: "ON"
HDF5_DIR: "/usr/local/"
DISPLAY: ":99.0"
CI: 1
DEB_PYTHON_INSTALL_LAYOUT: deb_system
LIBGL_ALWAYS_SOFTWARE: 1

jobs:

build:
runs-on: ubuntu-22.04
container: ghcr.io/fenics/dolfinx/lab:stable
env:
PUBLISH_DIR: ./_build/html
DISPLAY: ":99.0"
PYVISTA_TRAME_SERVER_PROXY_PREFIX: "/proxy/"
PYVISTA_TRAME_SERVER_PROXY_ENABLED: "True"
PYVISTA_OFF_SCREEN: false
Expand All @@ -28,12 +30,7 @@ jobs:
uses: actions/checkout@v4

- name: Install dependencies for pyvista
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev xvfb

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.12
run: apt-get update && apt-get install -y libxrender1 xvfb

- name: Install dependencies
run: python3 -m pip install ".[docs]"
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,44 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]


steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5

- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-py-${{ matrix.python-version }}${{
hashFiles('environment.yml') }}

- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
auto-update-conda: false
channels: conda-forge
activate-environment: mri2mesh
environment-file: environment.yml

- name: Install mri2mesh
shell: bash -el {0}
run: |
python -m pip install -e ".[test]"

- name: Test with pytest
shell: bash -el {0}
run: |
python -m pytest --cov=mri2mesh --cov-report html --cov-report xml --cov-report term-missing -v

- name: Coverage report
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
shell: bash -el {0}
run: |
python3 -m coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY
python3 -m coverage json
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ repos:
- id: mypy
files: ^src/|^tests/
args: ["--config-file", "pyproject.toml"]
additional_dependencies: ['types-toml', 'types-PyYAML']


- repo: https://github.com/kynan/nbstripout
Expand Down
1 change: 1 addition & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parts:
- caption: Examples
chapters:
- file: "examples/synthseg.ipynb"
- file: "examples/cli.ipynb"
- caption: Community
chapters:
- file: "CONTRIBUTING"
Expand Down
20 changes: 20 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: mri2mesh
channels:
- conda-forge
dependencies:
- numpy
- fenics-dolfinx
- ipython
- matplotlib
- pyvista
- scikit-image
- meshio
- h5py
- seaborn
- nibabel
- imageio-ffmpeg
- napari
- jupyter
- pip
- pip:
- wildmeshing
Loading
Loading