Skip to content

Commit 0b5f8fb

Browse files
authored
docs: Improve installation docs (ecmwf#91)
* docs: Improve installation docs
1 parent 074c0f2 commit 0b5f8fb

File tree

5 files changed

+182
-22
lines changed

5 files changed

+182
-22
lines changed

graphs/docs/index.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,9 @@ To install the package, you can use the following command:
7777

7878
.. code:: bash
7979
80-
pip install anemoi-graphs[...options...]
80+
pip install anemoi-graphs
8181
82-
The options are:
83-
84-
- ``dev``: install the development dependencies
85-
- ``docs``: install the dependencies for the documentation
86-
- ``test``: install the dependencies for testing
87-
- ``all``: install all the dependencies
82+
Get more information in the :ref:`installing <installing>` section.
8883

8984
**************
9085
Contributing
@@ -136,6 +131,7 @@ You may also have to install pandoc on MacOS:
136131

137132
overview
138133
cli/introduction
134+
installing
139135

140136
.. toctree::
141137
:maxdepth: 1

graphs/docs/installing.rst

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
############
2+
Installing
3+
############
4+
5+
****************
6+
Python Version
7+
****************
8+
9+
- Python (> 3.9)
10+
11+
We require at least Python 3.9.
12+
13+
**************
14+
Installation
15+
**************
16+
17+
Environments
18+
============
19+
20+
We currently do not provide a conda build of anemoi-graphs so the
21+
suggested installation is through Python virtual environments.
22+
23+
For linux the process to make and use a venv is as follows,
24+
25+
.. code:: bash
26+
27+
python -m venv /path/to/my/venv
28+
source /path/to/my/venv/bin/activate
29+
30+
Instructions
31+
============
32+
33+
To install the package, you can use the following command:
34+
35+
.. code:: bash
36+
37+
python -m pip install anemoi-graphs
38+
39+
We also maintain other dependency sets for different subsets of
40+
functionality:
41+
42+
.. code:: bash
43+
44+
python -m pip install "anemoi-graphs[docs]" # Install optional dependencies for generating docs
45+
46+
.. literalinclude:: ../../pyproject.toml
47+
:language: toml
48+
:start-at: [project.optional-dependencies.all]
49+
:end-before: [project.urls.Changelog]
50+
51+
**********************
52+
Development versions
53+
**********************
54+
55+
To install the most recent development version, install from github:
56+
57+
.. code::
58+
59+
$ python -m pip install git+https://github.com/ecmwf/anemoi-core.git#subdirectory=graphs
60+
61+
*********
62+
Testing
63+
*********
64+
65+
To run the test suite after installing anemoi-graphs, install (via pypi)
66+
`py.test <https://pytest.org>`__ and run ``pytest`` in the ``graphs``
67+
directory of the anemoi-core repository.

models/docs/installing.rst

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,66 @@
22
Installing
33
############
44

5-
To install the package, you can use the following command:
5+
****************
6+
Python Version
7+
****************
68

7-
.. code:: bash
9+
- Python (> 3.9)
810

9-
pip install anemoi-models
11+
We require at least Python 3.9.
1012

1113
**************
12-
Contributing
14+
Installation
1315
**************
1416

17+
Environments
18+
============
19+
20+
We currently do not provide a conda build of anemoi-models so the
21+
suggested installation is through Python virtual environments.
22+
23+
For linux the process to make and use a venv is as follows,
24+
25+
.. code:: bash
26+
27+
python -m venv /path/to/my/venv
28+
source /path/to/my/venv/bin/activate
29+
30+
Instructions
31+
============
32+
33+
To install the package, you can use the following command:
34+
1535
.. code:: bash
1636
17-
git clone ...
18-
cd anemoi-models
19-
pip install .[dev]
20-
pip install -r docs/requirements.txt
37+
python -m pip install anemoi-models
2138
22-
You may also have to install pandoc on MacOS:
39+
We also maintain other dependency sets for different subsets of
40+
functionality:
2341

2442
.. code:: bash
2543
26-
brew install pandoc
44+
python -m pip install "anemoi-models[docs]" # Install optional dependencies for generating docs
45+
46+
.. literalinclude:: ../../pyproject.toml
47+
:language: toml
48+
:start-at: [project.optional-dependencies.all]
49+
:end-before: [project.urls.Changelog]
50+
51+
**********************
52+
Development versions
53+
**********************
54+
55+
To install the most recent development version, install from github:
56+
57+
.. code::
58+
59+
$ python -m pip install git+https://github.com/ecmwf/anemoi-core.git#subdirectory=models
60+
61+
*********
62+
Testing
63+
*********
64+
65+
To run the test suite after installing anemoi-models, install (via pypi)
66+
`py.test <https://pytest.org>`__ and run ``pytest`` in the ``models``
67+
directory of the anemoi-core repository.

training/docs/start/installing.rst

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,68 @@
22
Installing
33
############
44

5+
****************
6+
Python Version
7+
****************
8+
9+
- Python (3.9 to 3.12)
10+
11+
We require at least Python 3.9, and currently do not support >3.12. This
12+
is due to an issue with one of the required dependencies.
13+
14+
**************
15+
Installation
16+
**************
17+
18+
Environments
19+
============
20+
21+
We currently do not provide a conda build of anemoi-training so the
22+
suggested installation is through Python virtual environments.
23+
24+
For linux the process to make and use a venv is as follows,
25+
26+
.. code:: bash
27+
28+
python -m venv /path/to/my/venv
29+
source /path/to/my/venv/bin/activate
30+
31+
Instructions
32+
============
33+
534
To install the package, you can use the following command:
635

736
.. code:: bash
837
9-
pip install anemoi-training
38+
python -m pip install anemoi-training
39+
40+
We also maintain other dependency sets for different subsets of
41+
functionality:
42+
43+
.. code:: bash
44+
45+
python -m pip install "anemoi-training[profile]" # Install optional dependencies for profiling gpu usage
46+
python -m pip install "anemoi-training[docs]" # Install optional dependencies for generating docs
47+
48+
.. literalinclude:: ../../pyproject.toml
49+
:language: toml
50+
:start-at: [project.optional-dependencies.all]
51+
:end-before: [project.urls.Changelog]
52+
53+
**********************
54+
Development versions
55+
**********************
56+
57+
To install the most recent development version, install from github:
58+
59+
.. code::
60+
61+
$ python -m pip install git+https://github.com/ecmwf/anemoi-core.git#subdirectory=training
62+
63+
*********
64+
Testing
65+
*********
66+
67+
To run the test suite after installing anemoi-training, install (via
68+
pypi) `py.test <https://pytest.org>`__ and run ``pytest`` in the
69+
``training`` directory of the anemoi-core repository.

training/pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ dependencies = [
6363
]
6464

6565
optional-dependencies.all = [ ]
66-
6766
optional-dependencies.dev = [
6867
"anemoi-training[docs,tests,all]",
6968
"pre-commit>=3.3.3",
7069
]
71-
7270
optional-dependencies.docs = [
7371
"nbsphinx",
7472
"pandoc",
@@ -82,9 +80,7 @@ optional-dependencies.profile = [
8280
"rich>=13.6",
8381
"tabulate>=0.9",
8482
]
85-
8683
optional-dependencies.tests = [ "hypothesis", "pytest", "pytest-mock" ]
87-
8884
urls.Changelog = "https://github.com/ecmwf/anemoi-training/CHANGELOG.md"
8985
urls.Documentation = "https://anemoi-training.readthedocs.io/"
9086
urls.Homepage = "https://github.com/ecmwf/anemoi-training/"

0 commit comments

Comments
 (0)