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
|
.PHONY: tests tests-acceptance tests-full install-dev docs
.state:
mkdir .state
.state/acceptance-npm: .state
cd tests/acceptance_tests/javascript && \
npm install && \
cd ../../../
touch .state/acceptance-npm
clean:
rm .state/*
install-dev:
pip install -U pip wheel
pip install .[dev]
tests:
coverage run -m pytest -m "not acceptance"
coverage report
tests-acceptance: .state/acceptance-npm
pytest -m "acceptance"
tests-full: tests tests-acceptance
tests-benchmark:
pytest tests/benchmarks.py --benchmark-warmup=on
package:
rm -fr dist/*
python -m build
release-test: package
@echo "Are you sure you want to release to test.pypi.org? [y/N]" && \
read ans && \
[ $${ans:-N} = y ] && \
twine upload --repository testpypi dist/*
release-pypi: package
@echo "Are you sure you want to release to pypi.org? [y/N]" && \
read ans && \
[ $${ans:-N} = y ] && \
twine upload dist/*
lint:
flake8 lunr tests
black lunr tests
mypy lunr
docs:
sphinx-build docs docs/_build/html
docs-server:
sphinx-autobuild docs docs/_build/html
|