Makefile
Makefile are used to make build systems, which make the developer workflow way easier, you can create multiple script like sections the file which can be invoked when using make ... this is all the more useful to init your environment, for lint checking formatting and anything else
Here’s an example Makefile
init: env-setup dev
env-setup:
poetry env use 3.10
dev:
poetry install
poetry run pre-commit install
export:
rm -f requirements.txt && poetry export --with dev --without-hashes -f requirements.txt --output requirements.txt
lint:
poetry run ruff check .
poetry run ruff format --check
autoformat:
poetry run ruff check --fix .
poetry run ruff format .
full:
poetry install --all-extras
all: autoformat lintyou can reference other sections in a new section, this helps us make incremental yet powerful scripts which are extensible and modular