@@ -19,6 +19,8 @@ get your work merged, please:
19
19
3. check that the documentation is up-to-date,
20
20
4. request a code review from the main developers.
21
21
22
+ .. _environment :
23
+
22
24
Environment
23
25
-----------
24
26
30
32
Pre-commit hooks
31
33
~~~~~~~~~~~~~~~~
32
34
33
- Firstly , this installs a `pre-commit <https://pre-commit.com/ >`_ tool.
34
- To add those hooks to the `.git ` folder of your local clone such that they are
35
+ First , this installs a `pre-commit <https://pre-commit.com/ >`_ tool.
36
+ To add those hooks to the `` .git ` ` folder of your local clone such that they are
35
37
run on every commit, run::
36
38
37
39
pre-commit install
@@ -43,7 +45,7 @@ once as usually only the diff is checked. The configuration is specified in
43
45
Tox
44
46
~~~
45
47
46
- Secondly , this installs the virtual testing tool
48
+ Second , this installs the virtual testing tool
47
49
`tox <https://tox.readthedocs.io/en/latest/ >`_, which we use for all tests,
48
50
format and quality checks. Its configuration is specified in ``tox.ini ``.
49
51
To run it locally, simply execute::
@@ -53,6 +55,15 @@ To run it locally, simply execute::
53
55
with optional ``-e `` options specifying the environments to run, see
54
56
``tox.ini `` for details.
55
57
58
+ Extra dependencies
59
+ ~~~~~~~~~~~~~~~~~~
60
+
61
+ Not all dependencies in particular of tests and documentation are managed via
62
+ tox, e.g. installations of R and Julia, pandoc, and AMICI dependencies.
63
+ To set these up locally, see e.g. ``.github/workflows/ci.yml `` and
64
+ ``.github/workflows/install_deps.sh `` (which can also be invoked locally)
65
+ on how these are installed on GitHub Actions.
66
+
56
67
GitHub Actions
57
68
~~~~~~~~~~~~~~
58
69
@@ -79,7 +90,8 @@ and then compile the documentation via::
79
90
80
91
The documentation is then under ``doc/_build ``.
81
92
82
- Alternatively, the documentation can be compiled and tested via a single line::
93
+ Alternatively, the documentation can be compiled and tested via a single
94
+ command::
83
95
84
96
tox -e doc
85
97
@@ -101,11 +113,17 @@ Run them locally via e.g.::
101
113
tox -e base
102
114
103
115
with ``base `` covering basic tests, but some parts (``external,petab,... ``)
104
- being in separate subfolders. This boils mostly down to e.g.::
116
+ are in separate subfolders.
117
+ Some dependencies are not managed via tox, see the above
118
+ :ref: `environment ` section.
119
+
120
+ Tox basically mostly executes pytest on subsets of the tests, e.g.::
105
121
106
122
pytest test/base
107
123
108
- You can also run only specific tests.
124
+ pytest (install via ``pip install pytest ``) can also be invoked directly
125
+ like this, but may then require various further dependencies,
126
+ see the environments in ``tox.ini ``.
109
127
110
128
Unit tests can be written with `pytest <https://docs.pytest.org/en/latest/ >`_
111
129
or `unittest <https://docs.python.org/3/library/unittest.html >`_.
0 commit comments