-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
48 lines (35 loc) · 1.35 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
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS += -W --keep-going
SPHINXBUILD ?= sphinx-build
SOURCEDIR = docs
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/index.rst
sphinx-apidoc -o docs/ src/simulai
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) _build/html/index.html
servedocs: docs ## compile the docs watching for changes
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
release: dist ## package and upload a release
twine upload dist/*
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: quality style
quality:
python -m black --check --line-length 119 --target-version py38 .
python -m isort --check-only .
python -m flake8 --max-line-length 119 .
style:
python -m black --line-length 119 --target-version py38 .
python -m isort .