Skip to content

Commit

Permalink
Merge pull request boutproject#2196 from boutproject/pylib-submodules
Browse files Browse the repository at this point in the history
Replace boutdata and boututils directories with submodules
  • Loading branch information
johnomotani authored Jan 12, 2021
2 parents 85cc53a + d5339cd commit 7fe0f8d
Show file tree
Hide file tree
Showing 58 changed files with 40 additions and 10,679 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@
[submodule "externalpackages/fmt"]
path = externalpackages/fmt
url = https://github.com/fmtlib/fmt.git
[submodule "externalpackages/boutdata"]
path = externalpackages/boutdata
url = https://github.com/boutproject/boutdata.git
[submodule "externalpackages/boututils"]
path = externalpackages/boututils
url = https://github.com/boutproject/boututils.git
1 change: 1 addition & 0 deletions externalpackages/boutdata
Submodule boutdata added at 211434
1 change: 1 addition & 0 deletions externalpackages/boututils
Submodule boututils added at 08b572
43 changes: 30 additions & 13 deletions manual/sphinx/user_docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -439,22 +439,34 @@ make a note of what configure printed out.
Python configuration
~~~~~~~~~~~~~~~~~~~~

To use Python, you will need the NumPy and SciPy libraries. On Debian or
Ubuntu these can be installed with::
To use Python, you will need the dependencies of the `boututils
<https://github.com/boutproject/boututils>`__ and `boutdata
<https://github.com/boutproject/boutdata>`__ libraries. The simplest way to get these is
to install the packages with pip::

$ sudo apt-get install python-scipy
$ pip install --user boutdata

which should then add all the other dependencies like NumPy. To test if
everything is installed, run::
or conda::

$ python -c "import scipy"
$ conda install boutdata

If not, see the SciPy website https://www.scipy.org for instructions on
installing.
You can also install all the packages directly (see the documentation in the `boututils
<https://github.com/boutproject/boututils>`__ and `boutdata
<https://github.com/boutproject/boutdata>`__ repos for the most up to date list)
using pip::

To do this, the path to ``tools/pylib`` should be added to the
``PYTHONPATH`` environment variable. Instructions for doing this are
printed at the end of the configure script, for example::
$ pip install --user numpy scipy matplotlib sympy netCDF4 h5py future importlib-metadata

or conda::

$ conda install numpy scipy matplotlib sympy netcdf4 h5py future importlib-metadata

They may also be available from your Linux system's package manager.

To use the versions of ``boututils`` and ``boutdata`` provided by BOUT++, the path to
``tools/pylib`` should be added to the ``PYTHONPATH`` environment variable. This is not
necessary if you have installed the ``boututils`` and ``boutdata`` packages. Instructions
for doing this are printed at the end of the configure script, for example::

Make sure that the tools/pylib directory is in your PYTHONPATH
e.g. by adding to your ~/.bashrc file
Expand All @@ -465,8 +477,13 @@ To test if this command has worked, try running::

$ python -c "import boutdata"

If this doesn’t produce any error messages then Python is configured
correctly.
If this doesn’t produce any error messages then Python is configured correctly.

Note that ``boututils`` and ``boutdata`` are provided by BOUT++ as submodules, so versions
compatible with the checked out version of BOUT++ are downloaded into the
``externalpackages`` directory. These are the versions used by the tests run by ``make
check`` even if you have installed ``boututils`` and ``boutdata`` on your system.


.. _sec-config-idl:

Expand Down
1 change: 1 addition & 0 deletions tools/pylib/boutdata
14 changes: 0 additions & 14 deletions tools/pylib/boutdata/__init__.py

This file was deleted.

26 changes: 0 additions & 26 deletions tools/pylib/boutdata/cbdtoeqdsk.py

This file was deleted.

Loading

0 comments on commit 7fe0f8d

Please sign in to comment.