-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
132 lines (96 loc) · 2.61 KB
/
Makefile
File metadata and controls
132 lines (96 loc) · 2.61 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
help:
@echo 'make doc'
scan:
@trufflehog --debug --only-verified git file://./ --since-commit main --branch HEAD --fail
deep: scan
@ggshield secret scan repo .
pre-commit:
@pre-commit run --all-files
baseline:
@detect-secrets scan --exclude-files '^(package-lock.json|.local/|docs/|openapi/|swagger/)' > .secrets.baseline
.PHONY: doc
doc:
@pdoc --force --html libica -o docs/
@py.test --cov-config=.coveragerc --cov-report html:docs/coverage --cov=libica
@(cd openapi && mkdocs build --clean -d ../docs/openapi)
.PHONY: local
local:
@pdoc --force --html libica -o local/
@py.test --cov-config=.coveragerc --cov-report html:local/coverage --cov=libica
@(cd openapi && mkdocs build --clean -d ../local/openapi)
up:
@docker compose up -d
down:
@docker compose down
ps:
@docker compose ps
test_icav2_mock:
@curl -s -H "Authorization: Bearer Test" -X GET http://localhost/api/projects/1 | jq
install:
@pip install '.[test,dev]'
@npm install
@pre-commit install
single:
@python -m unittest libica.openapi.v3.test.test_workflow_v3.TestWorkflowV3
@python -m unittest libica.openapi.v3.test.test_workflow_v4.TestWorkflowV4
unit:
@py.test --no-cov tests/
autounit:
@py.test --no-cov libica/openapi
test:
@py.test
tox:
@tox -vv
nose:
@nose2 -vv
clean:
@rm -rf build/
@rm -rf libica.egg-info/
.PHONY: dist
dist: clean
@python3 -m build
# Usage: make testpypi version=0.2.0
testpypi: dist/libica-$(version).tar.gz
@python3 -m twine upload --repository testpypi dist/libica-$(version).tar.gz
@python3 -m twine upload --repository testpypi dist/libica-$(version)-*.whl
pypi: dist/libica-$(version).tar.gz
@python3 -m twine upload dist/libica-$(version).tar.gz
@python3 -m twine upload dist/libica-$(version)-*.whl
########
# Generate v2 SDK package
.PHONY: getapi2 genapi2 mvapidoc2 rmapi2 sweepapi2
getapi2:
@. syncapi2.sh; getapi
sweepapi2:
@python sweep.py
genapi2:
@. syncapi2.sh; genapi; mvapidoc
mvapidoc2:
@. syncapi2.sh; mvapidoc
check2: chkepver2 validate2
# check endpoint version
chkepver2:
@. syncapi2.sh; chkepver
# validate swagger openapi definitions
validate2:
@. syncapi2.sh; validateapi
########
# Generate v3 SDK package
.PHONY: getapi3 genapi3 mvapidoc3 rmapi3 sweepapi3
# THIS WILL BE THE SAME AS v2 PACKAGE SINCE USING THE SAME API DOC. COMMENTING OUT FOR NOT TO CONFUSE.
#getapi3:
# @. syncapi3.sh; getapi
#
#sweepapi3:
# @python sweep.py
genapi3:
@. syncapi3.sh; genapi; mvapidoc
mvapidoc3:
@. syncapi3.sh; mvapidoc
check3: chkepver3 validate3
# check endpoint version
chkepver3:
@. syncapi3.sh; chkepver
# validate swagger openapi definitions
validate3:
@. syncapi3.sh; validateapi