Skip to content

Commit

Permalink
chore: add two goals 'upgrade' and 'requirements'
Browse files Browse the repository at this point in the history
  • Loading branch information
jenstroeger committed Mar 19, 2022
1 parent 4f02377 commit 34b8953
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# here, else it contains an empty string. The net effect is to filter out
# whether this current run of `make` requires a Python virtual environment.
NEED_VENV := $(or \
$(findstring upgrade,$(MAKECMDGOALS)), \
$(findstring requirements,$(MAKECMDGOALS)), \
$(findstring all,$(MAKECMDGOALS)), \
$(findstring quick-check,$(MAKECMDGOALS)), \
$(findstring check,$(MAKECMDGOALS)), \
Expand Down Expand Up @@ -41,6 +43,20 @@ setup:
pre-commit install --hook-type commit-msg && \
pre-commit install --hook-type pre-push

.PHONY: upgrade
upgrade:
. .venv/bin/activate && \
pip install --upgrade pip && \
pip install --editable .[hooks,dev,test,docs]
rm -fr requirements.txt && $(MAKE) requirements

.PHONY: requirements
requirements: requirements.txt
requirements.txt:
. .venv/bin/activate && \
echo "" > requirements.txt && \
for p in `pip list --format freeze`; do hashin --verbose $$p; done

.PHONY: all
all: check test dist docs

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"flake8-builtins==1.5.3",
"flake8-docstrings==1.6.0",
"flake8-rst-docstrings==0.2.5",
"hashin==0.17.0",
"hypothesis==6.35.1",
"mypy==0.931",
"pep8-naming==0.12.1",
Expand Down

0 comments on commit 34b8953

Please sign in to comment.