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
Fix dependency installation in python.yml GitHub Action (#656)
- Now GH action installs from the `requirements.txt` files used by tests and docs directly
- Also moves the logic that skips running the tutorial tests from the GH action to the test file itself (don't run for <3.12), to avoid any inconsistencies with GH actions PR vs Push vs running locally
- Removes the version pinning for doc and test requirements - this was actually preventing the installation of packages from working across Python versions, as the pinned package versions for earlier python versions were not always available. It was too stringent to pin these and I don't think there's much to be gained from having done so - if the latest versions of any of those packages do end up including changes that break our docs infrastructure, this will at worst mean that a docs build could fail, but that would be picked up in any PR and would not affect the current build. Might be worth discussing pinning of dependencies of `pygambit` itself in future though
- See comment below: The `paths-ignore` in the GitHub action yml was wrongly preventing some checks from running. I don't think it's a big problem to remove this completely, whilst PRs take a long time to run, we don't do docs PRs in high enough volume/speed for this to be too much of a problem
- Since Windows requires a specific manual installation of OpenSpiel, I have added a Warning that links to this in the How to run PyGambit tutorials on your computer and skipped running OpenSpiel notebook when running tests on Windows GH action. Also made a few other edits to this page whilst I was there.
Copy file name to clipboardExpand all lines: doc/tutorials/running_locally.rst
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,22 +3,34 @@
3
3
How to run PyGambit tutorials on your computer
4
4
==============================================
5
5
6
-
The PyGambit tutorials are available as Jupyter notebooks and can be run interactively using any program that supports Jupyter notebooks, such as JupyterLab or VSCode.
7
-
You will need a working installation of Python 3.9+ on your machine to run PyGambit (however the tutorials contain some syntax that may not be compatible with earlier versions of Python than 3.13).
6
+
Running the PyGambit tutorials on your machine requires some familiarity with the basics of Python and how to use Git & GitHub.
7
+
The tutorials are available as Jupyter notebooks and can be run interactively using any program that supports Jupyter notebooks, such as JupyterLab or VSCode.
8
+
9
+
.. tip:: Create a virtual environment with Python 3.13 or higher
8
10
9
11
1. To download the tutorials, open your OS's command prompt and clone the Gambit repository from GitHub, then navigate to the tutorials directory: ::
2. Install `pygambit` and other requirements (including `JupyterLab` and other packages used by the tutorials). We recommend creating a new virtual environment and installing both the requirements there. e.g. ::
15
+
2. Install `pygambit`:
16
+
17
+
* To install the latest release from PyPI::
18
+
19
+
pip install pygambit
20
+
21
+
* Alternatively, to install the latest development version::
15
22
16
-
python -m venv pygambit-env
17
-
source pygambit-env/bin/activate
18
-
pip install pygambit
23
+
pip install .
24
+
25
+
3. Install other requirements (including `JupyterLab`) used by the tutorials ::
26
+
27
+
cd gambit/doc
19
28
pip install -r requirements.txt
20
29
21
-
3. Open `JupyterLab` and click on any of the tutorial notebooks (files ending in `.ipynb`) ::
30
+
.. warning::
31
+
Windows users will encounter an error when installing the requirements, which include the OpenSpiel library. Users wishing to run the OpenSpiel tutorial will need to install this manually; see the `OpenSpiel installation instructions <https://openspiel.readthedocs.io/en/latest/windows.html>`_ for details.
32
+
33
+
4. Open `JupyterLab` and click on any of the tutorial notebooks (files ending in `.ipynb`) ::
0 commit comments