-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (65 loc) · 1.88 KB
/
Makefile
File metadata and controls
78 lines (65 loc) · 1.88 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.PHONY: doc
PYTHON ?= /usr/bin/python3
PYPI ?= testpypi
############
# Pre-commit recipes
#
# Install the pre-commit hooks for the project
pre-commit:
$(PYTHON) -m pip install -r ci/requirements.precommit.txt
$(PYTHON) -m pre_commit install
#########
# Testing recipes
#
# Install the required dependencies for the test recipe
test-dependencies:
$(PYTHON) -m pip install -r ci/requirements.test.txt
# Execute the unit tests locally and in CI
test:
$(PYTHON) -m tox
#######
# Build recipes
#
# Install the required dependencies for the build recipe
build-dependencies:
$(PYTHON) -m pip install -r ci/requirements.build.txt
# Build the python distribution locally and in CI
build:
$(PYTHON) -m build
#########
# Publish recipes
#
# Install the required dependencies for the publish recipe
publish-dependencies:
$(PYTHON) -m pip install -r ci/requirements.publish.txt
# Publish the built python distribution
# Assumes the python distribution was already built using build recipe
publish:
$(PYTHON) -m twine upload --repository $(PYPI) dist/*
#########
# Release recipes
#
# Install the required dependencies for the release recipe
release-dependencies: build-dependencies publish-dependencies
# Release the python distribution by building and publishing it
release: build publish
#####
# Doc recipes
#
# Install the required dependencies for the doc recipe
doc-dependencies:
$(PYTHON) -m pip install -r ci/requirements.doc.txt
# Build the python docs locally and in CI
doc:
$(PYTHON) -m sphinx.ext.apidoc -o ./doc/source/image . "tests/*"
$(PYTHON) -m sphinx ./doc/source ./doc/sphinx
##########
# Security recipes
#
# Install required dependencies for the sec recipe
sec-dependencies:
$(PYTHON) -m pip install -r ci/requirements.sec.txt
# Security scan locally and in CI
sec:
$(PYTHON) -m detect_secrets.pre_commit_hook --baseline .secrets.baseline -v
$(PYTHON) -m pip_audit -r requirements.txt