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.16.0"
".": "0.17.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: 66
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-5d84d2732400f196ddbe4b4e7c0e98b3f02bab9ce2ed750e69d399d898e496d1.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-bf4f1f241c2a3a425dc7d12b7b7e415133bb696682d1a285836d1a36b7bd6160.yml
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.17.0 (2025-01-31)

Full Changelog: [v0.16.0...v0.17.0](https://github.com/runloopai/api-client-python/compare/v0.16.0...v0.17.0)

### Features

* **api:** api update ([#512](https://github.com/runloopai/api-client-python/issues/512)) ([7664372](https://github.com/runloopai/api-client-python/commit/7664372659f1b7c63ee4e93ca4e2873402030733))

## 0.16.0 (2025-01-31)

Full Changelog: [v0.15.0...v0.16.0](https://github.com/runloopai/api-client-python/compare/v0.15.0...v0.16.0)
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 = "runloop_api_client"
version = "0.16.0"
version = "0.17.0"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/runloop_api_client/_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__ = "runloop_api_client"
__version__ = "0.16.0" # x-release-please-version
__version__ = "0.17.0" # x-release-please-version
30 changes: 28 additions & 2 deletions src/runloop_api_client/resources/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing import Optional

import httpx

from ..types import repository_list_params, repository_create_params
Expand Down Expand Up @@ -51,6 +53,7 @@ def create(
*,
name: str,
owner: str,
blueprint_id: 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,
Expand All @@ -68,6 +71,8 @@ def create(

owner: Account owner of the repository.

blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -84,6 +89,7 @@ def create(
{
"name": name,
"owner": owner,
"blueprint_id": blueprint_id,
},
repository_create_params.RepositoryCreateParams,
),
Expand All @@ -110,7 +116,7 @@ def retrieve(
) -> RepositoryConnectionView:
"""
Get Repository Connection details including latest inspection status and
generated respository insights.
generated repository insights.

Args:
extra_headers: Send extra headers
Expand All @@ -135,6 +141,8 @@ def list(
self,
*,
limit: int | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
owner: str | NotGiven = NOT_GIVEN,
starting_after: 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.
Expand All @@ -149,6 +157,10 @@ def list(
Args:
limit: The limit of items to return. Default is 20.

name: Filter by repository name

owner: Filter by repository owner

starting_after: Load the next page of data starting after the item with the given ID.

extra_headers: Send extra headers
Expand All @@ -170,6 +182,8 @@ def list(
query=maybe_transform(
{
"limit": limit,
"name": name,
"owner": owner,
"starting_after": starting_after,
},
repository_list_params.RepositoryListParams,
Expand Down Expand Up @@ -279,6 +293,7 @@ async def create(
*,
name: str,
owner: str,
blueprint_id: 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,
Expand All @@ -296,6 +311,8 @@ async def create(

owner: Account owner of the repository.

blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -312,6 +329,7 @@ async def create(
{
"name": name,
"owner": owner,
"blueprint_id": blueprint_id,
},
repository_create_params.RepositoryCreateParams,
),
Expand All @@ -338,7 +356,7 @@ async def retrieve(
) -> RepositoryConnectionView:
"""
Get Repository Connection details including latest inspection status and
generated respository insights.
generated repository insights.

Args:
extra_headers: Send extra headers
Expand All @@ -363,6 +381,8 @@ def list(
self,
*,
limit: int | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
owner: str | NotGiven = NOT_GIVEN,
starting_after: 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.
Expand All @@ -377,6 +397,10 @@ def list(
Args:
limit: The limit of items to return. Default is 20.

name: Filter by repository name

owner: Filter by repository owner

starting_after: Load the next page of data starting after the item with the given ID.

extra_headers: Send extra headers
Expand All @@ -398,6 +422,8 @@ def list(
query=maybe_transform(
{
"limit": limit,
"name": name,
"owner": owner,
"starting_after": starting_after,
},
repository_list_params.RepositoryListParams,
Expand Down
4 changes: 2 additions & 2 deletions src/runloop_api_client/resources/scenarios/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def list(
self,
*,
limit: int | NotGiven = NOT_GIVEN,
scenario_id: bool | NotGiven = NOT_GIVEN,
scenario_id: str | NotGiven = NOT_GIVEN,
starting_after: 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.
Expand Down Expand Up @@ -266,7 +266,7 @@ async def list(
self,
*,
limit: int | NotGiven = NOT_GIVEN,
scenario_id: bool | NotGiven = NOT_GIVEN,
scenario_id: str | NotGiven = NOT_GIVEN,
starting_after: 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.
Expand Down
6 changes: 6 additions & 0 deletions src/runloop_api_client/types/benchmark_run_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ class BenchmarkRunView(BaseModel):
benchmark_id: str
"""The ID of the Benchmark."""

start_time_ms: int
"""The time the benchmark run execution started (Unix timestamp milliseconds)."""

state: Literal["running", "completed"]
"""The state of the BenchmarkRun."""

duration_ms: Optional[int] = None
"""The duration for the BenchmarkRun to complete."""

name: Optional[str] = None
"""The name of the BenchmarkRun."""

Expand Down
4 changes: 4 additions & 0 deletions src/runloop_api_client/types/repository_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import Required, TypedDict

__all__ = ["RepositoryCreateParams"]
Expand All @@ -13,3 +14,6 @@ class RepositoryCreateParams(TypedDict, total=False):

owner: Required[str]
"""Account owner of the repository."""

blueprint_id: Optional[str]
"""ID of blueprint to use as base for resulting RepositoryVersion blueprint."""
6 changes: 6 additions & 0 deletions src/runloop_api_client/types/repository_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@ class RepositoryListParams(TypedDict, total=False):
limit: int
"""The limit of items to return. Default is 20."""

name: str
"""Filter by repository name"""

owner: str
"""Filter by repository owner"""

starting_after: str
"""Load the next page of data starting after the item with the given ID."""
3 changes: 3 additions & 0 deletions src/runloop_api_client/types/scenario_run_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ class ScenarioRunView(BaseModel):

scoring_contract_result: Optional[ScoringContractResultView] = None
"""The input context for the Scenario."""

start_time_ms: Optional[int] = None
"""The time that the scenario started"""
2 changes: 1 addition & 1 deletion src/runloop_api_client/types/scenarios/run_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class RunListParams(TypedDict, total=False):
limit: int
"""The limit of items to return. Default is 20."""

scenario_id: bool
scenario_id: str
"""Filter runs associated to Scenario given ID"""

starting_after: str
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/scenarios/test_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_method_list(self, client: Runloop) -> None:
def test_method_list_with_all_params(self, client: Runloop) -> None:
run = client.scenarios.runs.list(
limit=0,
scenario_id=True,
scenario_id="scenario_id",
starting_after="starting_after",
)
assert_matches_type(ScenarioRunListView, run, path=["response"])
Expand Down Expand Up @@ -216,7 +216,7 @@ async def test_method_list(self, async_client: AsyncRunloop) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> None:
run = await async_client.scenarios.runs.list(
limit=0,
scenario_id=True,
scenario_id="scenario_id",
starting_after="starting_after",
)
assert_matches_type(ScenarioRunListView, run, path=["response"])
Expand Down
22 changes: 22 additions & 0 deletions tests/api_resources/test_repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ def test_method_create(self, client: Runloop) -> None:
)
assert_matches_type(RepositoryConnectionView, repository, path=["response"])

@parametrize
def test_method_create_with_all_params(self, client: Runloop) -> None:
repository = client.repositories.create(
name="name",
owner="owner",
blueprint_id="blueprint_id",
)
assert_matches_type(RepositoryConnectionView, repository, path=["response"])

@parametrize
def test_raw_response_create(self, client: Runloop) -> None:
response = client.repositories.with_raw_response.create(
Expand Down Expand Up @@ -102,6 +111,8 @@ def test_method_list(self, client: Runloop) -> None:
def test_method_list_with_all_params(self, client: Runloop) -> None:
repository = client.repositories.list(
limit=0,
name="name",
owner="owner",
starting_after="starting_after",
)
assert_matches_type(SyncRepositoriesCursorIDPage[RepositoryConnectionView], repository, path=["response"])
Expand Down Expand Up @@ -214,6 +225,15 @@ async def test_method_create(self, async_client: AsyncRunloop) -> None:
)
assert_matches_type(RepositoryConnectionView, repository, path=["response"])

@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -> None:
repository = await async_client.repositories.create(
name="name",
owner="owner",
blueprint_id="blueprint_id",
)
assert_matches_type(RepositoryConnectionView, repository, path=["response"])

@parametrize
async def test_raw_response_create(self, async_client: AsyncRunloop) -> None:
response = await async_client.repositories.with_raw_response.create(
Expand Down Expand Up @@ -287,6 +307,8 @@ async def test_method_list(self, async_client: AsyncRunloop) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> None:
repository = await async_client.repositories.list(
limit=0,
name="name",
owner="owner",
starting_after="starting_after",
)
assert_matches_type(AsyncRepositoriesCursorIDPage[RepositoryConnectionView], repository, path=["response"])
Expand Down
Loading