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
|
export POETRY_VIRTUALENVS_IN_PROJECT=true
EXTRAS ?= develop
SPHINXOPTS ?= -n
# do poetry install only in case if poetry.lock or pyproject.toml where updated and
# we require a rebuilt.
.venv/.st-venv-completed: poetry.lock pyproject.toml
poetry install --verbose --with $(EXTRAS)
touch .venv/.st-venv-completed
.PHONY: dev
dev: .venv/.st-venv-completed
.PHONY: precommit
precommit: dev
poetry run pre-commit run -a
.PHONY: mypy
mypy: dev
.venv/bin/mypy
.PHONY: mrproper
mrproper: clean
rm -rf dist
.PHONY: clean
clean: cov-clean doc-clean
rm -rf .venv *.egg-info build .eggs __pycache__ */__pycache__ .tox
.PHONY: test
test: dev
.venv/bin/pytest tests -s -vv --release
.venv/bin/pytest tests -s -vv --ssl
.PHONY: test-pdb
test-pdb:
.venv/bin/pytest tests -s -vv --pdb
.PHONY: cov
cov: cov-clean
.venv/bin/coverage run -m pytest -vv tests --release
.venv/bin/coverage run -a -m pytest -vv tests --ssl
.venv/bin/coverage xml
.PHONY: cov-clean
cov-clean:
rm -rf htmlcov coverage.xml .coverage
.PHONY: doc
doc: dev
.venv/bin/sphinx-build -M html doc doc/_build $(SPHINXOPTS) $(O)
.PHONY: doc-clean
doc-clean:
rm -rf doc/_build
.PHONY: doc-clean
doc-preview:
xdg-open doc/_build/html/index.html
.PHONY: changes
changes: dev
.venv/bin/reno report --output CHANGES.rst --no-show-source
poetry run pre-commit run --files CHANGES.rst || true
poetry run pre-commit run --files CHANGES.rst
|