Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add make help command #187

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ ifndef MIGRATE_MSG
$(error MIGRATE_MSG is undefined)
endif

db-migrate-create: check-migrate-msg
db-migrate-create: check-migrate-msg ## Create database migration with description MIGRATE_MSG
$(alembic_cmd) revision --autogenerate -m "$(MIGRATE_MSG)"

MIGRATE_MERGE_MSG := Merge multiple heads
Expand All @@ -171,10 +171,10 @@ test: ## Run all tests except for audit logging tests
test-audit: ## Run audit logging tests
$(PY_RUN_CMD) pytest -m "audit" $(args)

test-watch:
test-watch: ## Run tests continually and watch for changes
$(PY_RUN_CMD) pytest-watch --clear $(args)

test-coverage:
test-coverage: ## Run tests and generate coverage report
$(PY_RUN_CMD) coverage run --branch --source=src -m pytest -m "not audit" $(args)
$(PY_RUN_CMD) coverage report

Expand All @@ -186,15 +186,15 @@ test-coverage-report: ## Open HTML test coverage report
# Formatting and linting
##################################################

format:
format: ## Format files
$(PY_RUN_CMD) isort --atomic src tests
$(PY_RUN_CMD) black src tests

format-check:
format-check: ## Check file formatting
$(PY_RUN_CMD) isort --atomic --check-only src tests
$(PY_RUN_CMD) black --check src tests

lint: lint-py
lint: lint-py ## Lint

lint-py: lint-flake lint-mypy

Expand Down Expand Up @@ -235,3 +235,6 @@ login: start ## Start shell in running container
# Pauses for 5 seconds
sleep-5:
sleep 5

help: ## Prints the help documentation and info about each command
@grep -E '^[/a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'