Skip to content

Commit

Permalink
Merge branch 'master' into harmonize_solvers
Browse files Browse the repository at this point in the history
  • Loading branch information
guyer committed Jun 26, 2024
2 parents 5bcd48b + 3c7c8c1 commit b0d350d
Show file tree
Hide file tree
Showing 46 changed files with 10,548 additions and 7,304 deletions.
12 changes: 6 additions & 6 deletions .azure/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ stages:
- bash: |
conda create --quiet --name wheelEnvironment --channel conda-forge python=3.10
source activate wheelEnvironment
mkdir tmp
mkdir -p tmp
cd tmp
python -m pip install ../dist/*.whl
FIPY_SOLVERS=scipy python -c "import fipy; fipy.test()"
Expand All @@ -232,11 +232,11 @@ stages:
- bash: |
source activate myEnvironment
FIPY_VERSION=`python setup.py --version`
mkdir tmp
mkdir -p tmp
cd tmp
cp ../dist/FiPy-${FIPY_VERSION}.tar.gz .
tar zxvf FiPy-${FIPY_VERSION}.tar.gz
cd FiPy-${FIPY_VERSION}
cp ../dist/fipy-${FIPY_VERSION}.tar.gz .
tar zxvf fipy-${FIPY_VERSION}.tar.gz
cd fipy-${FIPY_VERSION}
python setup.py install
cd ..
python -c "import fipy; fipy.test()"
Expand All @@ -248,7 +248,7 @@ stages:
- bash: |
source activate myEnvironment
FIPY_VERSION=`python setup.py --version`
mkdir tmp
mkdir -p tmp
cd tmp
cp ../dist/FiPy-${FIPY_VERSION}.zip .
unzip FiPy-${FIPY_VERSION}.zip
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: nix
name: Test Nix
on: [push, pull_request]
jobs:
test:
Expand All @@ -11,12 +11,23 @@ jobs:
run:
working-directory: ./
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v14.1
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
name: fipy
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
extraPullNames: nix-community
- run: nix-shell --pure --command "python setup.py test"
- run: nix-shell --pure --command "py.test --nbval --sanitize-with examples/sanitize.cfg examples/index.ipynb"
- run: echo "UID=${UID}" >> $GITHUB_ENV
- uses: actions/cache/restore@v3
with:
path: /run/user/${{ env.UID }}/http_cache.sqlite
key: ${{ runner.os }}-http_cache.sqlite
- run: nix develop --command bash -c "python setup.py egg_info"
- run: nix develop --command bash -c "python setup.py test"
- run: nix develop --command bash -c "py.test --nbval --nbval-sanitize-with examples/sanitize.cfg examples/index.ipynb"
- uses: actions/cache/save@v3
if: always()
with:
path: /run/user/${{ env.UID }}/http_cache.sqlite
key: ${{ runner.os }}-http_cache.sqlite
70 changes: 70 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,76 @@ Change Log
Version |release|
-----------------

This maintenance release:

- Addresses compatibility with recent releases of
Python 3.12, NumPy 2.0, SciPy 1.14, and PETSc 3.20.
- Adds `conda-lock <https://github.com/conda/conda-lock>`_ environment
lock files with specified compatible versions of FiPy prerequisites.
- Fixes numerous documentation errors.

.. attention::

SciPy 1.13.0 generates one test suite error for
``fipy.matrices.scipyMatrix._ScipyMatrix.CSR``. Either ignore the test
failure or upgrade to SciPy >= 1.13.1

.. attention::

PETSc 3.21 crashes our test suite when running in parallel (`#1054
<https://github.com/usnistgov/fipy/issues/1054>`_). PETSc <= 3.20 is
recommended, although `petsc 3.20.2_*_102 is broken on macOS
<https://github.com/conda-forge/petsc-feedstock/issues/180>`_.

Pulls
-----

- Introduce Timer context manager
(`#995 <https://github.com/usnistgov/fipy/pull/995>`_)
- switch nix recipe to flake
(`#992 <https://github.com/usnistgov/fipy/pull/992>`_)
- Tweak documentation
(`#991 <https://github.com/usnistgov/fipy/pull/991>`_)
- Log much more information about FiPy environment
(`#990 <https://github.com/usnistgov/fipy/pull/990>`_)
- Fix inclusion of `environments/README.rst`
(`#988 <https://github.com/usnistgov/fipy/pull/988>`_)
- Environment pinning
(`#985 <https://github.com/usnistgov/fipy/pull/985>`_)

Fixes
-----

- `#1049 <https://github.com/usnistgov/fipy/issues/1049>`_:
Numpy 2.0.0 breaks things
- `#1010 <https://github.com/usnistgov/fipy/issues/1010>`_:
`examples.diffusion.mesh1D` No-flux - steady-state doesn't always give
zero
- `#1000 <https://github.com/usnistgov/fipy/issues/1000>`_:
`examples.diffusion.mesh1D` constrains a gradient but calls it a flux
- `#997 <https://github.com/usnistgov/fipy/issues/997>`_:
`future.standard_library` breaking python 3.12 compatibility
- `#967 <https://github.com/usnistgov/fipy/issues/967>`_:
Sign error in Robin condition
- `#963 <https://github.com/usnistgov/fipy/issues/963>`_:
PETSc 3.20.0 broke the world
- `#961 <https://github.com/usnistgov/fipy/issues/961>`_:
Representation of index variables is broken
- `#952 <https://github.com/usnistgov/fipy/issues/952>`_:
Uncaught Exception from the no-flux steady-state diffusion example
- `#944 <https://github.com/usnistgov/fipy/issues/944>`_:
Having problem with Viewer
- `#865 <https://github.com/usnistgov/fipy/issues/865>`_:
Sphinx search is broken on website
- `#673 <https://github.com/usnistgov/fipy/issues/673>`_:
Deprecations don't properly format properties
- `#512 <https://github.com/usnistgov/fipy/issues/512>`_:
Default coefficient of `ImplicitSourceTerm` is 0

--------------------------
Version 3.4.4 - 2023-06-27
--------------------------

This maintenance release adds :ref:`LOGGING` and resolves compatibility issues
with recent builds of :term:`PETSc` and :term:`NumPy`.

Expand Down
4 changes: 3 additions & 1 deletion _setup/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ def run(self):
wontfix = issues.labels.apply(lambda x: 'wontfix' in x)
invalid = issues.labels.apply(lambda x: 'invalid' in x)
question = issues.labels.apply(lambda x: 'question' in x)
issues = issues[~wontfix & ~invalid & ~question]
worksforme = issues.labels.apply(lambda x: 'worksforme' in x)
duplicate = issues.labels.apply(lambda x: 'duplicate' in x)
issues = issues[~wontfix & ~invalid & ~question & ~worksforme & ~duplicate]

# fix the dates to reflect dates from original Trac issue tracker
trac = (r" _Imported from trac ticket .*, "
Expand Down
51 changes: 7 additions & 44 deletions docs/source/NIX-README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,27 @@ Nix Installation
:term:`FiPy` now has a `Nix`_ expression for installing :term:`FiPy`
using `Nix`_. `Nix`_ is a powerful package manager for Linux and other
Unix systems that makes package management reliable and
reproducible. The recipe works on both Linux and Mac OS X.

Getting Started with Nix
------------------------

There are a number of tutorials on getting started with `Nix`_. The
page that I used when getting started is on the Blog of the HPC team
of GRICAD,

https://gricad.github.io/calcul/nix/tuto/2017/07/04/nix-tutorial.html

I also made my own notes,

https://github.com/wd15/nixes/blob/master/NIX-NOTES.md

which are a succinct steps that I use when setting up a new system with
Nix.
reproducible. The recipe works on both Linux and Mac OS X. Go to
`nix.dev`_ to get started with Nix.

Installing
----------

Once you have a working Nix installation use::

$ nix-shell --pure
$ nix develop

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

$ nix-shell --pure --command "python setup.py test"
$ nix develop --command bash -c "python setup.py test"

.. note::

:term:`Trilinos` is currently not available as part of the Nix
:term:`FiPy` installation.


Additional Packages
-------------------

To install additional packages available from Nixpkgs_ include them in
the `nativeBuildInputs` list in `shell.nix`.


Using Pip
---------

Packages unavailable from Nix can be installed using :term:`Pip`. In
this case, the installation has been set up so that the Nix shell
knows about a ``.local`` directory in the base :term:`FiPy` directory
used by :term:`Pip` for installation. So, for example, to install the
``toolz`` package from within the Nix shell use::

$ python -m pip install --user toolz
The SciPy solvers are the only available solvers currently.

The ``.local`` directory will persist after the Nix shell has been
closed.

.. _Nix: https://nixos.org/nix/
.. _Nixpkgs: https://nixos.org/nixpkgs/
.. _nix.dev: https://nix.dev
10 changes: 5 additions & 5 deletions docs/source/sphinxext/redirecting_html.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from docutils import nodes
import urllib.parse

try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
from sphinx.builders.html import StandaloneHTMLBuilder

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

0 comments on commit b0d350d

Please sign in to comment.