Skip to content

Commit b0d350d

Browse files
committed
Merge branch 'master' into harmonize_solvers
2 parents 5bcd48b + 3c7c8c1 commit b0d350d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+10548
-7304
lines changed

.azure/pipelines.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ stages:
220220
- bash: |
221221
conda create --quiet --name wheelEnvironment --channel conda-forge python=3.10
222222
source activate wheelEnvironment
223-
mkdir tmp
223+
mkdir -p tmp
224224
cd tmp
225225
python -m pip install ../dist/*.whl
226226
FIPY_SOLVERS=scipy python -c "import fipy; fipy.test()"
@@ -232,11 +232,11 @@ stages:
232232
- bash: |
233233
source activate myEnvironment
234234
FIPY_VERSION=`python setup.py --version`
235-
mkdir tmp
235+
mkdir -p tmp
236236
cd tmp
237-
cp ../dist/FiPy-${FIPY_VERSION}.tar.gz .
238-
tar zxvf FiPy-${FIPY_VERSION}.tar.gz
239-
cd FiPy-${FIPY_VERSION}
237+
cp ../dist/fipy-${FIPY_VERSION}.tar.gz .
238+
tar zxvf fipy-${FIPY_VERSION}.tar.gz
239+
cd fipy-${FIPY_VERSION}
240240
python setup.py install
241241
cd ..
242242
python -c "import fipy; fipy.test()"
@@ -248,7 +248,7 @@ stages:
248248
- bash: |
249249
source activate myEnvironment
250250
FIPY_VERSION=`python setup.py --version`
251-
mkdir tmp
251+
mkdir -p tmp
252252
cd tmp
253253
cp ../dist/FiPy-${FIPY_VERSION}.zip .
254254
unzip FiPy-${FIPY_VERSION}.zip

.github/workflows/nix.yml

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: nix
2+
name: Test Nix
33
on: [push, pull_request]
44
jobs:
55
test:
@@ -11,12 +11,23 @@ jobs:
1111
run:
1212
working-directory: ./
1313
steps:
14-
- uses: actions/checkout@v2.3.4
15-
- uses: cachix/install-nix-action@v14.1
14+
- uses: actions/checkout@v3
15+
- uses: cachix/install-nix-action@v20
1616
with:
1717
nix_path: nixpkgs=channel:nixos-unstable
1818
name: fipy
1919
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
2020
extraPullNames: nix-community
21-
- run: nix-shell --pure --command "python setup.py test"
22-
- run: nix-shell --pure --command "py.test --nbval --sanitize-with examples/sanitize.cfg examples/index.ipynb"
21+
- run: echo "UID=${UID}" >> $GITHUB_ENV
22+
- uses: actions/cache/restore@v3
23+
with:
24+
path: /run/user/${{ env.UID }}/http_cache.sqlite
25+
key: ${{ runner.os }}-http_cache.sqlite
26+
- run: nix develop --command bash -c "python setup.py egg_info"
27+
- run: nix develop --command bash -c "python setup.py test"
28+
- run: nix develop --command bash -c "py.test --nbval --nbval-sanitize-with examples/sanitize.cfg examples/index.ipynb"
29+
- uses: actions/cache/save@v3
30+
if: always()
31+
with:
32+
path: /run/user/${{ env.UID }}/http_cache.sqlite
33+
key: ${{ runner.os }}-http_cache.sqlite

CHANGELOG.rst

+70
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,76 @@ Change Log
1111
Version |release|
1212
-----------------
1313

14+
This maintenance release:
15+
16+
- Addresses compatibility with recent releases of
17+
Python 3.12, NumPy 2.0, SciPy 1.14, and PETSc 3.20.
18+
- Adds `conda-lock <https://github.com/conda/conda-lock>`_ environment
19+
lock files with specified compatible versions of FiPy prerequisites.
20+
- Fixes numerous documentation errors.
21+
22+
.. attention::
23+
24+
SciPy 1.13.0 generates one test suite error for
25+
``fipy.matrices.scipyMatrix._ScipyMatrix.CSR``. Either ignore the test
26+
failure or upgrade to SciPy >= 1.13.1
27+
28+
.. attention::
29+
30+
PETSc 3.21 crashes our test suite when running in parallel (`#1054
31+
<https://github.com/usnistgov/fipy/issues/1054>`_). PETSc <= 3.20 is
32+
recommended, although `petsc 3.20.2_*_102 is broken on macOS
33+
<https://github.com/conda-forge/petsc-feedstock/issues/180>`_.
34+
35+
Pulls
36+
-----
37+
38+
- Introduce Timer context manager
39+
(`#995 <https://github.com/usnistgov/fipy/pull/995>`_)
40+
- switch nix recipe to flake
41+
(`#992 <https://github.com/usnistgov/fipy/pull/992>`_)
42+
- Tweak documentation
43+
(`#991 <https://github.com/usnistgov/fipy/pull/991>`_)
44+
- Log much more information about FiPy environment
45+
(`#990 <https://github.com/usnistgov/fipy/pull/990>`_)
46+
- Fix inclusion of `environments/README.rst`
47+
(`#988 <https://github.com/usnistgov/fipy/pull/988>`_)
48+
- Environment pinning
49+
(`#985 <https://github.com/usnistgov/fipy/pull/985>`_)
50+
51+
Fixes
52+
-----
53+
54+
- `#1049 <https://github.com/usnistgov/fipy/issues/1049>`_:
55+
Numpy 2.0.0 breaks things
56+
- `#1010 <https://github.com/usnistgov/fipy/issues/1010>`_:
57+
`examples.diffusion.mesh1D` No-flux - steady-state doesn't always give
58+
zero
59+
- `#1000 <https://github.com/usnistgov/fipy/issues/1000>`_:
60+
`examples.diffusion.mesh1D` constrains a gradient but calls it a flux
61+
- `#997 <https://github.com/usnistgov/fipy/issues/997>`_:
62+
`future.standard_library` breaking python 3.12 compatibility
63+
- `#967 <https://github.com/usnistgov/fipy/issues/967>`_:
64+
Sign error in Robin condition
65+
- `#963 <https://github.com/usnistgov/fipy/issues/963>`_:
66+
PETSc 3.20.0 broke the world
67+
- `#961 <https://github.com/usnistgov/fipy/issues/961>`_:
68+
Representation of index variables is broken
69+
- `#952 <https://github.com/usnistgov/fipy/issues/952>`_:
70+
Uncaught Exception from the no-flux steady-state diffusion example
71+
- `#944 <https://github.com/usnistgov/fipy/issues/944>`_:
72+
Having problem with Viewer
73+
- `#865 <https://github.com/usnistgov/fipy/issues/865>`_:
74+
Sphinx search is broken on website
75+
- `#673 <https://github.com/usnistgov/fipy/issues/673>`_:
76+
Deprecations don't properly format properties
77+
- `#512 <https://github.com/usnistgov/fipy/issues/512>`_:
78+
Default coefficient of `ImplicitSourceTerm` is 0
79+
80+
--------------------------
81+
Version 3.4.4 - 2023-06-27
82+
--------------------------
83+
1484
This maintenance release adds :ref:`LOGGING` and resolves compatibility issues
1585
with recent builds of :term:`PETSc` and :term:`NumPy`.
1686

_setup/changelog.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ def run(self):
194194
wontfix = issues.labels.apply(lambda x: 'wontfix' in x)
195195
invalid = issues.labels.apply(lambda x: 'invalid' in x)
196196
question = issues.labels.apply(lambda x: 'question' in x)
197-
issues = issues[~wontfix & ~invalid & ~question]
197+
worksforme = issues.labels.apply(lambda x: 'worksforme' in x)
198+
duplicate = issues.labels.apply(lambda x: 'duplicate' in x)
199+
issues = issues[~wontfix & ~invalid & ~question & ~worksforme & ~duplicate]
198200

199201
# fix the dates to reflect dates from original Trac issue tracker
200202
trac = (r" _Imported from trac ticket .*, "

docs/source/NIX-README.rst

+7-44
Original file line numberDiff line numberDiff line change
@@ -4,64 +4,27 @@ Nix Installation
44
:term:`FiPy` now has a `Nix`_ expression for installing :term:`FiPy`
55
using `Nix`_. `Nix`_ is a powerful package manager for Linux and other
66
Unix systems that makes package management reliable and
7-
reproducible. The recipe works on both Linux and Mac OS X.
8-
9-
Getting Started with Nix
10-
------------------------
11-
12-
There are a number of tutorials on getting started with `Nix`_. The
13-
page that I used when getting started is on the Blog of the HPC team
14-
of GRICAD,
15-
16-
https://gricad.github.io/calcul/nix/tuto/2017/07/04/nix-tutorial.html
17-
18-
I also made my own notes,
19-
20-
https://github.com/wd15/nixes/blob/master/NIX-NOTES.md
21-
22-
which are a succinct steps that I use when setting up a new system with
23-
Nix.
7+
reproducible. The recipe works on both Linux and Mac OS X. Go to
8+
`nix.dev`_ to get started with Nix.
249

2510
Installing
2611
----------
2712

2813
Once you have a working Nix installation use::
2914

30-
$ nix-shell --pure
15+
$ nix develop
3116

3217
in the base :term:`FiPy` directory to install :term:`FiPy` with Python
33-
3 by default. Modify the `shell.nix` file to use another version of
34-
Python. ``nix-shell`` drops the user into a shell with a working
18+
3 by default. ``nix develop`` drops the user into a shell with a working
3519
version of :term:`FiPy`. To test your installation use::
3620

37-
$ nix-shell --pure --command "python setup.py test"
21+
$ nix develop --command bash -c "python setup.py test"
3822

3923
.. note::
4024

41-
:term:`Trilinos` is currently not available as part of the Nix
42-
:term:`FiPy` installation.
43-
44-
45-
Additional Packages
46-
-------------------
47-
48-
To install additional packages available from Nixpkgs_ include them in
49-
the `nativeBuildInputs` list in `shell.nix`.
50-
51-
52-
Using Pip
53-
---------
54-
55-
Packages unavailable from Nix can be installed using :term:`Pip`. In
56-
this case, the installation has been set up so that the Nix shell
57-
knows about a ``.local`` directory in the base :term:`FiPy` directory
58-
used by :term:`Pip` for installation. So, for example, to install the
59-
``toolz`` package from within the Nix shell use::
60-
61-
$ python -m pip install --user toolz
25+
The SciPy solvers are the only available solvers currently.
6226

63-
The ``.local`` directory will persist after the Nix shell has been
64-
closed.
6527

6628
.. _Nix: https://nixos.org/nix/
6729
.. _Nixpkgs: https://nixos.org/nixpkgs/
30+
.. _nix.dev: https://nix.dev

docs/source/sphinxext/redirecting_html.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from __future__ import unicode_literals
2-
from future import standard_library
3-
standard_library.install_aliases()
42
from docutils import nodes
5-
import urllib.parse
6-
3+
try:
4+
from urllib.parse import urlparse
5+
except ImportError:
6+
from urlparse import urlparse
77
from sphinx.builders.html import StandaloneHTMLBuilder
88

99
class RedirectingHTMLBuilder(StandaloneHTMLBuilder):
@@ -17,7 +17,7 @@ def write_doc(self, docname, doctree):
1717
for node in doctree.traverse(nodes.reference):
1818
try:
1919
uri = node['refuri']
20-
uri = urllib.parse.urlparse(uri)
20+
uri = urlparse(uri)
2121
if uri.scheme in ["http", "https"]:
2222
if not uri.netloc.endswith("nist.gov"):
2323
node['refuri'] = "/cgi-bin/redirect.py?url=" + uri.geturl()

0 commit comments

Comments
 (0)