forked from gridstatus/gridstatus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (51 loc) · 1.36 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
.PHONY: clean
clean:
find . -name '*.pyo' -delete
find . -name '*.pyc' -delete
find . -name __pycache__ -delete
find . -name '*~' -delete
find . -name '.coverage.*' -delete
PYTEST_CMD := poetry run pytest -s -vv gridstatus/ -n auto
NOT_SLOW := -m "not slow" --reruns 5 --reruns-delay 3
.PHONY: test
test:
$(PYTEST_CMD) $(NOT_SLOW)
.PHONY: test-cov
test-cov:
$(PYTEST_CMD) $(NOT_SLOW) --cov=gridstatus --cov-config=./pyproject.toml --cov-report=xml:./coverage.xml
.PHONY: test-slow
test-slow:
$(PYTEST_CMD) -m "slow"
.PHONY: installdeps-dev
installdeps-dev:
poetry install --all-extras
poetry run pre-commit install
.PHONY: installdeps-test
installdeps-test:
poetry install --all-extras
.PHONY: installdeps-docs
installdeps-docs:
poetry install --all-extras
.PHONY: lint
lint:
poetry run ruff gridstatus/
poetry run black gridstatus/ --check
.PHONY: lint-fix
lint-fix:
poetry run ruff gridstatus/ --fix
poetry run black gridstatus/
.PHONY: upgradepip
upgradepip:
poetry run python -m pip install --upgrade pip
.PHONY: upgradebuild
upgradebuild:
poetry run python -m pip install --upgrade build
.PHONY: upgradesetuptools
upgradesetuptools:
poetry run python -m pip install --upgrade setuptools
.PHONY: package
package: upgradepip upgradebuild upgradesetuptools
poetry build
.PHONY: docs
docs: clean
poetry run make -C docs/ -e "SPHINXOPTS=-j auto" clean html