-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7eed26
commit 478359b
Showing
5 changed files
with
27 additions
and
33 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,54 @@ | ||
install: ## Install the poetry environment | ||
@echo "🚀 Creating virtual environment using pyenv and poetry" | ||
.PHONY: install | ||
install: ## Install the Poetry environment. | ||
@echo "🚀 Creating virtual environment using Poetry" | ||
@poetry install | ||
@poetry shell | ||
|
||
check: ## Lint code using pre-commit and check obsolete dependencies using deptry. | ||
.PHONY: check | ||
check: ## Run code quality tools. | ||
@echo "🚀 Checking Poetry lock file consistency with 'pyproject.toml': Running poetry lock --check" | ||
@poetry lock --check | ||
@echo "🚀 Linting code: Running pre-commit" | ||
@pre-commit run -a | ||
@poetry run pre-commit run -a | ||
@echo "🚀 Static type checking: Running mypy" | ||
@mypy | ||
@poetry run mypy | ||
@echo "🚀 Checking for obsolete dependencies: Running deptry" | ||
@deptry . | ||
@poetry run deptry . | ||
|
||
test: ## Test the code with pytest | ||
.PHONY: test | ||
test: ## Test the code with pytest. | ||
@echo "🚀 Testing code: Running pytest" | ||
@pytest --cov --cov-config=pyproject.toml --cov-report=xml | ||
@poetry run pytest --cov --cov-config=pyproject.toml --cov-report=xml | ||
|
||
build: clean-build ## Build wheel file using poetry | ||
@echo "🚀 Creating wheel file" | ||
.PHONY: build | ||
build: clean-build ## Build wheel and sdist files using Poetry. | ||
@echo "🚀 Creating wheel and sdist files" | ||
@poetry build | ||
|
||
.PHONY: clean-build | ||
clean-build: ## clean build artifacts | ||
@rm -rf dist | ||
|
||
publish: ## publish a release to pypi. | ||
.PHONY: publish | ||
publish: ## Publish a release to PyPI. | ||
@echo "🚀 Publishing: Dry run." | ||
@poetry config pypi-token.pypi $(PYPI_TOKEN) | ||
@poetry publish --dry-run | ||
@echo "🚀 Publishing." | ||
@poetry publish | ||
|
||
.PHONY: build-and-publish | ||
build-and-publish: build publish ## Build and publish. | ||
|
||
docs-test: ## Test if documentation can be built without warnings or errors | ||
.PHONY: docs-test | ||
docs-test: ## Test if documentation can be built without warnings or errors. | ||
@( cd docs ; poetry run mkdocs build -s) | ||
|
||
docs: ## Build and serve the documentation | ||
@( cd docs ; poetry run mkdocs serve ) | ||
|
||
.PHONY: docs | ||
docs: ## Build and serve the documentation. | ||
@( cd docs ; poetry run mkdocs serve ) | ||
|
||
.PHONY: help | ||
|
||
help: | ||
help: ## Show help for the commands. | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
|
||
.DEFAULT_GOAL := help |