Skip to content

Commit a27c34c

Browse files
authored
Merge pull request #535 from alan-turing-institute/tutorial-setup
Post-workshop improved tutorial setup instructions
2 parents 97df2d7 + e52d774 commit a27c34c

File tree

2 files changed

+73
-13
lines changed

2 files changed

+73
-13
lines changed

docs/getting-started/installation.md

Lines changed: 71 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
# Installation instructions
22

3-
`AutoEmulate` is a Python package that can be installed in a number of ways. In this section we will describe the main ways to install the package.
3+
`AutoEmulate` is a Python package that can be installed in a number of ways.
4+
In this section we will describe the main ways to install the package.
5+
For new users, we recommend installing the package from PyPI.
6+
For users who want to contribute to the package, we recommend using Poetry to install the package from the source code.
47

58
## Prerequisites
69

710
**Python Version:** `AutoEmulate` requires Python `>=3.10` and `<3.13`.
811

9-
## Install from GitHub
10-
11-
This is the easiest way to install `AutoEmulate`.
12-
13-
Currently, because we are in active development, it's recommended to install the development version from GitHub:
14-
15-
```bash
16-
pip install git+https://github.com/alan-turing-institute/autoemulate.git
17-
```
18-
1912
## Install from PyPI
2013

2114
To get the latest release from PyPI:
@@ -59,5 +52,70 @@ poetry env activate
5952
Then activate the virtual environment using the command displayed by the previous command. This will be something like:
6053

6154
```bash
62-
source /Users/yourName/Library/Caches/pypoetry/virtualenvs/autoemulate-l4vGdsmY-py3.11/bin/activate
63-
```
55+
source /Users/yourName/Library/Caches/pypoetry/virtualenvs/autoemulate-l4vGdsmY-py3.11/bin/activate
56+
```
57+
58+
## Interactive tutorials
59+
60+
You can run the Quickstart demo and other interactive tutorials fron the documentation locally.
61+
The examples are all Jupyter notebooks and can be run in your favoured method, such as JupyterLab, Jupyter Notebook, or VS Code.
62+
63+
<details>
64+
<summary>
65+
These steps will guide you in the simplest way to set up a virtual environment, install the package from PyPI and run the notebooks with JupyterLab.
66+
</summary>
67+
68+
1. Clone the AutoEmulate repository:
69+
70+
```bash
71+
git clone https://github.com/alan-turing-institute/autoemulate
72+
```
73+
2. Navigate into the directory:
74+
75+
```bash
76+
cd autoemulate
77+
```
78+
3. Set up a virtual environment called `autoemulate`:
79+
80+
```bash
81+
python -m venv autoemulate
82+
```
83+
4. Activate the virtual environment:
84+
- On Windows:
85+
86+
```bash
87+
autoemulate\Scripts\activate
88+
```
89+
90+
- On macOS/Linux:
91+
92+
```bash
93+
source autoemulate/bin/activate
94+
```
95+
5. Install the package from PyPI:
96+
97+
```bash
98+
pip install autoemulate
99+
```
100+
6. Install JupyterLab:
101+
102+
```bash
103+
pip install jupyterlab
104+
```
105+
7. Create a Jupyter kernel for the virtual environment:
106+
107+
```bash
108+
python -m ipykernel install --user --name autoemulate --display-name "Python (autoemulate)"
109+
```
110+
111+
This command registers the virtual environment as a Jupyter kernel named `Python (autoemulate)`, which you can select in JupyterLab.
112+
8. Launch JupyterLab:
113+
114+
```bash
115+
jupyter lab
116+
```
117+
9. Open the `docs/getting-started/quickstart.ipynb` notebook in JupyterLab.
118+
10. Set the kernel to use the `Python (autoemulate)` kernel you created earlier. You can do this by clicking on the kernel name in the top right corner of the JupyterLab interface and selecting `Python (autoemulate)` from the dropdown menu.
119+
11. Find other interactive tutorials in the `docs/tutorials` directory, which you can open and run in JupyterLab.
120+
121+
</details>

docs/tutorials/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# Tutorials
22

33
These are more in-depth workflows which cover all aspects of `AutoEmulate`, from comprehensive overviews of the features to strategies for minimising computation time with larger datasets or when using hyperparameter optimisation.
4+
5+
These tutorials are all Jupyter notebooks which can be [run in a local interactive session](../getting-started/installation.md#interactive-tutorials).

0 commit comments

Comments
 (0)