-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated makefile, setup.py, github actions:
* makefile depends on its own venv for each target * dev-requirements moved to requirements-dev.txt
- Loading branch information
Showing
6 changed files
with
82 additions
and
54 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
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,22 +1,50 @@ | ||
# system python interpreter. used only to create virtual environment | ||
PY = python3 | ||
VENV = venv | ||
BIN=$(VENV)/bin | ||
|
||
DOCS_SRC = docs | ||
DOCS_OUT = $(DOCS_SRC)/_build | ||
|
||
|
||
ifeq ($(OS), Windows_NT) | ||
BIN=$(VENV)/Scripts | ||
PY=python | ||
endif | ||
|
||
|
||
all: lint test | ||
|
||
test: | ||
pytest | ||
$(VENV): requirements-dev.txt setup.py | ||
$(PY) -m venv $(VENV) | ||
$(BIN)/pip install --upgrade -r requirements-dev.txt | ||
$(BIN)/pip install -e . | ||
touch $(VENV) | ||
|
||
.PHONY: test | ||
test: $(VENV) | ||
$(BIN)/pytest | ||
|
||
lint: | ||
flake8 gron | ||
.PHONY: lint | ||
lint: $(VENV) | ||
$(BIN)/flake8 | ||
|
||
docs: | ||
$(MAKE) -C docs html | ||
.PHONY: docs | ||
|
||
release: | ||
python3 setup.py sdist bdist_wheel upload | ||
.PHONY: release | ||
release: $(VENV) | ||
rm -rf dist | ||
$(BIN)/python setup.py sdist bdist_wheel | ||
$(BIN)/twine upload dist/* | ||
|
||
.PHONY: docs | ||
docs: $(VENV) | ||
$(BIN)/sphinx-build $(DOCS_SRC) $(DOCS_OUT) | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf build dist *.egg-info | ||
rm -rf $(VENV) | ||
rm -rf $(DOCS_OUT) | ||
find . -type f -name *.pyc -delete | ||
find . -type d -name __pycache__ -delete | ||
.PHONY: clean | ||
# coverage | ||
rm -rf htmlcov .coverage |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sphinx==4.0.1 | ||
twine==3.4.1 | ||
wheel==0.36.2 | ||
pytest==6.2.4 | ||
pytest-cov==2.12.1 | ||
flake8==3.9.2 |
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
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