Skip to content

Commit e441fa7

Browse files
chore(internal): codegen related update
1 parent 1a0d221 commit e441fa7

File tree

6 files changed

+11
-183
lines changed

6 files changed

+11
-183
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
lint:
1313
name: lint
1414
runs-on: ubuntu-latest
15-
1615

1716
steps:
1817
- uses: actions/checkout@v4
@@ -30,5 +29,3 @@ jobs:
3029

3130
- name: Run lints
3231
run: ./scripts/lint
33-
34-

scripts/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
7+
if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
88
brew bundle check >/dev/null 2>&1 || {
99
echo "==> Installing Homebrew dependencies…"
1010
brew bundle

scripts/lint

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ rye run lint
99

1010
echo "==> Making sure it imports"
1111
rye run python -c 'import openlayer'
12-

tests/api_resources/inference_pipelines/test_rows.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def test_method_update_with_all_params(self, client: Openlayer) -> None:
3535
config={
3636
"ground_truth_column_name": "ground_truth",
3737
"human_feedback_column_name": "human_feedback",
38-
"inference_id_column_name": "id",
3938
"latency_column_name": "latency",
4039
"timestamp_column_name": "timestamp",
4140
},
@@ -101,7 +100,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncOpenlayer)
101100
config={
102101
"ground_truth_column_name": "ground_truth",
103102
"human_feedback_column_name": "human_feedback",
104-
"inference_id_column_name": "id",
105103
"latency_column_name": "latency",
106104
"timestamp_column_name": "timestamp",
107105
},

tests/api_resources/projects/test_commits.py

Lines changed: 10 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,7 @@ class TestCommits:
2121
def test_method_create(self, client: Openlayer) -> None:
2222
commit = client.projects.commits.create(
2323
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."},
3325
storage_uri="s3://...",
3426
)
3527
assert_matches_type(CommitCreateResponse, commit, path=["response"])
@@ -38,19 +30,7 @@ def test_method_create(self, client: Openlayer) -> None:
3830
def test_method_create_with_all_params(self, client: Openlayer) -> None:
3931
commit = client.projects.commits.create(
4032
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."},
5434
storage_uri="s3://...",
5535
archived=False,
5636
deployment_status="Deployed",
@@ -61,15 +41,7 @@ def test_method_create_with_all_params(self, client: Openlayer) -> None:
6141
def test_raw_response_create(self, client: Openlayer) -> None:
6242
response = client.projects.commits.with_raw_response.create(
6343
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."},
7345
storage_uri="s3://...",
7446
)
7547

@@ -82,15 +54,7 @@ def test_raw_response_create(self, client: Openlayer) -> None:
8254
def test_streaming_response_create(self, client: Openlayer) -> None:
8355
with client.projects.commits.with_streaming_response.create(
8456
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."},
9458
storage_uri="s3://...",
9559
) as response:
9660
assert not response.is_closed
@@ -106,15 +70,7 @@ def test_path_params_create(self, client: Openlayer) -> None:
10670
with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_id` but received ''"):
10771
client.projects.commits.with_raw_response.create(
10872
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."},
11874
storage_uri="s3://...",
11975
)
12076

@@ -173,15 +129,7 @@ class TestAsyncCommits:
173129
async def test_method_create(self, async_client: AsyncOpenlayer) -> None:
174130
commit = await async_client.projects.commits.create(
175131
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."},
185133
storage_uri="s3://...",
186134
)
187135
assert_matches_type(CommitCreateResponse, commit, path=["response"])
@@ -190,19 +138,7 @@ async def test_method_create(self, async_client: AsyncOpenlayer) -> None:
190138
async def test_method_create_with_all_params(self, async_client: AsyncOpenlayer) -> None:
191139
commit = await async_client.projects.commits.create(
192140
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."},
206142
storage_uri="s3://...",
207143
archived=False,
208144
deployment_status="Deployed",
@@ -213,15 +149,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenlayer)
213149
async def test_raw_response_create(self, async_client: AsyncOpenlayer) -> None:
214150
response = await async_client.projects.commits.with_raw_response.create(
215151
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."},
225153
storage_uri="s3://...",
226154
)
227155

@@ -234,15 +162,7 @@ async def test_raw_response_create(self, async_client: AsyncOpenlayer) -> None:
234162
async def test_streaming_response_create(self, async_client: AsyncOpenlayer) -> None:
235163
async with async_client.projects.commits.with_streaming_response.create(
236164
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."},
246166
storage_uri="s3://...",
247167
) as response:
248168
assert not response.is_closed
@@ -258,15 +178,7 @@ async def test_path_params_create(self, async_client: AsyncOpenlayer) -> None:
258178
with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_id` but received ''"):
259179
await async_client.projects.commits.with_raw_response.create(
260180
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."},
270182
storage_uri="s3://...",
271183
)
272184

tests/api_resources/projects/test_inference_pipelines.py

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -36,52 +36,13 @@ def test_method_create_with_all_params(self, client: Openlayer) -> None:
3636
description="This pipeline is used for production.",
3737
name="production",
3838
project={
39-
"creator_id": "589ece63-49a2-41b4-98e1-10547761d4b0",
40-
"date_created": "2024-03-22T11:31:01.185Z",
41-
"date_updated": "2024-03-22T11:31:01.185Z",
42-
"development_goal_count": 5,
43-
"goal_count": 10,
44-
"inference_pipeline_count": 1,
45-
"monitoring_goal_count": 5,
4639
"name": "My Project",
4740
"task_type": "llm-base",
48-
"version_count": 2,
49-
"workspace_id": "055fddb1-261f-4654-8598-f6347ee46a09",
5041
"description": "My project description.",
51-
"git_repo": {
52-
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
53-
"date_connected": "2019-12-27T18:11:19.117Z",
54-
"date_updated": "2019-12-27T18:11:19.117Z",
55-
"git_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
56-
"git_id": 0,
57-
"name": "name",
58-
"private": True,
59-
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
60-
"slug": "slug",
61-
"url": "url",
62-
"branch": "branch",
63-
"root_dir": "rootDir",
64-
},
6542
},
6643
workspace={
67-
"creator_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
68-
"date_created": "2019-12-27T18:11:19.117Z",
69-
"date_updated": "2019-12-27T18:11:19.117Z",
70-
"invite_count": 0,
71-
"member_count": 0,
7244
"name": "Openlayer",
73-
"period_end_date": "2019-12-27T18:11:19.117Z",
74-
"period_start_date": "2019-12-27T18:11:19.117Z",
75-
"project_count": 0,
7645
"slug": "openlayer",
77-
"invite_code": "inviteCode",
78-
"monthly_usage": [
79-
{
80-
"execution_time_ms": 0,
81-
"month_year": "2019-12-27",
82-
"prediction_count": 0,
83-
}
84-
],
8546
"saml_only_access": True,
8647
"wildcard_domains": ["string"],
8748
},
@@ -193,52 +154,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenlayer)
193154
description="This pipeline is used for production.",
194155
name="production",
195156
project={
196-
"creator_id": "589ece63-49a2-41b4-98e1-10547761d4b0",
197-
"date_created": "2024-03-22T11:31:01.185Z",
198-
"date_updated": "2024-03-22T11:31:01.185Z",
199-
"development_goal_count": 5,
200-
"goal_count": 10,
201-
"inference_pipeline_count": 1,
202-
"monitoring_goal_count": 5,
203157
"name": "My Project",
204158
"task_type": "llm-base",
205-
"version_count": 2,
206-
"workspace_id": "055fddb1-261f-4654-8598-f6347ee46a09",
207159
"description": "My project description.",
208-
"git_repo": {
209-
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
210-
"date_connected": "2019-12-27T18:11:19.117Z",
211-
"date_updated": "2019-12-27T18:11:19.117Z",
212-
"git_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
213-
"git_id": 0,
214-
"name": "name",
215-
"private": True,
216-
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
217-
"slug": "slug",
218-
"url": "url",
219-
"branch": "branch",
220-
"root_dir": "rootDir",
221-
},
222160
},
223161
workspace={
224-
"creator_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
225-
"date_created": "2019-12-27T18:11:19.117Z",
226-
"date_updated": "2019-12-27T18:11:19.117Z",
227-
"invite_count": 0,
228-
"member_count": 0,
229162
"name": "Openlayer",
230-
"period_end_date": "2019-12-27T18:11:19.117Z",
231-
"period_start_date": "2019-12-27T18:11:19.117Z",
232-
"project_count": 0,
233163
"slug": "openlayer",
234-
"invite_code": "inviteCode",
235-
"monthly_usage": [
236-
{
237-
"execution_time_ms": 0,
238-
"month_year": "2019-12-27",
239-
"prediction_count": 0,
240-
}
241-
],
242164
"saml_only_access": True,
243165
"wildcard_domains": ["string"],
244166
},

0 commit comments

Comments
 (0)