-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (46 loc) · 1.67 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
PYTHON_VERSION := 3.9.12
bake: ## bake without inputs and overwrite if exists.
@cookiecutter --no-input . --overwrite-if-exists
bake-with-inputs: ## bake with inputs and overwrite if exists.
@cookiecutter . --overwrite-if-exists
install: ## Install the poetry environment
@echo "🚀 Creating virtual environment using pyenv and poetry"
@poetry install
@poetry shell
format: ## Format code using isort and black.
@echo "🚀 Formatting code: Running isort and black"
@isort .
@black .
check: ## Check code formatting using isort, black, flake8 and mypy.
@echo "🚀 Checking code formatting: Running isort"
@isort --check-only --diff .
@echo "🚀 Checking code formatting: Running black"
@black --check .
@echo "🚀 Checking code formatting: Running flake8"
@flake8 .
@echo "🚀 Checking code formatting: Running mypy"
@mypy .
test: ## Test the code with pytest
@echo "🚀 Testing code: Running pytest"
@pytest --doctest-modules tests
build: clean-build ## Build wheel file using poetry
@echo "🚀 Creating wheel file"
@poetry build
clean-build: ## clean build artifacts
@rm -rf dist
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
build-and-publish: build publish ## Build and publish.
docs-test: ## Test if documentation can be built without warnings or errors
@mkdocs build -s
docs: ## Build and serve the documentation
@mkdocs serve
.PHONY: docs
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help