-
Notifications
You must be signed in to change notification settings - Fork 35
/
Makefile
83 lines (66 loc) · 1.85 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
78
79
80
81
82
83
help:
@echo 'make <TARGET>'
@echo ' venv: Create a virtual environment'
@echo ' install: Install the package in editable mode with all dependencies'
@echo ' doc: Build the documentation'
@echo ' serve: Start a server to serve the documentation'
@echo ' format: Run the code formatter'
@echo ' mypy: Run the code static anlaysis checker'
@echo ' lint: Run the linter'
@echo ' test: Run tests'
@echo ' tox: Run tests with tox'
@echo ' test-force: Run tests and force regeneration of test data'
@echo ' clean: Remove all build artifacts'
@echo ' build: Create Python build artifacts'
@echo ' major: Bump major version number'
@echo ' minor: Bump minor version number'
@echo ' patch: Bump patch version number'
@echo ' rc: Bump release candidate version number'
@echo ' release: Release a new version'
install:
pip install "pip<=23.1.2" "setuptools>=62.0.0" "wheel>=0.41.1"
pip install -e .[dev,doc,test]
pre-commit install
precommit:
pre-commit install
pre-commit run --all-files
# rm -r docs/api || true
doc:
rm -r docs/api || true
jb clean docs && jb build docs
serve:
cd docs/_build/html && python3 -m http.server 0
format:
black simphony
mypy:
mypy -p simphony
lint:
flake8 .
test:
coverage run -m pytest
coverage report
tox:
tox -e py
test-force:
pytest --force-regen
clean:
rm -rf dist
rm -r docs/api
jb clean docs
build:
rm -rf dist
python3 -m build
major:
bumpversion major
VERSION=$(shell python3 -c "import simphony; print(simphony.__version__)") && \
minor:
bumpversion minor
VERSION=$(shell python3 -c "import simphony; print(simphony.__version__)") && \
patch:
bumpversion patch
VERSION=$(shell python3 -c "import simphony; print(simphony.__version__)") && \
rc:
bumpversion build
release:
pre-commit run --all-files
cd scripts && python3 release.py