-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge base-environment.yml into solver environments
Easier to explain and less fragile, at the expense of redundancy in individual environment.yml files. It's a shame they don't have an include mechanism. Refactored environment documentation into environments/README.rst.
- Loading branch information
Showing
10 changed files
with
162 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. include:: ../../environments/README.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
.. _CREATE_CONDA_ENVIRONMENT: | ||
|
||
Create a conda_ environment | ||
=========================== | ||
Check warning on line 4 in environments/README.rst GitHub Actions / docs
Check warning on line 4 in environments/README.rst GitHub Actions / docs
Check warning on line 4 in environments/README.rst GitHub Actions / docs
Check warning on line 4 in environments/README.rst GitHub Actions / docs
Check warning on line 4 in environments/README.rst GitHub Actions / docs
|
||
|
||
Use one of the following methods to create a self-contained conda_ | ||
environment and then download and populate the environment with the | ||
prerequisites for :term:`FiPy` from the conda-forge_ channel at | ||
https://anaconda.org. | ||
|
||
* Conda_ environment files | ||
|
||
This option is the most upgradable in the future and probably the best | ||
for development. | ||
|
||
:: | ||
|
||
$ conda env create --name <MYFIPYENV> \ | ||
--file environments/<SOLVER>-environment.yml | ||
|
||
.. note:: | ||
|
||
You can try to include multiple solver suites using ``conda env | ||
update``, but be aware that different suites may have incompatible | ||
requirements, or may restrict installation to obsolete versions of | ||
Python. Given that :term:`FiPy` can only use one solver suite during | ||
a run, installing more than one solver in an environment isn't | ||
necessary. | ||
|
||
.. attention:: | ||
|
||
Successively updating an environment can be unpredictable, as later | ||
packages may conflict with earlier ones. Unfortunately, ``conda | ||
env create`` `does not support multiple environment files | ||
<https://github.com/conda/conda/issues/9294>`_. | ||
|
||
Alternatively, combine the different | ||
:file:`environments/<SOLVER>-environment.yml` files you wish to | ||
use, along with `environment.yml` files for any other packages you | ||
are interested in (`conda-merge | ||
<https://github.com/amitbeka/conda-merge>`_ may prove useful). | ||
Then execute:: | ||
|
||
$ conda env create --name <MYFIPYENV> --file <MYMERGEDENVIRONMENT>.yml | ||
|
||
* conda-lock_ lockfiles | ||
|
||
This option will pin all the packages, so is the most reproducible, but | ||
not particularly upgradable. For most, this is the safest way to | ||
generate a FiPy environment that consistently works. | ||
|
||
:: | ||
|
||
$ conda-lock install --name <MYFIPYENV> \ | ||
environments/locks/conda-<SOLVER>-lock.yml | ||
|
||
or, to be really explicit (and obviating the need for conda-lock_):: | ||
|
||
$ conda create --name <MYFIPYENV> \ | ||
--file environments/locks/conda-<SOLVER>-<PLATFORM>.lock | ||
|
||
* Directly from conda-forge_, picking and choosing desired packages | ||
|
||
This option is the most flexible, but has the highest risk of missing or | ||
incompatible packages. | ||
|
||
e.g.:: | ||
|
||
$ conda create --name <MYFIPYENV> --channel conda-forge \ | ||
python=3 numpy scipy matplotlib-base future packaging mpich \ | ||
mpi4py petsc4py mayavi "gmsh <4.0|>=4.5.2" | ||
|
||
or:: | ||
|
||
$ conda create --name <MYFIPYENV> --channel conda-forge \ | ||
python=2.7 numpy scipy matplotlib-base future packaging \ | ||
pysparse mayavi "traitsui<7.0.0" "gmsh<4.0" | ||
|
||
.. attention:: | ||
|
||
Bit rot has started to set in for Python 2.7. One consequence is that | ||
:class:`~fipy.viewers.vtkViewer.VTKViewer`\s can raise errors | ||
(probably other uses of :term:`Mayavi`, too). Hence, the constraint | ||
of `"traitsui<7.0.0"`. | ||
|
||
.. _conda-lock: https://github.com/conda/conda-lock | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- pysparse | ||
- python | ||
- numpy | ||
- scipy | ||
- matplotlib-base | ||
- future | ||
- packaging | ||
- mayavi # [unix] | ||
- traitsui <7.0.0 | ||
- gmsh <4.0|>=4.5.2 | ||
- pip | ||
- pysparse | ||
platforms: | ||
- linux-64 | ||
- osx-64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters