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