Skip to content

Commit 5f97b1b

Browse files
committed
Merge branch 'main' into refine_image
2 parents 7252aa3 + cfc9f2e commit 5f97b1b

34 files changed

Lines changed: 785 additions & 174 deletions

.ci/azure/setup_env.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ set -ex #echo on and exit if any line fails
44
# TF_BUILD is set to True on azure pipelines.
55
is_azure=$(echo "${TF_BUILD:-false}" | tr '[:upper:]' '[:lower:]')
66
do_doc=$(echo "${DOC_BUILD:-false}" | tr '[:upper:]' '[:lower:]')
7+
is_free_threaded=$(echo "${PYTHON_FREETHREADING:-false}" | tr '[:upper:]' '[:lower:]')
8+
is_rc=$(echo "${PYTHON_RELEASE_CANDIDATE:-false}" | tr '[:upper:]' '[:lower:]')
79

810
if ${is_azure}
911
then
@@ -13,9 +15,19 @@ then
1315
fi
1416
fi
1517

16-
cp .ci/environment_test.yml environment_test_with_pyversion.yml
17-
echo " - python="$PYTHON_VERSION >> environment_test_with_pyversion.yml
18+
if ${is_free_threaded}
19+
then
20+
cp .ci/environment_test_bare.yml environment_test_with_pyversion.yml
21+
echo " - python-freethreading="$PYTHON_VERSION >> environment_test_with_pyversion.yml
22+
else
23+
cp .ci/environment_test.yml environment_test_with_pyversion.yml
24+
echo " - python="$PYTHON_VERSION >> environment_test_with_pyversion.yml
25+
fi
1826

27+
if ${is_rc}
28+
then
29+
sed -i '/^channels:/a\ - conda-forge/label/python_rc' environment_test_with_pyversion.yml
30+
fi
1931
conda env create --file environment_test_with_pyversion.yml
2032
rm environment_test_with_pyversion.yml
2133

.ci/azure/test.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,56 @@ jobs:
22
- job:
33
strategy:
44
matrix:
5-
linux-Python310:
6-
image: ubuntu-latest
7-
python.version: '3.10'
8-
coverage: True
95
linux-Python311:
106
image: ubuntu-latest
117
python.version: '3.11'
8+
coverage: True
129
linux-Python312:
1310
image: ubuntu-latest
1411
python.version: '3.12'
15-
osx-Python310:
16-
image: macOS-latest
17-
python.version: '3.10'
12+
linux-Python313:
13+
image: ubuntu-latest
14+
python.version: '3.13'
15+
linux-Python313t:
16+
image: ubuntu-latest
17+
python.version: '3.13'
18+
python.freethreading: True
19+
coverage: True
20+
linux-Python314:
21+
image: ubuntu-latest
22+
python.version: '3.14'
23+
python.release_candidate: True
24+
linux-Python314t:
25+
image: ubuntu-latest
26+
python.version: '3.14'
27+
python.freethreading: True
28+
python.release_candidate: True
1829
osx-Python311:
1930
image: macOS-latest
2031
python.version: '3.11'
2132
osx-Python312:
2233
image: macOS-latest
2334
python.version: '3.12'
24-
win-Python310:
25-
image: windows-latest
26-
python.version: '3.10'
35+
osx-Python313:
36+
image: macOS-latest
37+
python.version: '3.13'
38+
osx-Python313t:
39+
image: macOS-latest
40+
python.version: '3.13'
41+
python.freethreading: True
2742
win-Python311:
2843
image: windows-latest
2944
python.version: '3.11'
3045
win-Python312:
3146
image: windows-latest
3247
python.version: '3.12'
48+
win-Python313:
49+
image: windows-latest
50+
python.version: '3.13'
51+
win-Python313t:
52+
image: windows-latest
53+
python.version: '3.13'
54+
python.freethreading: True
3355
displayName: "${{ variables.image }} ${{ variables.python.version }}"
3456
pool:
3557
vmImage: $(image)

.ci/environment_test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ dependencies:
1212
- matplotlib
1313

1414
# documentation
15-
- sphinx
16-
- pydata-sphinx-theme==0.15.4
17-
- sphinx-gallery>=0.1.13
18-
- numpydoc>=1.5
15+
- sphinx==8.1.3
16+
- pydata-sphinx-theme==0.16.1
17+
- sphinx-gallery==0.19.0
18+
- numpydoc==1.9.0
1919
- jupyter
2020
- graphviz
2121
- pillow
@@ -31,5 +31,5 @@ dependencies:
3131
- meson-python>=0.14.0
3232
- meson
3333
- ninja
34-
- cython>=0.29.35
34+
- cython>=3.1.0
3535
- setuptools_scm

.ci/environment_test_bare.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: discretize-test
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- numpy>=1.22.4
6+
- scipy>=1.12
7+
8+
# testing
9+
- sympy
10+
- pytest
11+
- pytest-cov
12+
13+
# Building
14+
- pip
15+
- meson-python>=0.14.0
16+
- meson
17+
- ninja
18+
- cython>=3.1.0
19+
- setuptools_scm

.github/workflows/build_distributions.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
# macos-13 is an intel runner, macos-14 is apple silicon
12-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
11+
# macos-15-intel is an Intel runner, macos-14 is Apple silicon
12+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-15-intel, macos-14]
1313

1414
steps:
15-
- uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
15+
- uses: actions/checkout@v5
1816

1917
- name: Build wheels
20-
uses: pypa/cibuildwheel@v2.21.3
18+
uses: pypa/cibuildwheel@v3.2.0
2119

2220
- uses: actions/upload-artifact@v4
2321
with:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013-2024 SimPEG Developers
3+
Copyright (c) 2013-2025 SimPEG Developers
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

discretize/_extensions/interputils_cython.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# cython: embedsignature=True, language_level=3
22
# cython: linetrace=True
3+
# cython: freethreading_compatible = True
34
import numpy as np
45
import cython
56
cimport numpy as np

discretize/_extensions/simplex_helpers.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# distutils: language=c++
22
# cython: embedsignature=True, language_level=3
33
# cython: linetrace=True
4+
# cython: freethreading_compatible = True
45

56
from libcpp.pair cimport pair
67
from libcpp.unordered_map cimport unordered_map

discretize/_extensions/tree.pxd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ cdef extern from "tree.h":
6868
inline Node* max_node()
6969
double operator[](int_t)
7070

71+
ctypedef int (*eval_func_ptr)(void*, Cell*)
7172
cdef cppclass PyWrapper:
7273
PyWrapper()
73-
void set(void*, int(*)(void*, Cell*))
74+
void set(void*, eval_func_ptr eval)
7475

7576
cdef cppclass Tree:
7677
int_t n_dim

0 commit comments

Comments
 (0)