Skip to content

Instantly share code, notes, and snippets.

@marcelotmelo
Created January 7, 2022 17:14
Show Gist options
  • Save marcelotmelo/55f2bb9a2da8b2790e6f4c3ab7551c35 to your computer and use it in GitHub Desktop.
Save marcelotmelo/55f2bb9a2da8b2790e6f4c3ab7551c35 to your computer and use it in GitHub Desktop.
Poetry Makefile
PHONY: clean requirements build setup venv lint format test
clean:
@rm -f requirements.txt
@rm -rf app/__pycache__ tests/__pycache__
build: requirements
@docker build --rm .
requirements: clean
@poetry export -f requirements.txt --output requirements.txt
setup: requirements
@pip install -r requirements.txt
venv:
@poetry shell
lint:
@poetry run flake8
format:
@poetry run black .
test:
@poetry run pytest
poetry:
@poetry install --no-root --remove-untracked
lock:
@poetry lock
validate: lint format test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment