From a1a8d3a7f3d0a487d386e1e04acf9c218b4703af Mon Sep 17 00:00:00 2001 From: francium Date: Sat, 1 Jun 2024 19:54:05 -0400 Subject: [PATCH] Add makefile --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dbd4c58 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +# phony trick from https://keleshev.com/my-book-writing-setup/ +.PHONY: phony + +install: phony +ifndef VIRTUAL_ENV + $(error install can only be run inside a Python virtual environment) +endif + @echo Installing dependencies... + pip install -r requirements-dev.txt + pip install -e . + +lint: phony lint-flake lint-mypy + +lint-flake: phony + flake8 + +lint-flake-pre310: phony + # Python <3.10 doesn't support pattern matching. + flake8 --extend-exclude tests/test_pattern_matching.py + +lint-mypy: phony + mypy + +test: phony + pytest + +docs: phony + lazydocs \ + --overview-file README.md \ + --src-base-url https://github.com/rustedpy/maybe/blob/main/ \ + ./src/maybe +