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
{{ message }}
This repository was archived by the owner on May 26, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,11 @@ A python project template for educational purposes
13
13
5. Install the package in development mode:
14
14
`pip install -e .`
15
15
16
+
OR
17
+
18
+
1.`make environment`
19
+
2.`source .venv/bin/activate`
20
+
16
21
## Python venv
17
22
**venv** stands for virtual environment and is part of the python standard library (i.e. you don't have to install it).
18
23
Python virtual environments' role is to create an isolated python environment for each project so that there are no dependency issues etc. from conflicting project requirements (e.g. Project A need pandas 1.0 and Project B needs pandas 1.1).
@@ -179,6 +184,41 @@ The title is pretty self explanatory.
179
184
180
185
.gitignore is a file where you can add files and directories that you want git to ignore. The [.gitignore](.gitignore) in this template has the typical content. For example .venv, the directory that contains the python virtual environment, should not be push to github and is in .gitignore.
181
186
187
+
## Makefile
188
+
The [Makefile](Makefile) makes life a bit more simple by having some of the necessary commands ready to go.
189
+
Available commands for this template are:
190
+
1.`make environment`, equivalent to:
191
+
```
192
+
python -m venv .venv
193
+
source .venv/bin/activate
194
+
pip install -r requirements.dev.txt
195
+
pip install -e .
196
+
python -m ipykernel install --name=examplepackage
197
+
jupyter kernelspec list
198
+
pre-commit install
199
+
```
200
+
2.`make clean`, equivalent to:
201
+
```
202
+
echo "> Removing virtual environment"
203
+
rm -r .venv
204
+
echo "> Uninstalling from jupyter"
205
+
jupyter kernelspec uninstall examplepackage
206
+
```
207
+
3.`make install`, equivalent to:
208
+
```
209
+
pip install -r requirements.dev.txt
210
+
pip install -e .
211
+
```
212
+
4.`make test`, equivalent to:
213
+
```
214
+
pytest examplepackage
215
+
```
216
+
5.`make lint`, equivalent to:
217
+
```
218
+
flake8 examplepackage
219
+
pydocstyle examplepackage
220
+
```
221
+
182
222
## Github Actions
183
223
From the official https://github.com/features/actions page:
184
224
*"GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want."*
0 commit comments