-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathMakefile
60 lines (41 loc) · 1.24 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
54
55
56
57
58
59
60
# This makefile is used to make it easier to get the project set up
# to be ready for development work in the local sandbox.
# example: "make setup"
PYTHON=python
LINT=black
LINT_DIRS=ibm_platform_services test/unit test/integration examples
setup: deps dev-deps install-project
all: upgrade-pip setup test-unit lint
ci: all
publish-release: publish-deps build-dist publish-dist
upgrade-pip:
${PYTHON} -m pip install --upgrade pip
deps:
${PYTHON} -m pip install .
dev-deps:
${PYTHON} -m pip install .[dev]
detect-secrets:
detect-secrets scan --update .secrets.baseline
detect-secrets audit .secrets.baseline
publish-deps:
${PYTHON} -m pip install .[publish]
install-project:
${PYTHON} -m pip install -e .
test: test-unit test-int
test-unit:
${PYTHON} -m pytest --cov=ibm_platform_services test/unit
test-int:
${PYTHON} -m pytest test/integration
test-examples:
${PYTHON} -m pytest examples
lint:
${PYTHON} -m pylint ${LINT_DIRS}
${LINT} --check ${LINT_DIRS}
lint-fix:
${LINT} ${LINT_DIRS}
build-dist:
rm -fr dist
${PYTHON} -m build
# This target requires the TWINE_PASSWORD env variable to be set to the user's pypi.org API token.
publish-dist:
TWINE_USERNAME=__token__ ${PYTHON} -m twine upload --non-interactive --verbose dist/*