Skip to content

Commit

Permalink
Add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
francium committed Jun 1, 2024
1 parent 80f4544 commit a1a8d3a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a1a8d3a

Please sign in to comment.