From 83166c5472894e90f2da5418213279bdd3b16185 Mon Sep 17 00:00:00 2001 From: Joseph Capriotti Date: Tue, 5 Nov 2024 10:27:42 -0700 Subject: [PATCH 1/6] Staging for 0.11.1 bugfix release --- discretize/tests.py | 2 +- docs/_static/versions.json | 7 ++++++- docs/release/0.11.1-notes.rst | 29 +++++++++++++++++++++++++++++ docs/release/index.rst | 1 + 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 docs/release/0.11.1-notes.rst diff --git a/discretize/tests.py b/discretize/tests.py index b5d1bc609..ed8b65eb3 100644 --- a/discretize/tests.py +++ b/discretize/tests.py @@ -582,7 +582,7 @@ def check_derivative( fctn, x0, num=7, - plotIt=True, + plotIt=False, dx=None, expectedOrder=2, tolerance=0.85, diff --git a/docs/_static/versions.json b/docs/_static/versions.json index 772a34c12..29a00b578 100644 --- a/docs/_static/versions.json +++ b/docs/_static/versions.json @@ -6,9 +6,14 @@ { "name": "0.11.0 (stable)", "version": "v0.11.0", - "url": "https://discretize.simpeg.xyz/en/v0.11.0/", + "url": "https://discretize.simpeg.xyz/en/v0.11.1/", "preferred": true }, + { + "name": "0.11.0", + "version": "v0.11.0", + "url": "https://discretize.simpeg.xyz/en/v0.11.0/" + }, { "name": "0.10.0", "version": "v0.10.0", diff --git a/docs/release/0.11.1-notes.rst b/docs/release/0.11.1-notes.rst new file mode 100644 index 000000000..7db052bf0 --- /dev/null +++ b/docs/release/0.11.1-notes.rst @@ -0,0 +1,29 @@ +.. currentmodule:: discretize + +.. _0.11.1_notes: + +=================================== +``discretize`` 0.11.0 Release Notes +=================================== + +October 24, 2024 + +This is a bugfix release for issues found in the previous release, and adds some warning messages for users. + +Warning Messages +================ +* Added a warning to the `TreeMesh` informing of incoming future behavoir changes regarding + diagonal balancing. This will default to ``True`` in `discretize` 1.0. +* Added warning messages to test functions using uncontrolled randomized input that appear when run under + `pytest` or `nosetest`, alerting the user to non-repeatable tests. +* Changed the default for ``plotIt`` argument to ``False`` for testing functions. + +Fixed Bugs +========== +* `TreeMesh.point2index` now refers to the correction function. + +Pull requests +============= + +* Outstanding bugfixes. by @jcapriot in `#347 `__. +* Warn for non-repeatable random tests in a testing environment by @jcapriot in `#384 `__. \ No newline at end of file diff --git a/docs/release/index.rst b/docs/release/index.rst index 1b6cc7b39..48e42fb18 100644 --- a/docs/release/index.rst +++ b/docs/release/index.rst @@ -4,6 +4,7 @@ Release Notes .. toctree:: :maxdepth: 2 + 0.11.1 <0.11.1-notes> 0.11.0 <0.11.0-notes> 0.10.0 <0.10.0-notes> 0.9.0 <0.9.0-notes> From e16cb5dadfb8cc8f7e13200f14e5424e42b073f6 Mon Sep 17 00:00:00 2001 From: Joseph Capriotti Date: Tue, 5 Nov 2024 11:02:21 -0700 Subject: [PATCH 2/6] update notes to point to this PR --- docs/release/0.11.1-notes.rst | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/release/0.11.1-notes.rst b/docs/release/0.11.1-notes.rst index 7db052bf0..e44328500 100644 --- a/docs/release/0.11.1-notes.rst +++ b/docs/release/0.11.1-notes.rst @@ -3,15 +3,18 @@ .. _0.11.1_notes: =================================== -``discretize`` 0.11.0 Release Notes +``discretize`` 0.11.1 Release Notes =================================== -October 24, 2024 +November 5, 2024 This is a bugfix release for issues found in the previous release, and adds some warning messages for users. +Updates +======= + Warning Messages -================ +---------------- * Added a warning to the `TreeMesh` informing of incoming future behavoir changes regarding diagonal balancing. This will default to ``True`` in `discretize` 1.0. * Added warning messages to test functions using uncontrolled randomized input that appear when run under @@ -19,11 +22,17 @@ Warning Messages * Changed the default for ``plotIt`` argument to ``False`` for testing functions. Fixed Bugs -========== +---------- * `TreeMesh.point2index` now refers to the correction function. + +Contributors +============ +* @jcapriot + Pull requests ============= -* Outstanding bugfixes. by @jcapriot in `#347 `__. -* Warn for non-repeatable random tests in a testing environment by @jcapriot in `#384 `__. \ No newline at end of file +* Outstanding bugfixes. by @jcapriot in `#382 `__. +* Warn for non-repeatable random tests in a testing environment by @jcapriot in `#384 `__. +* Staging for 0.11.1 by @jcapriot in `#385 `__. \ No newline at end of file From b570e81770db26093243daac912b0db5ccd6b4a5 Mon Sep 17 00:00:00 2001 From: Joseph Capriotti Date: Tue, 5 Nov 2024 11:02:34 -0700 Subject: [PATCH 3/6] clarify editable install instructions --- docs/content/installing.rst | 29 ++++++++++++++++++----------- examples/README.txt | 4 +++- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/docs/content/installing.rst b/docs/content/installing.rst index 4e1b172f0..318835e1e 100644 --- a/docs/content/installing.rst +++ b/docs/content/installing.rst @@ -23,6 +23,8 @@ You can download the package manager and use it to install the dependencies abov conda update conda conda update anaconda +.. _discretize_dependencies: + Dependencies ============ @@ -61,7 +63,8 @@ systems will require a build. Installing from Source ---------------------- .. attention:: - Install ``discretize`` from the source code only if you need to run the development version. Otherwise it's usually better to install it from ``conda-forge``. + Install ``discretize`` from the source code only if you need to run the development version. + Otherwise it's usually better to install it from ``conda-forge`` or ``pypi``. As ``discretize`` contains several compiled extensions and is not a pure python pacakge, installing ``discretize`` from the source code requires a C/C++ compiler capable of @@ -88,25 +91,29 @@ Editable Installs If you are an active developer of ``discretize``, and find yourself modifying the code often, you might want to install it from source, in an editable installation. ``discretize`` uses ``meson-python`` to build the external modules and install the package. As such, there are a few extra -steps to take. First, make sure you have the runtime dependencies installed in your environment (see Dependencies listed above). -Then you must install some packages needed to build ``discretize`` in your environment. You can do so with ``pip``:: +steps to take: + +1. Make sure you have the runtime dependencies installed in your environment (see :ref:`discretize_dependencies` listed above). + However, you **must** install ``numpy >=2.0`` when *building* ``discretize``. +2. You must also install packages needed to build ``discretize`` into your environment. You can do so with ``pip``:: - pip install meson-python meson ninja cython setuptools_scm + pip install meson-python meson ninja cython setuptools_scm -Or with ``conda`` (or ``mamba``):: + Or with ``conda``:: - conda install -c conda-forge meson-python meson ninja cython setuptools_scm + conda install -c conda-forge meson-python meson ninja cython setuptools_scm -This will allow you to use the build backend required by `discretize`. + This will allow you to use the build backend required by `discretize`. -Finally, you should then be able to perform an editable install using the source code:: +3. Finally, you should then be able to perform an editable install using the source code:: - pip install --no-build-isolation --editable . + pip install --no-build-isolation --editable . This builds and installs the local directory to your active python environment in an -"editable" mode; when source code is changed, you will be able to make use of it immediately. It also builds against the packages installed -in your environment instead of creating and isolated environment to build a wheel for the package. +"editable" mode; when source code is changed, you will be able to make use of it immediately. It also builds against the +packages installed in your environment instead of creating and isolated environment to build a wheel for the package, +which is why we needed to install the build requirements into the environment. Testing your installation ========================= diff --git a/examples/README.txt b/examples/README.txt index 9f935a385..4fb0332db 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -1,2 +1,4 @@ +.. _sphx_glr_examples: + Examples -******** +******** \ No newline at end of file From b222ad7cdd3629d985473b52e1d06e42838c3bc3 Mon Sep 17 00:00:00 2001 From: Joseph Capriotti Date: Tue, 5 Nov 2024 11:25:11 -0700 Subject: [PATCH 4/6] fix version in switcher --- docs/_static/versions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_static/versions.json b/docs/_static/versions.json index 29a00b578..0228a8441 100644 --- a/docs/_static/versions.json +++ b/docs/_static/versions.json @@ -4,8 +4,8 @@ "url": "https://discretize.simpeg.xyz/en/main/" }, { - "name": "0.11.0 (stable)", - "version": "v0.11.0", + "name": "0.11.1 (stable)", + "version": "v0.11.1", "url": "https://discretize.simpeg.xyz/en/v0.11.1/", "preferred": true }, From 0ee4dfb660b95b189e593ab2aea653b6a40bd8e7 Mon Sep 17 00:00:00 2001 From: Joseph Capriotti Date: Tue, 5 Nov 2024 22:05:48 -0700 Subject: [PATCH 5/6] loosen import time test --- tests/base/test_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/base/test_tests.py b/tests/base/test_tests.py index 9146ec6d1..62ca679fb 100644 --- a/tests/base/test_tests.py +++ b/tests/base/test_tests.py @@ -170,8 +170,8 @@ def test_import_time(): # Capture it out = subprocess.run(cmd, capture_output=True) - # Currently we check t < 1.0s. - assert float(out.stderr.decode("utf-8")[:-1]) < 1.0 + # Currently we check t < 1.25s. + assert float(out.stderr.decode("utf-8")[:-1]) < 1.25 def test_random_test_warning(): From 2284652615a42e38f4a883e14c3ff6f55b0382d8 Mon Sep 17 00:00:00 2001 From: Joseph Capriotti Date: Tue, 5 Nov 2024 22:07:07 -0700 Subject: [PATCH 6/6] remove comment in pyproject related to building against lower numpy versions. --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c4b6f5fb9..c6264fa69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,9 +9,6 @@ requires = [ # numpy requirement for wheel builds for distribution on PyPI - building # against 2.x yields wheels that are also compatible with numpy 1.x at # runtime. - # Note that building against numpy 1.x works fine too - users and - # redistributors can do this by installing the numpy version they like and - # disabling build isolation. "numpy>=2.0.0rc1", ]