1
0
Fork 0
onnx-web/api/Makefile

39 lines
822 B
Makefile
Raw Normal View History

2023-01-06 18:50:31 +00:00
.PHONY: ci pip test package-dist package-upload
onnx_env: ## create virtual env
python -v venv onnx_env
ci: pip
pip install coverage hypothesis
$(MAKE) test
2023-01-06 18:50:31 +00:00
pip:
if [ -z $${VIRTUAL_ENV+x} ]; then echo "Are you sure you want to install dependencies outside of a virtual environment?"; sleep 30; fi
pip install -r requirements.txt
test:
python -m coverage run -m unittest discover -s tests/
python -m coverage html
python -m coverage xml
package: package-dist package-upload
2023-01-06 18:50:31 +00:00
package-dist:
python3 ./setup.py sdist
2023-01-06 18:50:31 +00:00
package-upload:
twine upload dist/*
2023-02-05 13:53:26 +00:00
lint-check:
black --check --preview onnx_web
isort --check-only --skip __init__.py --filter-files onnx_web
flake8 onnx_web
2023-02-05 13:53:26 +00:00
lint-fix:
black onnx_web
isort --skip __init__.py --filter-files onnx_web
flake8 onnx_web
2023-02-05 13:53:26 +00:00
typecheck:
mypy -m onnx_web.serve