diff --git a/Makefile b/Makefile index 45add30..208f6f3 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,6 @@ -# Project settings -PROJECT := Pomace PACKAGE := pomace -REPOSITORY := jacebrowning/pomace - -# Project paths -PACKAGES := $(PACKAGE) tests -CONFIG := $(wildcard *.py) MODULES := $(wildcard $(PACKAGE)/*.py) -# Virtual environment paths -VIRTUAL_ENV ?= .venv - # MAIN TASKS ################################################################## .PHONY: all @@ -39,6 +29,7 @@ doctor: ## Confirm system dependencies are available # PROJECT DEPENDENCIES ######################################################## +VIRTUAL_ENV ?= .venv DEPENDENCIES := $(VIRTUAL_ENV)/.poetry-$(shell bin/checksum pyproject.toml poetry.lock) .PHONY: install @@ -62,8 +53,8 @@ endif .PHONY: format format: install - poetry run isort $(PACKAGES) notebooks - poetry run black $(PACKAGES) notebooks + poetry run isort $(PACKAGE) tests notebooks + poetry run black $(PACKAGE) tests notebooks @ echo .PHONY: check @@ -71,9 +62,9 @@ check: install format ## Run formaters, linters, and static analysis ifdef CI git diff --exit-code endif - poetry run mypy $(PACKAGES) --config-file=.mypy.ini - poetry run pylint $(PACKAGES) --rcfile=.pylint.ini - poetry run pydocstyle $(PACKAGES) $(CONFIG) + poetry run mypy $(PACKAGE) tests --config-file=.mypy.ini + poetry run pylint $(PACKAGE) tests --rcfile=.pylint.ini + poetry run pydocstyle $(PACKAGE) tests # TESTS ####################################################################### @@ -94,21 +85,21 @@ test-unit: install @ ( mv $(FAILURES) $(FAILURES).bak || true ) > /dev/null 2>&1 poetry run pytest $(PACKAGE) $(PYTEST_OPTIONS) @ ( mv $(FAILURES).bak $(FAILURES) || true ) > /dev/null 2>&1 - poetry run coveragespace $(REPOSITORY) unit + poetry run coveragespace set unit .PHONY: test-int test-int: install @ if test -e $(FAILURES); then poetry run pytest tests $(PYTEST_RERUN_OPTIONS); fi @ rm -rf $(FAILURES) poetry run pytest tests $(PYTEST_OPTIONS) - poetry run coveragespace $(REPOSITORY) integration + poetry run coveragespace set integration .PHONY: test-all test-all: install - @ if test -e $(FAILURES); then poetry run pytest $(PACKAGES) $(PYTEST_RERUN_OPTIONS); fi + @ if test -e $(FAILURES); then poetry run pytest $(PACKAGE) tests $(PYTEST_RERUN_OPTIONS); fi @ rm -rf $(FAILURES) - poetry run pytest $(PACKAGES) $(PYTEST_OPTIONS) - poetry run coveragespace $(REPOSITORY) overall + poetry run pytest $(PACKAGE) tests $(PYTEST_OPTIONS) + poetry run coveragespace set overall .PHONY: read-coverage read-coverage: @@ -150,7 +141,7 @@ mkdocs-serve: mkdocs # BUILD ####################################################################### DIST_FILES := dist/*.tar.gz dist/*.whl -EXE_FILES := dist/$(PROJECT).* +EXE_FILES := dist/$(PACKAGE).* .PHONY: dist dist: install $(DIST_FILES) @@ -160,12 +151,12 @@ $(DIST_FILES): $(MODULES) pyproject.toml .PHONY: exe exe: install $(EXE_FILES) -$(EXE_FILES): $(MODULES) $(PROJECT).spec +$(EXE_FILES): $(MODULES) $(PACKAGE).spec # For framework/shared support: https://github.com/yyuu/pyenv/wiki - poetry run pyinstaller $(PROJECT).spec --noconfirm --clean + poetry run pyinstaller $(PACKAGE).spec --noconfirm --clean -$(PROJECT).spec: - poetry run pyi-makespec $(PACKAGE)/__main__.py --onefile --windowed --name=$(PROJECT) +$(PACKAGE).spec: + poetry run pyi-makespec $(PACKAGE)/__main__.py --onefile --windowed --name=$(PACKAGE) # RELEASE ##################################################################### @@ -173,7 +164,7 @@ $(PROJECT).spec: upload: dist ## Upload the current version to PyPI git diff --name-only --exit-code poetry publish - bin/open https://pypi.org/project/$(PROJECT) + bin/open https://pypi.org/project/$(PACKAGE) # CLEANUP ##################################################################### @@ -186,7 +177,7 @@ clean-all: clean .PHONY: .clean-install .clean-install: - find $(PACKAGES) -name '__pycache__' -delete + find $(PACKAGE) tests -name '__pycache__' -delete rm -rf *.egg-info .PHONY: .clean-test diff --git a/poetry.lock b/poetry.lock index 92752d9..db46738 100644 --- a/poetry.lock +++ b/poetry.lock @@ -208,7 +208,7 @@ toml = ["toml"] [[package]] name = "coveragespace" -version = "4.0a2" +version = "4.0a3" description = "A place to track your code coverage metrics." category = "dev" optional = false @@ -1180,7 +1180,7 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "94b76662d8ec409fd60e530cfb493dabc5f470232aa62fbd579d62721fc96aeb" +content-hash = "5e959da4f2d5234ee11a01e7be8a50e3f939a3ae571c52cad44ff8076191e362" [metadata.files] altgraph = [ @@ -1310,8 +1310,8 @@ coverage = [ {file = "coverage-5.3.1.tar.gz", hash = "sha256:38f16b1317b8dd82df67ed5daa5f5e7c959e46579840d77a67a4ceb9cef0a50b"}, ] coveragespace = [ - {file = "coveragespace-4.0a2-py3-none-any.whl", hash = "sha256:71097bcc8e660b0ef7c663b7149b4f4409860f56c969f823b296ebe097714bbd"}, - {file = "coveragespace-4.0a2.tar.gz", hash = "sha256:e25433d06b2a61ac89df77dd0d940fd99c9905cb5b3f94955b4804e3e6ff2d54"}, + {file = "coveragespace-4.0a3-py3-none-any.whl", hash = "sha256:260f70b24e0123505fb9828931b77db1af629b3fa6b525acbda60d4421d32675"}, + {file = "coveragespace-4.0a3.tar.gz", hash = "sha256:f7d9f7b5e5fd7edc34001009011c8144e826ee84158bf7779e8c0bf7bf72f72a"}, ] crashtest = [ {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, diff --git a/pyproject.toml b/pyproject.toml index fbb9a08..e5ad3b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,7 +83,7 @@ pytest-random = "*" freezegun = "*" # Reports -coveragespace = "=4.0a2" +coveragespace = "=4.0a3" # Documentation mkdocs = "^1.0"