-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
49 lines (37 loc) · 1.07 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
.PHONY: lock install-base install test-base test-parallel test lint format build-package build-docs build publish
.DEFAULT_GOAL := help
# Install
lock:
poetry lock
install-base:
poetry install
install:
poetry install -E postgres -E postgres-async -E redshift -E mongo -E redis -E mysql -E moto
## Test
test-base:
SQLALCHEMY_WARN_20=1 coverage run -a -m \
pytest src tests -vv \
-m 'not postgres and not redshift and not mongo and not redis and not mysql and not moto'
test-parallel:
SQLALCHEMY_WARN_20=1 coverage run -m pytest -n 4 src tests -vv --pmr-multiprocess-safe
test: test-parallel
SQLALCHEMY_WARN_20=1 coverage run -a -m pytest src tests -vv
coverage report
coverage xml
## Lint
lint:
ruff --fix src tests || exit 1
ruff format -q src tests || exit 1
mypy src tests --show-error-codes || exit 1
format:
ruff src tests --fix
ruff format src tests
## Build
build-package:
poetry build
build-docs:
pip install -r docs/requirements.txt
make -C docs html
build: build-package
publish: build
poetry publish -u __token__ -p '${PYPI_PASSWORD}' --no-interaction