Skip to content

Commit 06cd4fe

Browse files
feat(api): add test creation endpoint
1 parent f38cfc6 commit 06cd4fe

File tree

9 files changed

+747
-2
lines changed

9 files changed

+747
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
configured_endpoints: 15
1+
configured_endpoints: 16
22
openapi_spec_hash: 7dd38774b534c352620bca63efa85b19
3-
config_hash: 21fb9730d1cdc9e3fd38724c4774b894
3+
config_hash: 0383360784fc87d799bad2be203142b5

api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ Methods:
3737
- <code title="post /projects/{projectId}/inference-pipelines">client.projects.inference_pipelines.<a href="./src/openlayer/resources/projects/inference_pipelines.py">create</a>(project_id, \*\*<a href="src/openlayer/types/projects/inference_pipeline_create_params.py">params</a>) -> <a href="./src/openlayer/types/projects/inference_pipeline_create_response.py">InferencePipelineCreateResponse</a></code>
3838
- <code title="get /projects/{projectId}/inference-pipelines">client.projects.inference_pipelines.<a href="./src/openlayer/resources/projects/inference_pipelines.py">list</a>(project_id, \*\*<a href="src/openlayer/types/projects/inference_pipeline_list_params.py">params</a>) -> <a href="./src/openlayer/types/projects/inference_pipeline_list_response.py">InferencePipelineListResponse</a></code>
3939

40+
## Tests
41+
42+
Types:
43+
44+
```python
45+
from openlayer.types.projects import TestCreateResponse
46+
```
47+
48+
Methods:
49+
50+
- <code title="post /projects/{projectId}/tests">client.projects.tests.<a href="./src/openlayer/resources/projects/tests.py">create</a>(project_id, \*\*<a href="src/openlayer/types/projects/test_create_params.py">params</a>) -> <a href="./src/openlayer/types/projects/test_create_response.py">TestCreateResponse</a></code>
51+
4052
# Commits
4153

4254
Types:

src/openlayer/resources/projects/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .tests import (
4+
TestsResource,
5+
AsyncTestsResource,
6+
TestsResourceWithRawResponse,
7+
AsyncTestsResourceWithRawResponse,
8+
TestsResourceWithStreamingResponse,
9+
AsyncTestsResourceWithStreamingResponse,
10+
)
311
from .commits import (
412
CommitsResource,
513
AsyncCommitsResource,
@@ -38,6 +46,12 @@
3846
"AsyncInferencePipelinesResourceWithRawResponse",
3947
"InferencePipelinesResourceWithStreamingResponse",
4048
"AsyncInferencePipelinesResourceWithStreamingResponse",
49+
"TestsResource",
50+
"AsyncTestsResource",
51+
"TestsResourceWithRawResponse",
52+
"AsyncTestsResourceWithRawResponse",
53+
"TestsResourceWithStreamingResponse",
54+
"AsyncTestsResourceWithStreamingResponse",
4155
"ProjectsResource",
4256
"AsyncProjectsResource",
4357
"ProjectsResourceWithRawResponse",

src/openlayer/resources/projects/projects.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77

88
import httpx
99

10+
from .tests import (
11+
TestsResource,
12+
AsyncTestsResource,
13+
TestsResourceWithRawResponse,
14+
AsyncTestsResourceWithRawResponse,
15+
TestsResourceWithStreamingResponse,
16+
AsyncTestsResourceWithStreamingResponse,
17+
)
1018
from ...types import project_list_params, project_create_params
1119
from .commits import (
1220
CommitsResource,
@@ -53,6 +61,10 @@ def commits(self) -> CommitsResource:
5361
def inference_pipelines(self) -> InferencePipelinesResource:
5462
return InferencePipelinesResource(self._client)
5563

64+
@cached_property
65+
def tests(self) -> TestsResource:
66+
return TestsResource(self._client)
67+
5668
@cached_property
5769
def with_raw_response(self) -> ProjectsResourceWithRawResponse:
5870
"""
@@ -184,6 +196,10 @@ def commits(self) -> AsyncCommitsResource:
184196
def inference_pipelines(self) -> AsyncInferencePipelinesResource:
185197
return AsyncInferencePipelinesResource(self._client)
186198

199+
@cached_property
200+
def tests(self) -> AsyncTestsResource:
201+
return AsyncTestsResource(self._client)
202+
187203
@cached_property
188204
def with_raw_response(self) -> AsyncProjectsResourceWithRawResponse:
189205
"""
@@ -325,6 +341,10 @@ def commits(self) -> CommitsResourceWithRawResponse:
325341
def inference_pipelines(self) -> InferencePipelinesResourceWithRawResponse:
326342
return InferencePipelinesResourceWithRawResponse(self._projects.inference_pipelines)
327343

344+
@cached_property
345+
def tests(self) -> TestsResourceWithRawResponse:
346+
return TestsResourceWithRawResponse(self._projects.tests)
347+
328348

329349
class AsyncProjectsResourceWithRawResponse:
330350
def __init__(self, projects: AsyncProjectsResource) -> None:
@@ -345,6 +365,10 @@ def commits(self) -> AsyncCommitsResourceWithRawResponse:
345365
def inference_pipelines(self) -> AsyncInferencePipelinesResourceWithRawResponse:
346366
return AsyncInferencePipelinesResourceWithRawResponse(self._projects.inference_pipelines)
347367

368+
@cached_property
369+
def tests(self) -> AsyncTestsResourceWithRawResponse:
370+
return AsyncTestsResourceWithRawResponse(self._projects.tests)
371+
348372

349373
class ProjectsResourceWithStreamingResponse:
350374
def __init__(self, projects: ProjectsResource) -> None:
@@ -365,6 +389,10 @@ def commits(self) -> CommitsResourceWithStreamingResponse:
365389
def inference_pipelines(self) -> InferencePipelinesResourceWithStreamingResponse:
366390
return InferencePipelinesResourceWithStreamingResponse(self._projects.inference_pipelines)
367391

392+
@cached_property
393+
def tests(self) -> TestsResourceWithStreamingResponse:
394+
return TestsResourceWithStreamingResponse(self._projects.tests)
395+
368396

369397
class AsyncProjectsResourceWithStreamingResponse:
370398
def __init__(self, projects: AsyncProjectsResource) -> None:
@@ -384,3 +412,7 @@ def commits(self) -> AsyncCommitsResourceWithStreamingResponse:
384412
@cached_property
385413
def inference_pipelines(self) -> AsyncInferencePipelinesResourceWithStreamingResponse:
386414
return AsyncInferencePipelinesResourceWithStreamingResponse(self._projects.inference_pipelines)
415+
416+
@cached_property
417+
def tests(self) -> AsyncTestsResourceWithStreamingResponse:
418+
return AsyncTestsResourceWithStreamingResponse(self._projects.tests)

0 commit comments

Comments
 (0)