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
docs(setup)📝: streamline and simplify setup instructions for running notebooks
- Replace multiple setup options (Binder, VSCode dev containers, conda, venv) with a single, quick setup guide using uv and marimo.
- Provide clear, step-by-step instructions for installing uv, navigating to the notebook directory, and running notebooks with marimo.
- Explain the benefits of the new approach, including isolated environments and automatic dependency management.
- Remove outdated or redundant setup instructions to reduce confusion and improve onboarding experience.
Follow the installation instructions at [https://docs.astral.sh/uv/getting-started/installation/](https://docs.astral.sh/uv/getting-started/installation/)
19
15
20
-
## VSCode Development Containers
16
+
2.**Navigate to the notebook directory**:
17
+
```bash
18
+
cd notebooks/subdir/
19
+
```
21
20
22
-
Assuming that y ou're using Visual Studio Code
23
-
and have attempted to use development containers before,
24
-
you can run the Network Analysis Made Simple tutorial content
25
-
inside a development container.
26
-
After Binder, this is the second easiest way to get set up.
27
-
You need to have Docker installed on your computer
28
-
but don't worry -- you won't have to execute any Docker commands :).
21
+
3.**Run the notebook**:
22
+
```bash
23
+
uvx marimo edit --sandbox <notebook_name>.py
24
+
```
29
25
30
-
### Install the Remote Containers extension
26
+
That's it! The `--sandbox` flag ensures a clean, isolated environment for running the notebooks with all necessary dependencies automatically managed.
Use `Cmd+Shift+P` (on macOS) or `Ctrl+Shift+P` (on Linux/Windows)
45
-
to open the command palette, and search for "Rebuild and Reopen in Container" as below:
46
-
47
-

48
-
49
-
Hit enter and wait for the container to build automagically. This may take around 10 minutes or so, depending on your system.
50
-
51
-

52
-
53
-
## `conda` environments
54
-
55
-
We also recommend the use of `conda` environments!
56
-
Use this if you're not already using one of the options above.
57
-
If you are feeling confident enough to set up
58
-
a conda environment at the terminal,
59
-
then follow along.
60
-
(We'll be assuming you've already cloned the repository locally.)
61
-
62
-
### Leverage the Makefile
63
-
64
-
We've provided a Makefile with a single command:
65
-
66
-
```bash
67
-
make conda
68
-
```
69
-
70
-
On most \*nix systems, that should get you most of the way
71
-
to having the environment setup.
72
-
73
-
### Alternative: Execute individual commands
74
-
75
-
If you encounter errors, then you should know that the Makefile command
76
-
`make conda`
77
-
basically wraps the following steps.
78
-
79
-
Firstly, it creates the conda environment based on the `environment.yml` file:
80
-
81
-
```bash
82
-
conda env create -f environment.yml
83
-
```
84
-
85
-
Next, it activates the environment:
86
-
87
-
```bash
88
-
conda activate nams
89
-
```
90
-
91
-
We have a custom module for the project, which is called `nams`,
92
-
that you will have to install.
93
-
94
-
```bash
95
-
# In the root directory of the cloned repository
96
-
python setup.py develop
97
-
```
98
-
99
-
Finally, it runs a check on the environment
100
-
to make sure everything is installed correctly:
101
-
102
-
```bash
103
-
python checkenv.py
104
-
```
105
-
106
-
## `venv` environments
107
-
108
-
If you're not a `conda` user, then you can use `venv` to create your environment.
109
-
110
-
111
-
### Leverage the Makefile
112
-
113
-
As with the `conda` commands, you should be able
114
-
to execute a single Makefile command at your terminal:
115
-
116
-
```bash
117
-
make venv
118
-
```
119
-
120
-
Special heartfelt thanks goes out to GitHub user @matt-land
121
-
who contributed the `venv` script.
35
+
This approach eliminates the need for manual environment setup, conda environments, or Docker containers while ensuring reproducible execution of the tutorial content.
0 commit comments