-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use local .venv, manage venv via makefile
- Loading branch information
Showing
5 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[flake8] | ||
ignore = E501, W503 | ||
exclude = .venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,6 @@ pip_abandoned.egg-info/ | |
# test coverage | ||
.coverage | ||
coverage.xml | ||
|
||
# venv | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,41 @@ | ||
SHELL := /bin/bash | ||
.PHONY: help format install lint test release | ||
.PHONY: build help format install lint test release venv | ||
|
||
help: | ||
@grep '^\.PHONY' Makefile | cut -d' ' -f2- | tr ' ' '\n' | ||
|
||
venv: | ||
python3 -m venv .venv | ||
|
||
format: | ||
isort --profile black . | ||
source .venv/bin/activate && \ | ||
isort --profile black . && \ | ||
black . | ||
|
||
install: | ||
python3 -m venv .venv | ||
source .venv/bin/activate && \ | ||
pip install -e .[dev] | ||
|
||
lint: | ||
isort --profile black -c --diff . | ||
black --check . | ||
source .venv/bin/activate && \ | ||
isort --profile black -c --diff . && \ | ||
black --check . && \ | ||
flake8 . | ||
|
||
test: | ||
source .venv/bin/activate && \ | ||
pytest --cov=pip_abandoned --cov-report term --cov-report xml ./tests | ||
|
||
build: | ||
source .venv/bin/activate && \ | ||
flit build | ||
|
||
release: | ||
# usage: `make release version=0.0.0` | ||
make test | ||
@echo "" | ||
make lint | ||
@echo "" | ||
source .venv/bin/activate && \ | ||
./release.sh "$(version)" |