@@ -23,70 +23,47 @@ It is recommended to read the numpy structured array
23
23
24
24
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 )
25
25
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:\U sers\Y ourUserName> cd Downloads\p ower-grid-model-workshop
39
- C:\U sers\Y ourUserName\D ownloads\p ower-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\S cripts\a ctivate
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 ` :
48
40
``` shell
49
- > pip install .
41
+ uv sync
50
42
```
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
52
44
http://localhost:8888. If not, the console output will tell you where to find the jupyter notebook server.
53
45
` ` ` shell
54
- > jupyter notebook
46
+ uv run jupyter notebook
55
47
` ` `
56
48
1. Try any of the ` .ipynb` files, for example
57
49
[` Power Flow Example.ipynb` ](http://localhost:8888/notebooks/examples/Power%20Flow%20Example.ipynb) and press the ` >> `
58
50
button to run the entire file. Note that the last section in the Power Flow Example is about error handling, so
59
51
don' t get scared if you see some error messages there.
60
52
61
-
62
53
### Next time, pick up where you left off
63
54
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
75
64
http://localhost:8888. If not, the console output will tell you where to find the jupyter notebook server.
76
65
```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
90
67
91
68
## License
92
69
0 commit comments