-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (42 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Makefile
SHELL = /bin/bash
.PHONY: help
help:
@echo "Commands:"
@echo "venv : creates a virtual environment."
@echo "jupytervenv : adds the venv kernel to jupyter."
@echo "jupyter : launches jupyter."
@echo "style : executes style formatting."
@echo "build : builds the package."
@echo "pypi : uploads the package to pypi."
# Styling
.PHONY: style
style:
source venv/bin/activate && \
black . && \
isort . && \
flake8
# Environment
venv:
python3 -m venv venv
source venv/bin/activate && \
python3 -m pip install pip setuptools wheel && \
python3 -m pip install -e .
# Add environment to jupyter
jupytervenv:
source venv/bin/activate && \
pip install ipykernel && \
pip install jupyter && \
python -m ipykernel install --name venv --user
# Launch jupyter
jupyter:
source venv/bin/activate && \
jupyter lab
# Build
build:
python3 -m build
# Pypi
pypi:
pip install twine
python3 -m twine upload dist/* --verbose
# username: __token__ password: api key from pypi