@@ -21,15 +21,7 @@ class TestCommits:
21
21
def test_method_create (self , client : Openlayer ) -> None :
22
22
commit = client .projects .commits .create (
23
23
project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
24
- commit = {
25
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
26
- "file_size" : 1024 ,
27
- "message" : "Updated the prompt." ,
28
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
29
- "storage_uri" : "s3://..." ,
30
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
31
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
32
- },
24
+ commit = {"message" : "Updated the prompt." },
33
25
storage_uri = "s3://..." ,
34
26
)
35
27
assert_matches_type (CommitCreateResponse , commit , path = ["response" ])
@@ -38,19 +30,7 @@ def test_method_create(self, client: Openlayer) -> None:
38
30
def test_method_create_with_all_params (self , client : Openlayer ) -> None :
39
31
commit = client .projects .commits .create (
40
32
project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
41
- commit = {
42
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
43
- "file_size" : 1024 ,
44
- "message" : "Updated the prompt." ,
45
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
46
- "storage_uri" : "s3://..." ,
47
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
48
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
49
- "date_created" : "2024-03-22T11:31:01.185Z" ,
50
- "git_commit_ref" : "main" ,
51
- "git_commit_sha" : 0 ,
52
- "git_commit_url" : "gitCommitUrl" ,
53
- },
33
+ commit = {"message" : "Updated the prompt." },
54
34
storage_uri = "s3://..." ,
55
35
archived = False ,
56
36
deployment_status = "Deployed" ,
@@ -61,15 +41,7 @@ def test_method_create_with_all_params(self, client: Openlayer) -> None:
61
41
def test_raw_response_create (self , client : Openlayer ) -> None :
62
42
response = client .projects .commits .with_raw_response .create (
63
43
project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
64
- commit = {
65
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
66
- "file_size" : 1024 ,
67
- "message" : "Updated the prompt." ,
68
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
69
- "storage_uri" : "s3://..." ,
70
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
71
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
72
- },
44
+ commit = {"message" : "Updated the prompt." },
73
45
storage_uri = "s3://..." ,
74
46
)
75
47
@@ -82,15 +54,7 @@ def test_raw_response_create(self, client: Openlayer) -> None:
82
54
def test_streaming_response_create (self , client : Openlayer ) -> None :
83
55
with client .projects .commits .with_streaming_response .create (
84
56
project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
85
- commit = {
86
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
87
- "file_size" : 1024 ,
88
- "message" : "Updated the prompt." ,
89
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
90
- "storage_uri" : "s3://..." ,
91
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
92
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
93
- },
57
+ commit = {"message" : "Updated the prompt." },
94
58
storage_uri = "s3://..." ,
95
59
) as response :
96
60
assert not response .is_closed
@@ -106,15 +70,7 @@ def test_path_params_create(self, client: Openlayer) -> None:
106
70
with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
107
71
client .projects .commits .with_raw_response .create (
108
72
project_id = "" ,
109
- commit = {
110
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
111
- "file_size" : 1024 ,
112
- "message" : "Updated the prompt." ,
113
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
114
- "storage_uri" : "s3://..." ,
115
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
116
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
117
- },
73
+ commit = {"message" : "Updated the prompt." },
118
74
storage_uri = "s3://..." ,
119
75
)
120
76
@@ -173,15 +129,7 @@ class TestAsyncCommits:
173
129
async def test_method_create (self , async_client : AsyncOpenlayer ) -> None :
174
130
commit = await async_client .projects .commits .create (
175
131
project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
176
- commit = {
177
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
178
- "file_size" : 1024 ,
179
- "message" : "Updated the prompt." ,
180
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
181
- "storage_uri" : "s3://..." ,
182
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
183
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
184
- },
132
+ commit = {"message" : "Updated the prompt." },
185
133
storage_uri = "s3://..." ,
186
134
)
187
135
assert_matches_type (CommitCreateResponse , commit , path = ["response" ])
@@ -190,19 +138,7 @@ async def test_method_create(self, async_client: AsyncOpenlayer) -> None:
190
138
async def test_method_create_with_all_params (self , async_client : AsyncOpenlayer ) -> None :
191
139
commit = await async_client .projects .commits .create (
192
140
project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
193
- commit = {
194
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
195
- "file_size" : 1024 ,
196
- "message" : "Updated the prompt." ,
197
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
198
- "storage_uri" : "s3://..." ,
199
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
200
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
201
- "date_created" : "2024-03-22T11:31:01.185Z" ,
202
- "git_commit_ref" : "main" ,
203
- "git_commit_sha" : 0 ,
204
- "git_commit_url" : "gitCommitUrl" ,
205
- },
141
+ commit = {"message" : "Updated the prompt." },
206
142
storage_uri = "s3://..." ,
207
143
archived = False ,
208
144
deployment_status = "Deployed" ,
@@ -213,15 +149,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenlayer)
213
149
async def test_raw_response_create (self , async_client : AsyncOpenlayer ) -> None :
214
150
response = await async_client .projects .commits .with_raw_response .create (
215
151
project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
216
- commit = {
217
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
218
- "file_size" : 1024 ,
219
- "message" : "Updated the prompt." ,
220
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
221
- "storage_uri" : "s3://..." ,
222
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
223
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
224
- },
152
+ commit = {"message" : "Updated the prompt." },
225
153
storage_uri = "s3://..." ,
226
154
)
227
155
@@ -234,15 +162,7 @@ async def test_raw_response_create(self, async_client: AsyncOpenlayer) -> None:
234
162
async def test_streaming_response_create (self , async_client : AsyncOpenlayer ) -> None :
235
163
async with async_client .projects .commits .with_streaming_response .create (
236
164
project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
237
- commit = {
238
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
239
- "file_size" : 1024 ,
240
- "message" : "Updated the prompt." ,
241
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
242
- "storage_uri" : "s3://..." ,
243
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
244
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
245
- },
165
+ commit = {"message" : "Updated the prompt." },
246
166
storage_uri = "s3://..." ,
247
167
) as response :
248
168
assert not response .is_closed
@@ -258,15 +178,7 @@ async def test_path_params_create(self, async_client: AsyncOpenlayer) -> None:
258
178
with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
259
179
await async_client .projects .commits .with_raw_response .create (
260
180
project_id = "" ,
261
- commit = {
262
- "author_id" : "589ece63-49a2-41b4-98e1-10547761d4b0" ,
263
- "file_size" : 1024 ,
264
- "message" : "Updated the prompt." ,
265
- "ml_model_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
266
- "storage_uri" : "s3://..." ,
267
- "training_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
268
- "validation_dataset_id" : "3fa85f64-5717-4562-b3fc-2c963f66afa6" ,
269
- },
181
+ commit = {"message" : "Updated the prompt." },
270
182
storage_uri = "s3://..." ,
271
183
)
272
184
0 commit comments