-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 951 Bytes
/
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
# Commands
default: help
init: ## install the requirements
pip install -r requirements.txt
.PHONY: init
develop: init ## setup develop mode
pip install --editable .
.PHONY: develop
build: init ## build
rm -rf dist
python -m build
.PHONY: build
test: ## run the tests
flake8 --exclude=.git,build --ignore=E501 .
py.test --cov=enasearch tests/
.PHONY: test
upload: build ## upload on PyPi
python -m twine upload dist/*
.PHONY: upload
# Sphinx variable
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = ghevaluate
SOURCEDIR = src/docs
BUILDDIR = build
doc: ## generate HTML documentation
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
rm -rf docs
mv "$(BUILDDIR)/html" docs
touch docs/.nojekyll
rm -rf docs/_sources
.PHONY: doc
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help