-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (35 loc) · 1.15 KB
/
Makefile
File metadata and controls
47 lines (35 loc) · 1.15 KB
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
PYTHON ?= python
TEST_RESULTS_DIR ?= test-results
JUNIT_XML ?=
ifneq ($(strip $(JUNIT_XML)),)
JUNIT_FLAG := --junitxml=$(JUNIT_XML)
else
JUNIT_FLAG :=
endif
.PHONY: test test-cov integration lint lint-fix build deps clean publish-test publish check-dist
test:
$(PYTHON) -m pytest tests -m "not integration" $(JUNIT_FLAG)
test-cov:
$(PYTHON) -m pytest tests -m "not integration" --cov --cov-report=term-missing --cov-report=html:coverage-html --cov-report=xml:coverage.xml $(JUNIT_FLAG)
integration:
$(PYTHON) -m pytest -s tests/integration -m integration $(JUNIT_FLAG)
lint:
$(PYTHON) -m ruff check .
lint-fix:
$(PYTHON) -m ruff check --fix .
build:
$(PYTHON) -m build
deps:
$(PYTHON) -m pip install -r requirements.txt
$(PYTHON) -m pip install -r dev-requirements.txt
$(PYTHON) -m pip install -e ".[dev]"
clean:
rm -rf dist/ build/ *.egg-info src/*.egg-info
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
check-dist: build
$(PYTHON) -m twine check dist/*
publish-test: clean build check-dist
$(PYTHON) -m twine upload --repository testpypi dist/*
publish: clean build check-dist
$(PYTHON) -m twine upload dist/*