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'"
|
2021-11-18 10:57:27 +01:00
|
|
|
|
@echo "To generate the requirements.txt file for pip type 'make requirements'"
|
2022-08-07 07:38:02 +02:00
|
|
|
|
@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'"
|
2022-11-29 21:05:20 +01:00
|
|
|
|
@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
|
2022-09-11 19:33:46 +02:00
|
|
|
|
poetry run python -m pyclean .
|
2022-03-20 16:00:25 +01:00
|
|
|
|
|
2021-10-02 12:10:52 +02:00
|
|
|
|
install:
|
2022-09-11 19:33:46 +02:00
|
|
|
|
poetry run python -m pip install -r requirements.txt
|
2021-10-02 12:10:52 +02:00
|
|
|
|
|
2022-05-28 12:38:10 +02:00
|
|
|
|
install-dev:
|
2022-09-11 19:33:46 +02:00
|
|
|
|
poetry install && poetry run pre-commit install
|
2021-10-02 12:10:52 +02:00
|
|
|
|
|
|
|
|
|
|
run:
|
2022-09-11 19:33:46 +02:00
|
|
|
|
poetry run python -m uvicorn app.main:app --reload
|
2021-10-02 12:10:52 +02:00
|
|
|
|
|
2022-03-20 16:00:25 +01:00
|
|
|
|
test:
|
2022-09-11 19:33:46 +02:00
|
|
|
|
poetry run python -m pytest
|
2021-10-02 12:10:52 +02:00
|
|
|
|
|
|
|
|
|
|
coverage:
|
2022-09-11 19:33:46 +02:00
|
|
|
|
poetry run python -m coverage run --source=. -m pytest
|
|
|
|
|
|
poetry run python -m coverage html
|
2021-11-18 10:57:27 +01:00
|
|
|
|
|
2022-05-28 12:38:10 +02:00
|
|
|
|
update-requirements-file:
|
|
|
|
|
|
poetry update && poetry export --output requirements.txt
|
2021-12-05 21:14:25 +01:00
|
|
|
|
|
2022-05-28 12:38:10 +02:00
|
|
|
|
sync-to-blitz:
|
2022-03-20 16:00:25 +01:00
|
|
|
|
bash scripts/sync_to_blitz.sh
|
|
|
|
|
|
|
2022-05-28 12:38:10 +02:00
|
|
|
|
pre-commit:
|
2022-09-11 19:33:46 +02:00
|
|
|
|
poetry run pre-commit run --all-files
|
2022-08-07 07:38:02 +02:00
|
|
|
|
|
|
|
|
|
|
generate-client-libs:
|
2022-09-11 19:33:46 +02:00
|
|
|
|
poetry run python gen_client_libs.py
|
2022-11-29 21:05:20 +01:00
|
|
|
|
|
|
|
|
|
|
docker-regtest-image:
|
|
|
|
|
|
docker build -f Dockerfile.regtest -t blitz_api .
|