You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/developer.contributing.rst
+8-13Lines changed: 8 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,19 +104,16 @@ Be sure to familiarise yourself with :ref:`contributing-code` before reading thi
104
104
By default, pull requests on GitHub will trigger the running of Gambit's test suite using GitHub Actions.
105
105
You can also run the tests locally before submitting your pull request, using `pytest`.
106
106
107
-
1. Install the test dependencies (into the virtual environment where you installed PyGambit): ::
107
+
1. Ensure `pygambit` is installed with test dependencies: see :ref:`build-python`.
108
108
109
-
pip install -r tests/requirements.txt
109
+
2. Run pytest: ::
110
110
111
-
2. Navigate to the Gambit repository and run the tests: ::
112
-
113
-
pytest
114
-
115
-
3. [Optional] If you wish to run the tutorial notebook tests, you will need to add the ``--run-tutorials`` flag, which require the `doc` dependencies: ::
116
-
117
-
pip install -r doc/requirements.txt
118
111
pytest --run-tutorials
119
112
113
+
.. tip::
114
+
You can omit the `--run-tutorials` to skip running the tutorial notebook tests which take longest to run.
115
+
Running tests including tutorials requires `doc` as well as `test` dependencies; see :ref:`build-python`.
116
+
120
117
Adding to the test suite
121
118
^^^^^^^^^^^^^^^^^^^^^^^^
122
119
@@ -136,9 +133,7 @@ You can also build the documentation locally to preview your changes before subm
136
133
137
134
1. `Install Pandoc <https://pandoc.org/installing.html>`_ for your OS
138
135
139
-
2. Install the docs dependencies (into the virtual environment where you installed PyGambit): ::
140
-
141
-
pip install -r doc/requirements.txt
136
+
2. Ensure `pygambit` is installed with doc dependencies: see :ref:`build-python`.
142
137
143
138
3. Navigate to the Gambit repo and build the docs: ::
144
139
@@ -158,7 +153,7 @@ To submit a tutorial for inclusion in the Gambit documentation, please follow th
158
153
159
154
3. Update `doc/pygambit.rst` to ensure the tutorial is listed in the docs at an appropriate location.
160
155
161
-
4. *[Optional]* If your tutorial requires additional dependencies not already listed in `doc/requirements.txt`, please add them to the file.
156
+
4. *[Optional]* If your tutorial requires additional dependencies not already listed in the ``doc`` list under ``[project.optional-dependencies]`` inside ``pyproject.toml``, please add them to the file.
2. Install `pygambit` with additional documentation dependencies:
16
16
17
17
* To install the latest release from PyPI::
18
18
19
-
pip install pygambit
19
+
pip install pygambit[doc]
20
20
21
-
* Alternatively, to install the latest development version::
21
+
* Alternatively, to install the latest development version (from the top level of the gambit repo)::
22
22
23
-
pip install .
24
-
25
-
3. Install other requirements (including `JupyterLab`) used by the tutorials ::
26
-
27
-
cd gambit/doc
28
-
pip install -r requirements.txt
23
+
pip install .[doc]
29
24
30
25
.. warning::
31
26
Windows users wishing to run the "Using Gambit with OpenSpiel" tutorial will need to install OpenSpiel manually; see the `OpenSpiel installation instructions <https://openspiel.readthedocs.io/en/latest/windows.html>`_ for details.
32
27
33
-
4. Open `JupyterLab` and click on any of the tutorial notebooks (files ending in `.ipynb`) ::
28
+
3. Open `JupyterLab` and click on any of the tutorial notebooks in ``doc/tutorials`` (files ending in `.ipynb`) ::
0 commit comments