-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
42 lines (32 loc) · 913 Bytes
/
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
POETRY=poetry
PYTEST=$(POETRY) run pytest
GIT=git
GIT_TAG=$(shell $(GIT) describe --tags)
build: requirements.txt
$(POETRY) build
requirements.txt: pyproject.toml
poetry export -f requirements.txt --output requirements.txt --without-hashes
publish: build
ifdef PYPI_URL
$(POETRY) config repositories.pypi $(PYPI_URL)
$(POETRY) publish -r pypi -u __token__ -p $(PYPI_TOKEN) || $(POETRY) config repositories.pypi --unset
else
$(POETRY) publish -u __token__ -p $(PYPI_TOKEN)
endif
install:
$(POETRY) install -E pyspark
$(POETRY) run pre-commit install
format_and_lint:
$(POETRY) run pre-commit run --all
test:
$(POETRY) run coverage run --source=src/ -m pytest tests/
$(POETRY) run coverage report
$(POETRY) run coverage xml
$(POETRY) run coverage html
doc:
$(POETRY) run mkdocs build
publish-doc:
$(POETRY) version $(GIT_TAG)
$(POETRY) run mkdocs gh-deploy --force
serve-doc:
mkdocs serve