This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
67 lines (39 loc) · 1.45 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
# Makefile for development & CI
.PHONY: help clean docs
help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
clean: ## remove python cache files
find . -name '__pycache__' | xargs rm -rf
find . -name '*.pyc' -delete
rm -rf build
rm -rf dist
rm -rf *.egg-info
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf .coverage
docs: ## build sphinx docs
@poetry run sphinx-build ./docs ./build/docs
docs-requirements: ## requrement file for docs
@poetry export -f requirements.txt -E docs --output docs/requirements.txt
version: ## display software version
@python setup.py --version
install: ## install packages via poetry
@./dev/install
lint: ## run linters
poetry run ./dev/lint-code
outdated: ## Show outdated packages
poetry show -o
postgresql: ## run postgresql for testing
docker run -e POSTGRES_PASSWORD=postgres --rm --network=host --name=openapi-db -d postgres:13
postgresql-nd: ## run postgresql for testing - non daemon
docker run -e POSTGRES_PASSWORD=postgres --rm --network=host --name=openapi-db postgres:13
test: ## test with coverage
@poetry run pytest -v -x --cov --cov-report xml --cov-report html
test-version: ## check version compatibility
./dev/test-version
test-lint: ## run linters checks
@poetry run ./dev/lint-code --check
test-docs: ## run docs in CI
make docs
publish: ## release to pypi and github tag
@poetry publish --build -u lsbardel -p $(PYPI_PASSWORD)