-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
77 lines (56 loc) · 1.54 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
help:
@echo 'make venv: Create venv for development'
@echo 'make install: Install package for development'
@echo 'make precommit: Configure pre-commit on your system'
@echo 'make doc: Build the static documentation site'
@echo 'make serve: Serve the documentation site on localhost for browsing'
@echo 'make test: Run tests with pytest'
venv:
python3 -m venv env
install:
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install -e .[dev]
pre-commit install
precommit:
pre-commit install
pre-commit run --all-files
doc:
cd docs && make html
serve:
cd docs/_build/html && python3 -m http.server
format:
black pyrolab
mypy:
mypy -p pyrolab
# lint:
# flake8 .
test:
coverage run -m pytest
coverage report
jupytext:
jupytext **/*.ipynb --to py
notebooks:
jupytext docs/notebooks/**/*.py --to ipynb
jupytext docs/notebooks/*.py --to ipynb
build:
rm -rf dist
python -m build
###############################################################################
# Devloper shouldn't use these targets, use release-[patch|minor|major] instead
patch:
bumpversion patch
minor:
bumpversion minor
major:
bumpversion major
release:
VERSION=$(shell python3 -c "import pyrolab; print(pyrolab.__version__)") && \
echo Releasing version $$VERSION && \
TAG_NAME=v$$VERSION && \
git push && \
git push origin $$TAG_NAME
###############################################################################
release-patch: patch release
release-minor: minor release
release-major: major release