Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4af8055
Update box_mesh.py
chemiskyy Jan 6, 2025
7859ccf
Update box_mesh.py
chemiskyy Feb 25, 2026
58753f2
switch to latest mac od and add a pyvista setup
chemiskyy Feb 26, 2026
e607b06
Update box_mesh.py
chemiskyy Feb 26, 2026
0d539b8
install trimesh and embreex
chemiskyy Feb 26, 2026
abb1cd0
Bump Python support to 3.10–3.14 and add nlopt
chemiskyy Feb 26, 2026
006ac16
Drop Python 3.14 from CI and metadata
chemiskyy Feb 26, 2026
09b53b4
Merge branch 'main' into featuremulti_ray_trace
chemiskyy Feb 26, 2026
8810727
Update environment.yml
chemiskyy Feb 26, 2026
22f7739
Unpin scotch and install VTK via pip on Windows
chemiskyy Feb 26, 2026
32123ee
Add VTK to env and remove Windows pip step
chemiskyy Feb 26, 2026
78db056
Update environment.yml
chemiskyy Feb 26, 2026
2af6ef0
Bump conda Python to 3.12 and use macOS arm64
chemiskyy Feb 26, 2026
0bd01e0
Use Anaconda API token for uploads
chemiskyy Feb 26, 2026
651a7db
Use .conda uploads and bash shell in CI
chemiskyy Feb 27, 2026
0c759d1
[skip ci] : add upload
chemiskyy Feb 27, 2026
2abc126
[skip ci]
chemiskyy Feb 27, 2026
660e3b5
[skip ci]
chemiskyy Feb 27, 2026
8c60c2f
Update conda packaging workflows and uploads
chemiskyy Mar 1, 2026
ae52f82
Update build-and-test.yml
chemiskyy Mar 1, 2026
2e9a3ad
Update build-docs.yml
chemiskyy Mar 2, 2026
efdd5fd
Update meta.yaml
chemiskyy Mar 2, 2026
db01ae2
Disable Scotch for Windows build
chemiskyy Mar 2, 2026
46e8763
Update environment.yml
chemiskyy Mar 2, 2026
134aee8
Update environment.yml
chemiskyy Mar 2, 2026
c592152
Update environment.yml
chemiskyy Mar 2, 2026
c2700e3
Update build-and-test.yml
chemiskyy Mar 2, 2026
6c2488b
Update environment.yml
chemiskyy Mar 2, 2026
d8a8fe6
Update meta.yaml
chemiskyy Mar 2, 2026
d958ffd
Update build-and-test.yml
chemiskyy Mar 2, 2026
660b138
Update build-and-test.yml
chemiskyy Mar 2, 2026
9c2875b
Update build-and-test.yml
chemiskyy Mar 2, 2026
59ddb91
Update build-and-test.yml
chemiskyy Mar 2, 2026
4522452
CI: drop Python 3.13, test 3.12 instead
chemiskyy Mar 2, 2026
306fd1f
Add build env vars, retry flag; remove py3.13
chemiskyy Mar 3, 2026
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
3 changes: 2 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
# "macos-13", # x86_64
"macos-latest", # arm64
]
python-version: ["3.9", "3.12"]
python-version: ["3.10", "3.12"]
# Python 3.13 excluded: VTK 9.3.1 has no 3.13 wheel on PyPI (tested via conda in integration.yml)

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ jobs:
python-version: "3.12"
cache: "pip"

- uses: pyvista/setup-headless-display-action@v3

- name: Install libGLU
run: sudo apt-get install libglu1-mesa

- name: Install
run: pip install .[docs]

- name: Install vtk
run: pip uninstall vtk -y && pip install vtk-osmesa --extra-index-url https://wheels.vtk.org

- name: Build docs
run: make -C docs html

Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/conda-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ jobs:
activate-environment: packaging

- name: Conda build
shell: pwsh
shell: bash -l {0}
env:
PACKAGE_VERSION: ${{ github.ref_name }}
BRANCH_NAME: ${{ github.ref_name }}
run: |
# export PACKAGE_VERSION="${BRANCH_NAME//-/_}"
$env:PACKAGE_VERSION = $env:BRANCH_NAME -replace "-", "_"
Comment thread
chemiskyy marked this conversation as resolved.
conda install python conda-build conda-verify anaconda-client
anaconda logout
anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build conda.recipe -c conda-forge --output-folder .
anaconda upload noarch/*.tar.bz2 --force
anaconda logout
conda install -y conda-build anaconda-client
conda config --set anaconda_upload no
conda-build conda.recipe -c conda-forge --output-folder .

- name: Upload to Anaconda
shell: bash -l {0}
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
anaconda upload noarch/*.conda --force --no-progress
3 changes: 2 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.12"]
python-version: ["3.10", "3.12", "3.13"]
Comment thread
chemiskyy marked this conversation as resolved.

steps:
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@v3
- uses: mamba-org/setup-micromamba@v2
with:
generate-run-shell: true
Expand Down
46 changes: 29 additions & 17 deletions .github/workflows/mmg-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@ jobs:
- name: Conda build for Linux
shell: bash -l {0}
run: |
conda install python=3.9 conda-build anaconda-client
anaconda logout
anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build mmg.recipe -c conda-forge -c set3mah --output-folder .
anaconda upload linux-64/*.tar.bz2 --force
conda install python=3.12 conda-build anaconda-client
conda config --set anaconda_upload no
conda-build mmg.recipe -c conda-forge -c set3mah --output-folder .
- name: Upload to Anaconda
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
anaconda upload linux-64/*.conda --force --no-progress

macos:
name: MacOS
runs-on: "macos-13"
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
Expand All @@ -38,11 +42,15 @@ jobs:
- name: Conda build for MacOS
shell: bash -l {0}
run: |
conda install python=3.9 conda-build anaconda-client
anaconda logout
anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build mmg.recipe -c conda-forge -c set3mah --output-folder .
anaconda upload osx-64/*.tar.bz2 --force
conda install python=3.12 conda-build anaconda-client
conda config --set anaconda_upload no
conda-build mmg.recipe -c conda-forge -c set3mah --output-folder .
- name: Upload to Anaconda
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
anaconda upload osx-arm64/*.conda --force --no-progress

windows:
name: Windows
Expand All @@ -54,10 +62,14 @@ jobs:
miniconda-version: "latest"
activate-environment: packaging
- name: Conda build for Windows
shell: pwsh
shell: bash -l {0}
run: |
conda install python=3.12 conda-build anaconda-client
conda config --set anaconda_upload no
conda-build mmg.recipe -c conda-forge -c set3mah --output-folder .
- name: Upload to Anaconda
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
conda install python=3.9 conda-build anaconda-client
anaconda logout
anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build mmg.recipe -c conda-forge -c set3mah --output-folder .
anaconda upload win-64/*.tar.bz2 --force
anaconda upload win-64/*.conda --force --no-progress
46 changes: 29 additions & 17 deletions .github/workflows/neper-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,19 @@ jobs:
- name: Conda build for Linux
shell: bash -l {0}
run: |
conda install python=3.9 conda-build anaconda-client
anaconda logout
anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build neper.recipe -c conda-forge -c set3mah --output-folder .
anaconda upload linux-64/*.tar.bz2 --force
conda install python=3.12 conda-build anaconda-client
conda config --set anaconda_upload no
conda-build neper.recipe -c conda-forge -c set3mah --output-folder .
- name: Upload to Anaconda
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
anaconda upload linux-64/*.conda --force --no-progress

macos:
name: MacOS
runs-on: "macos-13"
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
Expand All @@ -38,11 +42,15 @@ jobs:
- name: Conda build for MacOS
shell: bash -l {0}
run: |
conda install python=3.9 conda-build anaconda-client
anaconda logout
anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build neper.recipe -c conda-forge -c set3mah --output-folder .
anaconda upload osx-64/*.tar.bz2 --force
conda install python=3.12 conda-build anaconda-client
conda config --set anaconda_upload no
conda-build neper.recipe -c conda-forge -c set3mah --output-folder .
- name: Upload to Anaconda
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
anaconda upload osx-arm64/*.conda --force --no-progress

windows:
name: Windows
Expand All @@ -54,10 +62,14 @@ jobs:
miniconda-version: "latest"
activate-environment: packaging
- name: Conda build for Windows
shell: pwsh
shell: bash -l {0}
run: |
conda install python=3.12 conda-build anaconda-client
conda config --set anaconda_upload no
conda-build neper.recipe -c conda-forge -c set3mah --output-folder .
- name: Upload to Anaconda
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
run: |
conda install python=3.9 conda-build anaconda-client
anaconda logout
anaconda login --username ${{ secrets.ANACONDA_USERNAME }} --password ${{ secrets.ANACONDA_PASSWORD }}
conda-build neper.recipe -c conda-forge -c set3mah --output-folder .
anaconda upload win-64/*.tar.bz2 --force
anaconda upload win-64/*.conda --force --no-progress
2 changes: 1 addition & 1 deletion .github/workflows/test-conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-13"]
os: ["ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
Expand Down
2 changes: 1 addition & 1 deletion conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ requirements:
- python >=3.9,<3.13
- numpy
- vtk
- pyvista
- pyvista <0.47
- python-gmsh
- meshio
- cadquery
Expand Down
5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ channels:
- set3mah

dependencies:
- numpy <2
- pyvista
- numpy
- pyvista <0.47
- matplotlib
- scipy
- python-gmsh
- meshio
Expand Down
8 changes: 7 additions & 1 deletion microgen/box_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
from .rve import Rve
from .single_mesh import SingleMesh, check_if_only_linear_tetrahedral

USE_MULTI_RAY = False
try:
import trimesh

USE_MULTI_RAY = trimesh.ray.has_embree
except ImportError:
USE_MULTI_RAY = False

AXES = ("x", "y", "z")
AXES_PAIRS = (("x", "y"), ("x", "z"), ("y", "z"))
Expand Down Expand Up @@ -573,6 +578,7 @@ def closest_cells_on_boundaries(
raytraceresult = surface_p.multi_ray_trace(
origins=face,
directions=directions,
retry=True,
)
else:
intersection_points = []
Expand Down
3 changes: 2 additions & 1 deletion mmg.recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake -S . -B build ^
-G "Visual Studio 17 2022" ^
-DCMAKE_BUILD_TYPE:STRING=Release ^
-DCMAKE_INSTALL_PREFIX:PATH=%PREFIX%
-DCMAKE_INSTALL_PREFIX:PATH=%PREFIX% ^
-DUSE_SCOTCH=OFF

cmake --build build --target ALL_BUILD --config Release
cmake --install build
5 changes: 3 additions & 2 deletions mmg.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package:

source:
git_url: https://github.com/MmgTools/mmg.git
git_tag: v5.8.0

build:
number: 0
Expand All @@ -20,9 +21,9 @@ requirements:
- make # [unix]
host:
- cmake
- scotch 6.0.*
- scotch # [not win]
run:
- scotch 6.0.*
- scotch # [not win]

about:
home: https://github.com/MmgTools/mmg
Expand Down
4 changes: 2 additions & 2 deletions neper.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ requirements:
- libblas
- llvm-openmp # [osx]
- gsl
- scotch 6.0.*
- scotch
- nlopt
- openmp #[not osx]
- occt 7.7.0
run:
- gsl
- scotch 6.*
- scotch
- llvm-openmp # [osx]
- nlopt
- openmp #[not osx]
Expand Down
22 changes: 9 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "1.4.0.dev0"
authors = [{ name = "3MAH", email = 'set3mah@gmail.com' }]
description = "Microstructure generation and meshing"
readme = "README.md"
requires-python = ">=3.9,<3.13"
requires-python = ">=3.10"
keywords = ["microstructure", "lattice", "periodic", "TPMS", "mesh"]
license = { text = "GPLv3" }
classifiers = [
Expand All @@ -13,20 +13,12 @@ classifiers = [
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: MacOS',
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
# Python 3.13 not yet supported via pip (VTK 9.3.1 has no 3.13 wheel on PyPI)
]

dependencies = [
"cadquery>=2.5.0,<2.6",
"gmsh>=4.13.1,<5",
"meshio>=5.3.5,<6",
"numpy>1.24.0,<3",
"pyvista>=0.44.2,<0.47",
"scipy>=1.13.1,<1.16",
]
dependencies = ["numpy", "pyvista", "gmsh", "meshio", "cadquery", "scipy", "nlopt"]

[project.optional-dependencies]
dev = [
Expand All @@ -46,6 +38,10 @@ docs = [
"mock>=5.1.0",
"myst-parser>=3.0.1",
]
ray = [
"trimesh",
"embreex",
]
jupyter = [
"jupyterlab>=3.6.8,<4.4",
"jupyter-cadquery>=2.2.1",
Expand All @@ -54,7 +50,7 @@ jupyter = [
"sidecar>=0.5.2",
"jupyterview>=0.7.0",
]
all = ["microgen[dev, docs, jupyter]"]
all = ["microgen[dev, docs, jupyter, ray]"]

[project.urls]
Documentation = 'https://microgen.readthedocs.io/en/latest'
Expand All @@ -75,7 +71,7 @@ module = ["gmsh", "scipy.spatial"]
ignore_missing_imports = true

[tool.ruff]
target-version = "py38"
target-version = "py310"

[tool.ruff.lint]
exclude = [
Expand Down
Loading
Loading