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
|
|
|
|
|
2023-01-06 18:53:41 +00:00
|
|
|
ci: pip
|
2023-01-06 19:16:48 +00:00
|
|
|
pip install coverage hypothesis
|
2023-01-06 18:53:41 +00:00
|
|
|
$(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
|
|
|
|
|
2023-01-06 19:05:31 +00:00
|
|
|
package: package-dist package-upload
|
|
|
|
|
2023-01-06 18:50:31 +00:00
|
|
|
package-dist:
|
2023-01-06 22:18:53 +00:00
|
|
|
python3 ./setup.py sdist
|
2023-01-06 18:50:31 +00:00
|
|
|
|
|
|
|
package-upload:
|
|
|
|
twine upload dist/*
|