From 7240b0a28b072d4e1d90fd0adb7609e9a1f3c9b1 Mon Sep 17 00:00:00 2001 From: Bastian Venthur Date: Mon, 22 Mar 2021 09:30:14 +0100 Subject: [PATCH] included docs into makefile --- Makefile | 17 +++++++++++++---- docs/api.rst | 2 +- setup.cfg | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8afdc92..670fcbf 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,10 @@ PY = python3 VENV = venv BIN=$(VENV)/bin +DOCS_SRC = docs +DOCS_OUT = $(DOCS_SRC)/_build + + ifeq ($(OS), Windows_NT) BIN=$(VENV)/Scripts PY=python @@ -18,25 +22,30 @@ $(VENV): requirements.txt requirements-dev.txt setup.py $(BIN)/pip install -e . touch $(VENV) +.PHONY: test test: $(VENV) $(BIN)/pytest -.PHONY: test +.PHONY: lint lint: $(VENV) $(BIN)/flake8 -.PHONY: lint +.PHONY: release release: $(VENV) rm -rf dist $(BIN)/python setup.py sdist bdist_wheel $(BIN)/twine upload dist/* -.PHONY: release +.PHONY: docs +docs: $(VENV) + $(BIN)/sphinx-build $(DOCS_SRC) $(DOCS_OUT) + +.PHONY: clean clean: rm -rf build dist *.egg-info rm -rf $(VENV) + rm -rf $(DOCS_OUT) find . -type f -name *.pyc -delete find . -type d -name __pycache__ -delete # coverage rm -rf htmlcov .coverage -.PHONY: clean diff --git a/docs/api.rst b/docs/api.rst index 0e0b570..6a6e941 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -2,7 +2,7 @@ API === .. autosummary:: - :toctree: DIRNAME + :toctree: api blag.__init__ blag.version diff --git a/setup.cfg b/setup.cfg index b99f230..681fad8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,4 +6,4 @@ addopts = --cov-report=term-missing:skip-covered [flake8] -exclude = venv,build +exclude = venv,build,docs