diff --git a/Makefile b/Makefile index bc5ad0b..96389b1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: install env test test_notebook +.PHONY: install env test test_notebook lint notebook help .DEFAULT_GOAL := help install: ## Create environment and install dependencies @@ -7,6 +7,13 @@ install: ## Create environment and install dependencies env: ## Run pipenv shell pipenv shell +notebook: ## Run Jupyter notebook + pipenv run jupyter notebook + +lint: ## Run linter and format checker (flake8 & yapf) + pipenv run flake8 backtester + pipenv run yapf --diff --recursive backtester/ + test: ## Run tests pipenv run python -m pytest -v backtester @@ -14,10 +21,6 @@ test_notebook: ## Run jupyter notebook test pipenv run jupyter nbconvert nbconvert --to notebook --execute --ExecutePreprocessor.timeout=60 \ backtester/examples/backtester_example.ipynb --stdout > /dev/null -lint: ## Run linter and format checker (flake8 & yapf) - pipenv run flake8 backtester - pipenv run yapf --diff --recursive backtester/ - help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |\ awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'