Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 1.64.0 #697

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.63.0"
".": "1.64.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 69
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-ff0d729948c168849f182f3ade5515a5d7ba313e3e5bf072042ca7f225e83113.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/structify%2Fstructify-4f88c9376bd23a069cb6b1a2863b6b98bbcecb9c231b66cfb37aacb011900ec0.yml
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.64.0 (2024-12-12)

Full Changelog: [v1.63.0...v1.64.0](https://github.com/StructifyAI/structify-python/compare/v1.63.0...v1.64.0)

### Features

* **api:** api update ([#696](https://github.com/StructifyAI/structify-python/issues/696)) ([f2d7d41](https://github.com/StructifyAI/structify-python/commit/f2d7d414cdc2bc621a7edfcc8790367230b7a80a))
* **api:** api update ([#698](https://github.com/StructifyAI/structify-python/issues/698)) ([650fe20](https://github.com/StructifyAI/structify-python/commit/650fe20f3da60c6be60e1d6b3dd192ceb3116414))

## 1.63.0 (2024-12-12)

Full Changelog: [v1.62.0...v1.63.0](https://github.com/StructifyAI/structify-python/compare/v1.62.0...v1.63.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ Methods:
- <code title="get /admin/training_datasets/next_unverified">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">get_next_unverified</a>(\*\*<a href="src/structify/types/admin/training_dataset_get_next_unverified_params.py">params</a>) -> <a href="./src/structify/types/admin/training_datum_response.py">TrainingDatumResponse</a></code>
- <code title="get /admin/training_datasets/get_step_by_id">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">get_step_by_id</a>(\*\*<a href="src/structify/types/admin/training_dataset_get_step_by_id_params.py">params</a>) -> <a href="./src/structify/types/admin/training_datum_response.py">TrainingDatumResponse</a></code>
- <code title="get /admin/training_datasets/list_datums">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">list_datums</a>(\*\*<a href="src/structify/types/admin/training_dataset_list_datums_params.py">params</a>) -> <a href="./src/structify/types/admin/training_dataset_list_datums_response.py">TrainingDatasetListDatumsResponse</a></code>
- <code title="post /admin/training_datasets/mark_suspicious_datum">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">mark_suspicious_datum</a>(\*\*<a href="src/structify/types/admin/training_dataset_mark_suspicious_datum_params.py">params</a>) -> None</code>
- <code title="delete /admin/training_datasets/remove_datum">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">remove_datum</a>(\*\*<a href="src/structify/types/admin/training_dataset_remove_datum_params.py">params</a>) -> None</code>
- <code title="post /admin/training_datasets/reset_pending">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">reset_pending</a>(\*\*<a href="src/structify/types/admin/training_dataset_reset_pending_params.py">params</a>) -> None</code>
- <code title="post /admin/training_datasets/size">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">size</a>(\*\*<a href="src/structify/types/admin/training_dataset_size_params.py">params</a>) -> <a href="./src/structify/types/admin/training_dataset_size_response.py">TrainingDatasetSizeResponse</a></code>
- <code title="put /admin/training_datasets/update_datum">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">update_datum</a>(\*\*<a href="src/structify/types/admin/training_dataset_update_datum_params.py">params</a>) -> None</code>
- <code title="post /admin/training_datasets/update_datum_status">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">update_datum_status</a>(\*\*<a href="src/structify/types/admin/training_dataset_update_datum_status_params.py">params</a>) -> None</code>
- <code title="post /admin/training_datasets/upload_datum">client.admin.training_datasets.<a href="./src/structify/resources/admin/training_datasets.py">upload_datum</a>(\*\*<a href="src/structify/types/admin/training_dataset_upload_datum_params.py">params</a>) -> None</code>

# Datasets
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "structifyai"
version = "1.63.0"
version = "1.64.0"
description = "The official Python library for the structify API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/structify/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "structify"
__version__ = "1.63.0" # x-release-please-version
__version__ = "1.64.0" # x-release-please-version
188 changes: 93 additions & 95 deletions src/structify/resources/admin/training_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
training_dataset_get_step_by_id_params,
training_dataset_get_labeller_stats_params,
training_dataset_get_next_unverified_params,
training_dataset_mark_suspicious_datum_params,
training_dataset_update_datum_status_params,
)
from ..._base_client import make_request_options
from ...types.admin.training_datum_response import TrainingDatumResponse
Expand Down Expand Up @@ -326,47 +326,6 @@ def list_datums(
cast_to=TrainingDatasetListDatumsResponse,
)

def mark_suspicious_datum(
self,
*,
reason: str,
step_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
"""
Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return self._post(
"/admin/training_datasets/mark_suspicious_datum",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"reason": reason,
"step_id": step_id,
},
training_dataset_mark_suspicious_datum_params.TrainingDatasetMarkSuspiciousDatumParams,
),
),
cast_to=NoneType,
)

def remove_datum(
self,
*,
Expand Down Expand Up @@ -531,6 +490,46 @@ def update_datum(
cast_to=NoneType,
)

def update_datum_status(
self,
*,
id: str,
status: Literal["Unlabeled", "Labeled", "Verified", "Pending", "Skipped", "Suspicious"],
review_message: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
"""
Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return self._post(
"/admin/training_datasets/update_datum_status",
body=maybe_transform(
{
"id": id,
"status": status,
"review_message": review_message,
},
training_dataset_update_datum_status_params.TrainingDatasetUpdateDatumStatusParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=NoneType,
)

def upload_datum(
self,
*,
Expand Down Expand Up @@ -857,47 +856,6 @@ async def list_datums(
cast_to=TrainingDatasetListDatumsResponse,
)

async def mark_suspicious_datum(
self,
*,
reason: str,
step_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
"""
Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return await self._post(
"/admin/training_datasets/mark_suspicious_datum",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{
"reason": reason,
"step_id": step_id,
},
training_dataset_mark_suspicious_datum_params.TrainingDatasetMarkSuspiciousDatumParams,
),
),
cast_to=NoneType,
)

async def remove_datum(
self,
*,
Expand Down Expand Up @@ -1062,6 +1020,46 @@ async def update_datum(
cast_to=NoneType,
)

async def update_datum_status(
self,
*,
id: str,
status: Literal["Unlabeled", "Labeled", "Verified", "Pending", "Skipped", "Suspicious"],
review_message: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> None:
"""
Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return await self._post(
"/admin/training_datasets/update_datum_status",
body=await async_maybe_transform(
{
"id": id,
"status": status,
"review_message": review_message,
},
training_dataset_update_datum_status_params.TrainingDatasetUpdateDatumStatusParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=NoneType,
)

async def upload_datum(
self,
*,
Expand Down Expand Up @@ -1136,9 +1134,6 @@ def __init__(self, training_datasets: TrainingDatasetsResource) -> None:
self.list_datums = to_raw_response_wrapper(
training_datasets.list_datums,
)
self.mark_suspicious_datum = to_raw_response_wrapper(
training_datasets.mark_suspicious_datum,
)
self.remove_datum = to_raw_response_wrapper(
training_datasets.remove_datum,
)
Expand All @@ -1151,6 +1146,9 @@ def __init__(self, training_datasets: TrainingDatasetsResource) -> None:
self.update_datum = to_raw_response_wrapper(
training_datasets.update_datum,
)
self.update_datum_status = to_raw_response_wrapper(
training_datasets.update_datum_status,
)
self.upload_datum = to_raw_response_wrapper(
training_datasets.upload_datum,
)
Expand Down Expand Up @@ -1181,9 +1179,6 @@ def __init__(self, training_datasets: AsyncTrainingDatasetsResource) -> None:
self.list_datums = async_to_raw_response_wrapper(
training_datasets.list_datums,
)
self.mark_suspicious_datum = async_to_raw_response_wrapper(
training_datasets.mark_suspicious_datum,
)
self.remove_datum = async_to_raw_response_wrapper(
training_datasets.remove_datum,
)
Expand All @@ -1196,6 +1191,9 @@ def __init__(self, training_datasets: AsyncTrainingDatasetsResource) -> None:
self.update_datum = async_to_raw_response_wrapper(
training_datasets.update_datum,
)
self.update_datum_status = async_to_raw_response_wrapper(
training_datasets.update_datum_status,
)
self.upload_datum = async_to_raw_response_wrapper(
training_datasets.upload_datum,
)
Expand Down Expand Up @@ -1226,9 +1224,6 @@ def __init__(self, training_datasets: TrainingDatasetsResource) -> None:
self.list_datums = to_streamed_response_wrapper(
training_datasets.list_datums,
)
self.mark_suspicious_datum = to_streamed_response_wrapper(
training_datasets.mark_suspicious_datum,
)
self.remove_datum = to_streamed_response_wrapper(
training_datasets.remove_datum,
)
Expand All @@ -1241,6 +1236,9 @@ def __init__(self, training_datasets: TrainingDatasetsResource) -> None:
self.update_datum = to_streamed_response_wrapper(
training_datasets.update_datum,
)
self.update_datum_status = to_streamed_response_wrapper(
training_datasets.update_datum_status,
)
self.upload_datum = to_streamed_response_wrapper(
training_datasets.upload_datum,
)
Expand Down Expand Up @@ -1271,9 +1269,6 @@ def __init__(self, training_datasets: AsyncTrainingDatasetsResource) -> None:
self.list_datums = async_to_streamed_response_wrapper(
training_datasets.list_datums,
)
self.mark_suspicious_datum = async_to_streamed_response_wrapper(
training_datasets.mark_suspicious_datum,
)
self.remove_datum = async_to_streamed_response_wrapper(
training_datasets.remove_datum,
)
Expand All @@ -1286,6 +1281,9 @@ def __init__(self, training_datasets: AsyncTrainingDatasetsResource) -> None:
self.update_datum = async_to_streamed_response_wrapper(
training_datasets.update_datum,
)
self.update_datum_status = async_to_streamed_response_wrapper(
training_datasets.update_datum_status,
)
self.upload_datum = async_to_streamed_response_wrapper(
training_datasets.upload_datum,
)
4 changes: 4 additions & 0 deletions src/structify/resources/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ def merge(
*,
entity_1_id: str,
entity_2_id: str,
debug: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -333,6 +334,7 @@ def merge(
{
"entity_1_id": entity_1_id,
"entity_2_id": entity_2_id,
"debug": debug,
},
entity_merge_params.EntityMergeParams,
),
Expand Down Expand Up @@ -814,6 +816,7 @@ async def merge(
*,
entity_1_id: str,
entity_2_id: str,
debug: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -839,6 +842,7 @@ async def merge(
{
"entity_1_id": entity_1_id,
"entity_2_id": entity_2_id,
"debug": debug,
},
entity_merge_params.EntityMergeParams,
),
Expand Down
6 changes: 3 additions & 3 deletions src/structify/types/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
from .training_dataset_get_next_unverified_params import (
TrainingDatasetGetNextUnverifiedParams as TrainingDatasetGetNextUnverifiedParams,
)
from .training_dataset_update_datum_status_params import (
TrainingDatasetUpdateDatumStatusParams as TrainingDatasetUpdateDatumStatusParams,
)
from .training_dataset_get_labeller_stats_response import (
TrainingDatasetGetLabellerStatsResponse as TrainingDatasetGetLabellerStatsResponse,
)
from .training_dataset_mark_suspicious_datum_params import (
TrainingDatasetMarkSuspiciousDatumParams as TrainingDatasetMarkSuspiciousDatumParams,
)

This file was deleted.

Loading
Loading