blitz_api/Makefile

51 lines
1.7 KiB
Makefile
Raw Permalink Normal View History

2021-10-02 12:10:52 +02:00
# The @ makes sure that the command itself isn't echoed in the terminal
help:
@echo "---------------HELP-----------------"
@echo "To clean the workspace type 'make clean'"
@echo "To install the projects dependencies type 'make install'"
@echo "To install the projects dependencies for development type 'make install-dev'"
@echo "To run the project type 'make run'"
@echo "To test the project type 'make test'"
@echo "To assess test coverage type 'make coverage'"
@echo "To generate the requirements.txt file for pip type 'make requirements'"
@echo "To sync current changes to a blitz for testing, type 'make sync-to-blitz'.\n Adjust connection values in scripts/push_to_blitz.sh"
@echo "To generate the client libraries type 'make generate-client-libs'"
@echo "To build the Docker regtest image type 'make docker-regtest-image'.\n The image will be available to docker as 'blitz_api'"
2021-10-02 12:10:52 +02:00
@echo "------------------------------------"
clean:
echo "Removing htmlcov folder and .coverage file"
rm -rf htmlcov .coverage
poetry run python -m pyclean .
2021-10-02 12:10:52 +02:00
install:
poetry run python -m pip install -r requirements.txt
2021-10-02 12:10:52 +02:00
install-dev:
poetry install && poetry run pre-commit install
2021-10-02 12:10:52 +02:00
run:
poetry run python -m uvicorn app.main:app --reload
2021-10-02 12:10:52 +02:00
test:
poetry run python -m pytest
2021-10-02 12:10:52 +02:00
coverage:
poetry run python -m coverage run --source=. -m pytest
poetry run python -m coverage html
update-requirements-file:
poetry update && poetry export --output requirements.txt
2021-12-05 21:14:25 +01:00
sync-to-blitz:
bash scripts/sync_to_blitz.sh
pre-commit:
poetry run pre-commit run --all-files
generate-client-libs:
poetry run python gen_client_libs.py
docker-regtest-image:
docker build -f Dockerfile.regtest -t blitz_api .