Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

Commit ee26ce8

Browse files
committed
makefile 1st draft
1 parent 8fb4ffb commit ee26ce8

3 files changed

Lines changed: 58 additions & 2 deletions

File tree

Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.PHONY: all lint test install environment
2+
3+
lint:
4+
flake8 examplepackage
5+
pydocstyle examplepackage
6+
7+
test:
8+
pytest examplepackage
9+
10+
install:
11+
pip install -r requirements.dev.txt
12+
pip install -e .
13+
14+
environment:
15+
(\
16+
python -m venv .venv; \
17+
source .venv/bin/activate; \
18+
pip install -r requirements.dev.txt; \
19+
pip install -e .; \
20+
python -m ipykernel install --name=examplepackage; \
21+
jupyter kernelspec list; \
22+
pre-commit install; \
23+
)
24+
25+
clean:
26+
echo "> Removing virtual environment"
27+
rm -r .venv
28+
echo "> Uninstalling from jupyter"
29+
jupyter kernelspec uninstall examplepackage

notebooks/example.ipynb

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,37 @@
55
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
8-
"source": []
8+
"source": [
9+
"from examplepackage.examplemodule import example_function"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {},
16+
"outputs": [],
17+
"source": [
18+
"print(example_function(1))"
19+
]
920
}
1021
],
1122
"metadata": {
23+
"kernelspec": {
24+
"display_name": "Python 3",
25+
"language": "python",
26+
"name": "python3"
27+
},
1228
"language_info": {
13-
"name": "python"
29+
"codemirror_mode": {
30+
"name": "ipython",
31+
"version": 3
32+
},
33+
"file_extension": ".py",
34+
"mimetype": "text/x-python",
35+
"name": "python",
36+
"nbconvert_exporter": "python",
37+
"pygments_lexer": "ipython3",
38+
"version": "3.8.5"
1439
}
1540
},
1641
"nbformat": 4,

requirements.dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ flake8
22
black
33
pytest
44
pydocstyle
5+
pre-commit
6+
ipykernel

0 commit comments

Comments
 (0)