Skip to content

Commit ff90fed

Browse files
committed
feat(qaas): add makefile
1 parent 09abee6 commit ff90fed

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

Makefile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ define generate_client # 1: api_version
1010
mkdir -p ${CLIENT_FOLDER}/$(1)
1111
openapi-python-client generate \
1212
--path ${OPENAPI_FOLDER}/scaleway.qaas.$(1).Api.yml \
13-
--output-path ${CLIENT_FOLDER}/$(1)
14-
--overwrite
13+
--output-path ${CLIENT_FOLDER}/$(1) \
14+
--overwrite \
15+
--no-fail-on-warning || true
1516
endef
1617

1718
define clean_client # api_version
19+
rm ${CLIENT_FOLDER}/$(1)/.gitignore
20+
rm ${CLIENT_FOLDER}/$(1)/pyproject.toml
21+
rm ${CLIENT_FOLDER}/$(1)/README.md
1822
black ${CLIENT_FOLDER}/$(1)
1923
endef
2024

@@ -24,18 +28,16 @@ install:
2428
pip3 install openapi-python-client
2529
pip3 install black
2630

31+
.PHONY: v1alpha1
32+
v1alpha1:
33+
$(call generate_client,${V1_ALPHA1})
34+
$(call clean_client,${V1_ALPHA1})
35+
2736
.PHONY: install-test
2837
install-test:
2938
pip3 install --upgrade pip
3039
pip3 install -r tests/requirements.txt
3140

32-
.PHONY: v1alpha1
33-
v1alpha1:
34-
$(call generate_client,${V1_ALPHA1})
35-
3641
.PHONY: test
3742
test:
38-
pytest -s --showprogress -vv tests/
39-
40-
.PHONY: clean
41-
clean:
43+
pytest -s --showprogress -vv tests/

scaleway_qaas_client/v1alpha1/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
CreateModelBody,
101101
CreateProcessBody,
102102
CreateSessionBody,
103+
ListPlatformsPlatformTechnology,
104+
ListPlatformsPlatformType,
103105
ScalewayQaasV1Alpha1Application,
104106
ScalewayQaasV1Alpha1Job,
105107
ScalewayQaasV1Alpha1JobResult,
@@ -110,12 +112,10 @@
110112
ScalewayQaasV1Alpha1Session,
111113
ScalewayQaasV1Alpha1SessionAccess,
112114
TerminateSessionBody,
113-
ListPlatformsPlatformType,
114-
ListPlatformsPlatformTechnology,
115115
)
116116
from scaleway_qaas_client.v1alpha1.quantum_as_a_service_api_client.types import (
117-
Response,
118117
UNSET,
118+
Response,
119119
)
120120

121121
_DEFAULT_URL = "https://api.scaleway.com"

0 commit comments

Comments
 (0)