Skip to content
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 @@
{
".": "0.1.0-alpha.33"
".": "0.1.0-alpha.34"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 65
openapi_spec_hash: d273ca5158facc1251efa0a5f9e723c5
config_hash: cd9208a2204f43e0aa5ab35ac85ef90d
configured_endpoints: 70
openapi_spec_hash: 9018ebfb2a9e1afa87058b3a4bd41b0b
config_hash: aad16f20fed13ac50211fc1d0e2ea621
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.1.0-alpha.34 (2025-11-19)

Full Changelog: [v0.1.0-alpha.33...v0.1.0-alpha.34](https://github.com/cleanlab/codex-python/compare/v0.1.0-alpha.33...v0.1.0-alpha.34)

### Features

* **api:** add expert review endpoints ([cda6f91](https://github.com/cleanlab/codex-python/commit/cda6f911fe678318779d23de9ecc77fb15594fa1))
* **api:** api update ([5848aac](https://github.com/cleanlab/codex-python/commit/5848aac2eb02a789c20951056a7b802985d8b2ab))

## 0.1.0-alpha.33 (2025-11-18)

Full Changelog: [v0.1.0-alpha.32...v0.1.0-alpha.33](https://github.com/cleanlab/codex-python/compare/v0.1.0-alpha.32...v0.1.0-alpha.33)
Expand Down
21 changes: 21 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,24 @@ Methods:
- <code title="patch /api/projects/{project_id}/expert_answers/{expert_answer_id}/pause">client.projects.remediations.expert_answers.<a href="./src/codex/resources/projects/remediations/expert_answers.py">pause</a>(expert_answer_id, \*, project_id) -> <a href="./src/codex/types/projects/remediations/expert_answer_pause_response.py">ExpertAnswerPauseResponse</a></code>
- <code title="patch /api/projects/{project_id}/expert_answers/{expert_answer_id}/publish">client.projects.remediations.expert_answers.<a href="./src/codex/resources/projects/remediations/expert_answers.py">publish</a>(expert_answer_id, \*, project_id) -> <a href="./src/codex/types/projects/remediations/expert_answer_publish_response.py">ExpertAnswerPublishResponse</a></code>
- <code title="patch /api/projects/{project_id}/expert_answers/{expert_answer_id}/unpause">client.projects.remediations.expert_answers.<a href="./src/codex/resources/projects/remediations/expert_answers.py">unpause</a>(expert_answer_id, \*, project_id) -> <a href="./src/codex/types/projects/remediations/expert_answer_unpause_response.py">ExpertAnswerUnpauseResponse</a></code>

### ExpertReviews

Types:

```python
from codex.types.projects.remediations import (
ExpertReviewCreateResponse,
ExpertReviewRetrieveResponse,
ExpertReviewListResponse,
ExpertReviewEditResponse,
)
```

Methods:

- <code title="post /api/projects/{project_id}/expert_reviews/">client.projects.remediations.expert_reviews.<a href="./src/codex/resources/projects/remediations/expert_reviews.py">create</a>(project_id, \*\*<a href="src/codex/types/projects/remediations/expert_review_create_params.py">params</a>) -> <a href="./src/codex/types/projects/remediations/expert_review_create_response.py">ExpertReviewCreateResponse</a></code>
- <code title="get /api/projects/{project_id}/expert_reviews/{expert_review_id}">client.projects.remediations.expert_reviews.<a href="./src/codex/resources/projects/remediations/expert_reviews.py">retrieve</a>(expert_review_id, \*, project_id) -> <a href="./src/codex/types/projects/remediations/expert_review_retrieve_response.py">ExpertReviewRetrieveResponse</a></code>
- <code title="get /api/projects/{project_id}/expert_reviews/">client.projects.remediations.expert_reviews.<a href="./src/codex/resources/projects/remediations/expert_reviews.py">list</a>(project_id, \*\*<a href="src/codex/types/projects/remediations/expert_review_list_params.py">params</a>) -> <a href="./src/codex/types/projects/remediations/expert_review_list_response.py">SyncOffsetPageExpertReviews[ExpertReviewListResponse]</a></code>
- <code title="delete /api/projects/{project_id}/expert_reviews/{expert_review_id}">client.projects.remediations.expert_reviews.<a href="./src/codex/resources/projects/remediations/expert_reviews.py">delete</a>(expert_review_id, \*, project_id, \*\*<a href="src/codex/types/projects/remediations/expert_review_delete_params.py">params</a>) -> None</code>
- <code title="patch /api/projects/{project_id}/expert_reviews/{expert_review_id}">client.projects.remediations.expert_reviews.<a href="./src/codex/resources/projects/remediations/expert_reviews.py">edit</a>(expert_review_id, \*, project_id, \*\*<a href="src/codex/types/projects/remediations/expert_review_edit_params.py">params</a>) -> <a href="./src/codex/types/projects/remediations/expert_review_edit_response.py">ExpertReviewEditResponse</a></code>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "codex-sdk"
version = "0.1.0-alpha.33"
version = "0.1.0-alpha.34"
description = "Internal SDK used within cleanlab-codex package. Refer to https://pypi.org/project/cleanlab-codex/ instead."
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/codex/_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__ = "codex"
__version__ = "0.1.0-alpha.33" # x-release-please-version
__version__ = "0.1.0-alpha.34" # x-release-please-version
62 changes: 62 additions & 0 deletions src/codex/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"AsyncOffsetPageQueryLogsByGroup",
"SyncOffsetPageExpertAnswers",
"AsyncOffsetPageExpertAnswers",
"SyncOffsetPageExpertReviews",
"AsyncOffsetPageExpertReviews",
]

_BaseModelT = TypeVar("_BaseModelT", bound=BaseModel)
Expand Down Expand Up @@ -451,3 +453,63 @@ def next_page_info(self) -> Optional[PageInfo]:
return PageInfo(params={"offset": current_count})

return None


class SyncOffsetPageExpertReviews(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
expert_reviews: List[_T]
total_count: Optional[int] = None

@override
def _get_page_items(self) -> List[_T]:
expert_reviews = self.expert_reviews
if not expert_reviews:
return []
return expert_reviews

@override
def next_page_info(self) -> Optional[PageInfo]:
offset = self._options.params.get("offset") or 0
if not isinstance(offset, int):
raise ValueError(f'Expected "offset" param to be an integer but got {offset}')

length = len(self._get_page_items())
current_count = offset + length

total_count = self.total_count
if total_count is None:
return None

if current_count < total_count:
return PageInfo(params={"offset": current_count})

return None


class AsyncOffsetPageExpertReviews(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
expert_reviews: List[_T]
total_count: Optional[int] = None

@override
def _get_page_items(self) -> List[_T]:
expert_reviews = self.expert_reviews
if not expert_reviews:
return []
return expert_reviews

@override
def next_page_info(self) -> Optional[PageInfo]:
offset = self._options.params.get("offset") or 0
if not isinstance(offset, int):
raise ValueError(f'Expected "offset" param to be an integer but got {offset}')

length = len(self._get_page_items())
current_count = offset + length

total_count = self.total_count
if total_count is None:
return None

if current_count < total_count:
return PageInfo(params={"offset": current_count})

return None
14 changes: 14 additions & 0 deletions src/codex/resources/projects/remediations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
ExpertAnswersResourceWithStreamingResponse,
AsyncExpertAnswersResourceWithStreamingResponse,
)
from .expert_reviews import (
ExpertReviewsResource,
AsyncExpertReviewsResource,
ExpertReviewsResourceWithRawResponse,
AsyncExpertReviewsResourceWithRawResponse,
ExpertReviewsResourceWithStreamingResponse,
AsyncExpertReviewsResourceWithStreamingResponse,
)

__all__ = [
"ExpertAnswersResource",
Expand All @@ -24,6 +32,12 @@
"AsyncExpertAnswersResourceWithRawResponse",
"ExpertAnswersResourceWithStreamingResponse",
"AsyncExpertAnswersResourceWithStreamingResponse",
"ExpertReviewsResource",
"AsyncExpertReviewsResource",
"ExpertReviewsResourceWithRawResponse",
"AsyncExpertReviewsResourceWithRawResponse",
"ExpertReviewsResourceWithStreamingResponse",
"AsyncExpertReviewsResourceWithStreamingResponse",
"RemediationsResource",
"AsyncRemediationsResource",
"RemediationsResourceWithRawResponse",
Expand Down
Loading