-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
40 lines (24 loc) · 1.15 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
.PHONY: help default docs build release clean test check fmt
.DEFAULT_GOAL := help
PROJECT := sotabench-eval
help: ## Show help.
@grep -E '^[a-zA-Z2_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
docs: ## Build documentation.
@cd docs && make html && open _build/html/index.html
build: ## Build the source and wheel distribution packages.
@python3 setup.py sdist bdist_wheel
release: build ## Build and upload the package to PyPI.
@twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
@rm -fr build dist sotabench-eval.egg-info
clean: ## Cleanup the project
@find . -type d -name __pycache__ -delete
@find . -type f -name "*.py[cod]" -delete
@rm -fr build dist sotabench-eval.egg-info
@rm -fr docs/_build/*
test: ## Run tests and code checks.
@py.test -v --cov "$(PROJECT)" "$(PROJECT)"
check: ## Run code checks.
@flake8 "$(PROJECT)"
@pydocstyle "$(PROJECT)"
fmt: ## Format the code.
@black --target-version=py37 --safe --line-length=79 "$(PROJECT)"