Skip to content

Commit b13d6f5

Browse files
committed
Update README.md
Signed-off-by: Thijs Baaijen <[email protected]>
1 parent ec7a961 commit b13d6f5

File tree

1 file changed

+27
-50
lines changed

1 file changed

+27
-50
lines changed

README.md

+27-50
Original file line numberDiff line numberDiff line change
@@ -23,70 +23,47 @@ It is recommended to read the numpy structured array
2323

2424
Please create the relevant environment before the workshop. If you encounter problems, please raise a question in the [discussion board](https://github.com/orgs/PowerGridModel/discussions)
2525

26-
### Preparation for Windows (beginners guide)
27-
28-
1. [Download](https://github.com/PowerGridModel/power-grid-model-workshop/archive/refs/heads/main.zip) (or
29-
checkout) this workshop/repository and remember the destination location. For example:
30-
`C:\Users\YourUserName\Downloads\power-grid-model-workshop`.
31-
32-
1. Install the latest [Python](https://www.python.org/ftp/python/3.10.7/python-3.10.7-amd64.exe) version.
33-
You probably want the **Windows installer (64-bit)** under **Stable Release**.
34-
35-
1. Now open a terminal (Windows-Key + R, type `cmd`, press **OK**) and use the `cd` (change dir) command to navigate
36-
to the folder where you downloaded the workshop. For example:
37-
```shell
38-
C:\Users\YourUserName> cd Downloads\power-grid-model-workshop
39-
C:\Users\YourUserName\Downloads\power-grid-model-workshop>_
40-
```
41-
1. Optional: Create and activate a virtual environment. You can skip this step, but it helps you to keep your system
42-
clean, as we will be installing about 70 Python packages in the next step.
43-
```shell
44-
> python -m venv venv
45-
> venv\Scripts\activate
46-
```
47-
1. install Power Grid Model and some other packages we'll use for this workshop:
26+
### Preparation with uv (Windows/Mac/Linux)
27+
1. Open a terminal
28+
- Windows: Press `Windows-Key + R`, type `cmd`, press **OK**
29+
- Mac/Linux: Open a terminal
30+
1. Download or clone this workshop/repository
31+
- if you download the repository, remember the destination location. For example:
32+
- Windows:`C:\Users\YourUserName\Downloads\power-grid-model-workshop`
33+
- Mac/Linux: `~/Downloads/power-grid-model-workshop`
34+
1. Install the `uv` package manager [link](https://docs.astral.sh/uv/getting-started/installation)
35+
for your operating system (Windows/Mac/Linux)
36+
1. Navigate to the repository folder
37+
- Windows: `cd Downloads\power-grid-model-workshop`
38+
- Mac/Linux: `cd ~/Downloads/power-grid-model-workshop`
39+
1. Setup python environment and install dependencies using `uv`:
4840
```shell
49-
> pip install .
41+
uv sync
5042
```
51-
1. Now run jupyter notebook. It will probably (depending on your system) automatically open a browser at
43+
1. Start jupyter notebook. It will probably (depending on your system) automatically open a browser at
5244
http://localhost:8888. If not, the console output will tell you where to find the jupyter notebook server.
5345
```shell
54-
> jupyter notebook
46+
uv run jupyter notebook
5547
```
5648
1. Try any of the `.ipynb` files, for example
5749
[`Power Flow Example.ipynb`](http://localhost:8888/notebooks/examples/Power%20Flow%20Example.ipynb) and press the `>>`
5850
button to run the entire file. Note that the last section in the Power Flow Example is about error handling, so
5951
don't get scared if you see some error messages there.
6052
61-
6253
### Next time, pick up where you left off
6354
64-
1. Open a terminal (Windows-Key + R, type `cmd`, press **OK**) and use the `cd` (change dir) command to navigate
65-
to the folder where you downloaded the workshop. For example:
66-
```shell
67-
C:\Users\YourUserName> cd Downloads\power-grid-model-workshop
68-
C:\Users\YourUserName\Downloads\power-grid-model-workshop>_
69-
```
70-
2. Optional: Activate the virtual environment (if you created one initially).
71-
```shell
72-
> venv\Scripts\activate
73-
```
74-
3. Run jupyter notebook. It will probably (depending on your system) automatically open a browser at
55+
1. Again, open a terminal
56+
- Windows: Press `Windows-Key + R`, type `cmd`, press **OK**
57+
- Mac/Linux: Open a terminal
58+
1. Navigate to the repository folder
59+
- Example:
60+
- Windows: `cd Downloads\power-grid-model-workshop`
61+
- Mac/Linux: `cd ~/Downloads/power-grid-model-workshop`
62+
63+
1. Start jupyter notebook. It will probably (depending on your system) automatically open a browser at
7564
http://localhost:8888. If not, the console output will tell you where to find the jupyter notebook server.
7665
```shell
77-
> jupyter notebook
78-
```
79-
80-
### Preparation for WSL2 or Linux (for advanced users)
81-
82-
If you know WSL2/Linux you should be able to configure environment yourself.
83-
84-
```shell
85-
> pip install .
86-
> jupyter notebook
87-
```
88-
89-
Open the jupyter notebook [`Power Flow Example.ipynb`](http://localhost:8888/Power%20Flow%20Example.ipynb), try to run it.
66+
uv run jupyter notebook
9067
9168
## License
9269

0 commit comments

Comments
 (0)