diff --git a/.ci/azure/run_tests.sh b/.ci/azure/run_tests.sh index 3ba8537f1..38f2d37b1 100755 --- a/.ci/azure/run_tests.sh +++ b/.ci/azure/run_tests.sh @@ -10,23 +10,19 @@ test_args="" source activate discretize-test -if ${do_doc} -then - if ${is_azure} - then +if [[ "$is_azure" == "true" ]]; then + if [[ "$do_doc" == "true" ]]; then .ci/setup_headless_display.sh fi fi -if ${do_cov} -then +if [[ "do_cov" == "true" ]]; then echo "Testing with coverage" test_args="--cov --cov-config=pyproject.toml $test_args" fi pytest -vv $test_args -if ${do_cov} -then +if [[ "do_cov" == "true" ]]; then coverage xml fi diff --git a/.ci/azure/setup_env.sh b/.ci/azure/setup_env.sh index 0bbeb76ca..11baca133 100755 --- a/.ci/azure/setup_env.sh +++ b/.ci/azure/setup_env.sh @@ -6,17 +6,15 @@ is_azure=$(echo "${TF_BUILD:-false}" | tr '[:upper:]' '[:lower:]') do_doc=$(echo "${DOC_BUILD:-false}" | tr '[:upper:]' '[:lower:]') is_free_threaded=$(echo "${PYTHON_FREETHREADING:-false}" | tr '[:upper:]' '[:lower:]') is_rc=$(echo "${PYTHON_RELEASE_CANDIDATE:-false}" | tr '[:upper:]' '[:lower:]') +is_bare=$(echo "${ENVIRON_BARE:-false}" | tr '[:upper:]' '[:lower:]') -if ${is_azure} -then - if ${do_doc} - then +if [[ "$is_azure" == "true" ]]; then + if [[ "$do_doc" == "true" ]]; then .ci/setup_headless_display.sh fi fi -if ${is_free_threaded} -then +if [[ "$is_free_threaded" == "true" || "$is_bare" == "true" ]]; then cp .ci/environment_test_bare.yml environment_test_with_pyversion.yml echo " - python-freethreading="$PYTHON_VERSION >> environment_test_with_pyversion.yml else @@ -24,15 +22,13 @@ else echo " - python="$PYTHON_VERSION >> environment_test_with_pyversion.yml fi -if ${is_rc} -then +if [[ "$is_rc" == "true" ]]; then sed -i '/^channels:/a\ - conda-forge/label/python_rc' environment_test_with_pyversion.yml fi conda env create --file environment_test_with_pyversion.yml rm environment_test_with_pyversion.yml -if ${is_azure} -then +if [[ "$is_azure" == "true" ]]; then source activate discretize-test pip install pytest-azurepipelines else diff --git a/.ci/azure/test.yml b/.ci/azure/test.yml index d5aee98b7..04599008a 100644 --- a/.ci/azure/test.yml +++ b/.ci/azure/test.yml @@ -15,17 +15,18 @@ jobs: linux-Python313t: image: ubuntu-latest python.version: '3.13' + environ.bare: True python.freethreading: True coverage: True linux-Python314: image: ubuntu-latest + environ.bare: True python.version: '3.14' - python.release_candidate: True linux-Python314t: image: ubuntu-latest python.version: '3.14' + environ.bare: True python.freethreading: True - python.release_candidate: True osx-Python311: image: macOS-latest python.version: '3.11' @@ -39,6 +40,15 @@ jobs: image: macOS-latest python.version: '3.13' python.freethreading: True + osx-Python314: + image: macOS-latest + python.version: '3.14' + environ.bare: True + osx-Python314t: + image: macOS-latest + python.version: '3.14' + environ.bare: True + python.freethreading: True win-Python311: image: windows-latest python.version: '3.11' @@ -51,6 +61,16 @@ jobs: win-Python313t: image: windows-latest python.version: '3.13' + environ.bare: True + python.freethreading: True + win-Python314: + image: windows-latest + environ.bare: True + python.version: '3.14' + win-Python314t: + image: windows-latest + python.version: '3.14' + environ.bare: True python.freethreading: True displayName: "${{ variables.image }} ${{ variables.python.version }}" pool: diff --git a/README.rst b/README.rst index 750047f49..f78734993 100644 --- a/README.rst +++ b/README.rst @@ -114,7 +114,7 @@ Code: https://github.com/simpeg/discretize Tests: -https://travis-ci.org/simpeg/discretize +https://dev.azure.com/simpeg/discretize/_build Bugs & Issues: https://github.com/simpeg/discretize/issues diff --git a/docs/_static/versions.json b/docs/_static/versions.json index 8ba597fb2..034006ddd 100644 --- a/docs/_static/versions.json +++ b/docs/_static/versions.json @@ -4,11 +4,16 @@ "url": "https://discretize.simpeg.xyz/en/main/" }, { - "name": "0.11.3 (stable)", - "version": "v0.11.3", - "url": "https://discretize.simpeg.xyz/en/v0.11.3/", + "name": "0.12.0 (stable)", + "version": "v0.12.0", + "url": "https://discretize.simpeg.xyz/en/v0.12.0/", "preferred": true }, + { + "name": "0.11.3", + "version": "v0.11.3", + "url": "https://discretize.simpeg.xyz/en/v0.11.3/" + }, { "name": "0.11.2", "version": "v0.11.2", diff --git a/docs/release/0.12.0-notes.rst b/docs/release/0.12.0-notes.rst new file mode 100644 index 000000000..3e20fb64f --- /dev/null +++ b/docs/release/0.12.0-notes.rst @@ -0,0 +1,44 @@ +.. currentmodule:: discretize + +.. _0.12.0_notes: + +=================================== +``discretize`` 0.12.0 Release Notes +=================================== + +October 8, 2025 + +This minor release contains many bugfixes and updates related to new package builds. + +Python versions +--------------- +`discretize` has bumped its minimum supported `python` version to 3.11, and is tested against versions 3.11-3.14. Minimum scipy versions +have also been bumped to 1.12. Users on older python versions should continue to use `discretize` 0.11.x. + +We have also added support for (and tests against) free-threaded python builds for python 3.13 and later, which should be available through +the normal python distribution channels (pypi, conda-forge). + +``TreeMesh`` updates +-------------------- +Tree meshes now support a `refine_image` method that allows users to refine a mesh based on an image (2D or 3D numpy array). See +:func:``discretize.TreeMesh.refine_image`` for more details. + +``TensorMesh`` updates +---------------------- +A new :func:``discretize.TensorMesh.point2index`` method has been added to convert a point location to the corresponding cell index in +a tensor mesh, similar to the existing :func:``discretize.TreeMesh.point2index`` method. + + +Contributors +============ + +* @jcapriot + +Pull requests +============= +* bump sphinx and pydata-sphinx to more recent versions by @jcapriot in `#402 `__ +* Small cleanups to the external TreeMesh code, no functionality changes by @jcapriot in `#400 `__ +* Add point2index functionality for `tensor_mesh` by @jcapriot in `#401 `__ +* Updates for python free threading by @jcapriot in `#403 `__ +* Updates for cibuildwheel by @jcapriot in `#405 `__ +* Add functionality to refine a `TreeMesh` using an "image" by @jcapriot in `#406 `__ diff --git a/docs/release/index.rst b/docs/release/index.rst index d7340f2eb..ae054a53e 100644 --- a/docs/release/index.rst +++ b/docs/release/index.rst @@ -4,6 +4,7 @@ Release Notes .. toctree:: :maxdepth: 2 + 0.12.0 <0.12.0-notes> 0.11.3 <0.11.3-notes> 0.11.2 <0.11.2-notes> 0.11.1 <0.11.1-notes> diff --git a/pyproject.toml b/pyproject.toml index 8186b25cf..ca8148a9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,10 +89,10 @@ style = [ "flake8-pyproject==1.2.3", ] build = [ - "meson-python>=0.14.0", + "meson-python>=0.15.0", "meson", "ninja", - "numpy>=1.22.4", + "numpy>=2.0.0rc1", "cython>=3.1.0", "setuptools_scm", ]