diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a5d4714b..5dd8bba0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -26,12 +26,12 @@ jobs: # "macos-13", # x86_64 "macos-latest", # arm64 ] - python-version: ["3.9", "3.12"] + python-version: ["3.9", "3.13"] steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v4 + - uses: pyvista/setup-headless-display-action@v3 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 06fa0935..f0a18afc 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -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"] steps: - uses: actions/checkout@v4 + - uses: pyvista/setup-headless-display-action@v3 - uses: mamba-org/setup-micromamba@v2 with: generate-run-shell: true diff --git a/.github/workflows/mmg-packaging.yml b/.github/workflows/mmg-packaging.yml index 55499d74..fb908261 100644 --- a/.github/workflows/mmg-packaging.yml +++ b/.github/workflows/mmg-packaging.yml @@ -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_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 @@ -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_TOKEN }} + run: | + anaconda upload osx-arm64/*.conda --force --no-progress windows: name: Windows @@ -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_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 diff --git a/.github/workflows/neper-packaging.yml b/.github/workflows/neper-packaging.yml index 3ff5d58f..74f1d996 100644 --- a/.github/workflows/neper-packaging.yml +++ b/.github/workflows/neper-packaging.yml @@ -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_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 @@ -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_TOKEN }} + run: | + anaconda upload osx-arm64/*.conda --force --no-progress windows: name: Windows @@ -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_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 diff --git a/.github/workflows/test-conda-package.yml b/.github/workflows/test-conda-package.yml index 438ae1f2..0797b53d 100644 --- a/.github/workflows/test-conda-package.yml +++ b/.github/workflows/test-conda-package.yml @@ -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 diff --git a/environment.yml b/environment.yml index 71265efc..852ccfd2 100755 --- a/environment.yml +++ b/environment.yml @@ -4,8 +4,8 @@ channels: - set3mah dependencies: - - numpy <2 - - pyvista + - numpy + - pyvista <0.46.5 - scipy - python-gmsh - meshio diff --git a/microgen/box_mesh.py b/microgen/box_mesh.py index cc649663..11267ef1 100644 --- a/microgen/box_mesh.py +++ b/microgen/box_mesh.py @@ -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")) diff --git a/mmg.recipe/meta.yaml b/mmg.recipe/meta.yaml index dc58f534..fc0848e4 100644 --- a/mmg.recipe/meta.yaml +++ b/mmg.recipe/meta.yaml @@ -20,9 +20,9 @@ requirements: - make # [unix] host: - cmake - - scotch 6.0.* + - scotch run: - - scotch 6.0.* + - scotch about: home: https://github.com/MmgTools/mmg diff --git a/neper.recipe/meta.yaml b/neper.recipe/meta.yaml index 441dac5e..a133f6b7 100644 --- a/neper.recipe/meta.yaml +++ b/neper.recipe/meta.yaml @@ -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] diff --git a/pyproject.toml b/pyproject.toml index 35ad8790..50ccdebd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ @@ -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", + "Programming Language :: Python :: 3.13", ] - -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 = [ @@ -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", @@ -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' @@ -75,7 +71,7 @@ module = ["gmsh", "scipy.spatial"] ignore_missing_imports = true [tool.ruff] -target-version = "py38" +target-version = "py310" [tool.ruff.lint] exclude = [