Skip to content

Commit 181d198

Browse files
committed
Update install doc and readme with info on optional deps
1 parent 27d7cd6 commit 181d198

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,20 @@ Data Model.
88

99
## Install
1010

11-
Install steps are described in the documentation generated from `/docs/source/installing.rst`.
11+
Simply install IMAS-Python with ``pip``:
12+
```bash
13+
pip install imas-python
14+
```
15+
or with optional dependencies for netCDF and xarray support:
16+
```bash
17+
pip install imas-python[netcdf,xarray]
18+
```
1219

13-
Documentation is autogenerated from the source using [Sphinx](http://sphinx-doc.org/)
20+
More details are described in the documentation generated from `/docs/source/installing.rst`.
21+
The documentation is autogenerated from the source using [Sphinx](http://sphinx-doc.org/)
1422
and can be found at the [readthedocs](https://imas-python.readthedocs.io/en/latest/)
1523

16-
The documentation can be manually generated by installing sphinx and running:
17-
24+
To generated the documentation yourself, install the ``docs`` optional dependencies and do:
1825
```bash
1926
make -C docs html
2027
```

docs/source/installing.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,28 @@ To get started, you can install it from `pypi.org <https://pypi.org/project/imas
1313
1414
pip install imas-python
1515
16+
You can also install optional dependencies (e.g. netCDF and xarray):
17+
18+
.. code-block:: bash
19+
20+
pip install imas-python[netcdf,xarray]
21+
22+
23+
List of optional dependencies
24+
-----------------------------
25+
26+
- ``netcdf``: enables storing/loading of IDS to/from netCDF files
27+
- ``xarray``: enables loading IDS (entire IDS or part of it) into an xarray ``dataset``
28+
- ``h5py``: enables ``analyze-db`` CLI option
29+
- ``docs``: installs required packages to build the Sphinx documentation
30+
- ``test``: installs required packages to run the tests with ``pytest`` and ``asv``
31+
32+
.. note::
33+
34+
Some tests will be skipped unless you also have ``imas_core`` installed
35+
(it is not yet available on PyPI, so you will need to install it from sources
36+
if you have access to them at https://git.iter.org/projects/IMAS/repos/al-core)
37+
1638

1739
Local installation from sources
1840
-------------------------------

0 commit comments

Comments
 (0)