-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
53 lines (38 loc) · 1.69 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
49
50
51
52
53
.PHONY: docs docs-source help clean tests install publish version-update-patch version-update-minor version-update-major
all: help
docs:
cd docs && rm -rf generated && make clean && make html
apidoc-doc-source:
sphinx-apidoc -o docs/source/api --separate --force --module-first pagexml
clean:
cd docs && rm -rf generated && make clean
tests:
poetry run python -m unittest tests/*_test.py
poetry.lock: pyproject.toml
poetry update --lock
docs/requirements.txt: poetry.lock
poetry export -o docs/requirements.txt --without-hashes
install:
poetry lock && poetry install
publish:
poetry build && poetry publish
version-update-patch:
poetry run version patch
version-update-minor:
poetry run version minor
version-update-major:
poetry run version major
help:
@echo "make-tools for pagexml-tools"
@echo
@echo "Please use \`make <target>', where <target> is one of:"
@echo " install to install the necessary requirements"
@echo " apidoc-source to build or update the apidoc source files in docs/source/api"
@echo " docs to build or update the documentation pages in docs/_build"
@echo " clean to remove all generated files and directories"
@echo " tests to run the unit tests in tests/"
@echo " version-update-patch to update the project version to the next patch version"
@echo " version-update-minor to update the project version to the next minor version"
@echo " version-update-major to update the project version to the next major version"
@echo " publish to publish to pypi"
@echo " docs/requirements.txt to update the requirements.txt based on poetry.lock (required by readthedocs)"