Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging for 0.11.1 #385

Merged
merged 6 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion discretize/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def check_derivative(
fctn,
x0,
num=7,
plotIt=True,
plotIt=False,
dx=None,
expectedOrder=2,
tolerance=0.85,
Expand Down
11 changes: 8 additions & 3 deletions docs/_static/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
"url": "https://discretize.simpeg.xyz/en/main/"
},
{
"name": "0.11.0 (stable)",
"version": "v0.11.0",
"url": "https://discretize.simpeg.xyz/en/v0.11.0/",
"name": "0.11.1 (stable)",
"version": "v0.11.1",
"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",
Expand Down
29 changes: 18 additions & 11 deletions docs/content/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
============

Expand Down Expand Up @@ -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
Expand All @@ -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
=========================
Expand Down
38 changes: 38 additions & 0 deletions docs/release/0.11.1-notes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.. currentmodule:: discretize

.. _0.11.1_notes:

===================================
``discretize`` 0.11.1 Release Notes
===================================

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
`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.


Contributors
============
* @jcapriot

Pull requests
=============

* Outstanding bugfixes. by @jcapriot in `#382 <https://github.com/simpeg/discretize/pull/382>`__.
* Warn for non-repeatable random tests in a testing environment by @jcapriot in `#384 <https://github.com/simpeg/discretize/pull/384>`__.
* Staging for 0.11.1 by @jcapriot in `#385 <https://github.com/simpeg/discretize/pull/385>`__.
1 change: 1 addition & 0 deletions docs/release/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 3 additions & 1 deletion examples/README.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.. _sphx_glr_examples:

Examples
********
********
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down
4 changes: 2 additions & 2 deletions tests/base/test_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down