Skip to content

Commit f063305

Browse files
SDK regeneration
1 parent 217c41e commit f063305

File tree

11 files changed

+37
-129
lines changed

11 files changed

+37
-129
lines changed

reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4633,7 +4633,7 @@ List Job Runs for provided Job Id. Filter the data based on parameters passed in
46334633
<dd>
46344634

46354635
```python
4636-
from truefoundry_sdk import JobRunsSortBy, JobRunsSortDirection, TrueFoundry
4636+
from truefoundry_sdk import JobRunsSortBy, SortDirection, TrueFoundry
46374637

46384638
client = TrueFoundry(
46394639
api_key="YOUR_API_KEY",
@@ -4645,7 +4645,7 @@ response = client.jobs.list_runs(
46454645
offset=0,
46464646
search_prefix="searchPrefix",
46474647
sort_by=JobRunsSortBy.START_TIME,
4648-
order=JobRunsSortDirection.ASC,
4648+
order=SortDirection.ASC,
46494649
)
46504650
for item in response:
46514651
yield item
@@ -4707,7 +4707,7 @@ for page in response.iter_pages():
47074707
<dl>
47084708
<dd>
47094709

4710-
**order:** `typing.Optional[JobRunsSortDirection]` — Sorting order
4710+
**order:** `typing.Optional[SortDirection]` — Sorting order
47114711

47124712
</dd>
47134713
</dl>
@@ -6102,7 +6102,7 @@ for page in response.iter_pages():
61026102
<dl>
61036103
<dd>
61046104

6105-
**sort_direction:** `typing.Optional[QuerySpansRequestSortDirection]` — Sort direction for results. Defaults to desc.
6105+
**sort_direction:** `typing.Optional[SortDirection]` — Sort direction for results. Defaults to desc.
61066106

61076107
</dd>
61086108
</dl>

src/truefoundry_sdk/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@
369369
JobRun,
370370
JobRunStatus,
371371
JobRunsSortBy,
372-
JobRunsSortDirection,
373372
JobTrigger,
374373
JobTriggerInput,
375374
JobTriggerInputCommand,
@@ -636,6 +635,7 @@
636635
SlackWebhookAuth,
637636
SlackWebhookIntegration,
638637
SmtpCredentials,
638+
SortDirection,
639639
SpaCyFramework,
640640
SparkBuild,
641641
SparkConfig,
@@ -801,7 +801,6 @@
801801
from .clusters import ClustersDeleteResponse
802802
from .jobs import TriggerJobRequestInput
803803
from .teams import ApplyTeamRequestManifest, TeamsListRequestType
804-
from .traces import QuerySpansRequestSortDirection
805804
from .version import __version__
806805
from .workspaces import WorkspacesDeleteResponse
807806
_dynamic_imports: typing.Dict[str, str] = {
@@ -1178,7 +1177,6 @@
11781177
"JobRun": ".types",
11791178
"JobRunStatus": ".types",
11801179
"JobRunsSortBy": ".types",
1181-
"JobRunsSortDirection": ".types",
11821180
"JobTrigger": ".types",
11831181
"JobTriggerInput": ".types",
11841182
"JobTriggerInputCommand": ".types",
@@ -1395,7 +1393,6 @@
13951393
"QuayBasicAuth": ".types",
13961394
"QuayIntegrations": ".types",
13971395
"QuayProviderAccount": ".types",
1398-
"QuerySpansRequestSortDirection": ".traces",
13991396
"QuerySpansResponse": ".types",
14001397
"RStudio": ".types",
14011398
"RateLimitConfig": ".types",
@@ -1449,6 +1446,7 @@
14491446
"SlackWebhookAuth": ".types",
14501447
"SlackWebhookIntegration": ".types",
14511448
"SmtpCredentials": ".types",
1449+
"SortDirection": ".types",
14521450
"SpaCyFramework": ".types",
14531451
"SparkBuild": ".types",
14541452
"SparkConfig": ".types",
@@ -1995,7 +1993,6 @@ def __dir__():
19951993
"JobRun",
19961994
"JobRunStatus",
19971995
"JobRunsSortBy",
1998-
"JobRunsSortDirection",
19991996
"JobTrigger",
20001997
"JobTriggerInput",
20011998
"JobTriggerInputCommand",
@@ -2212,7 +2209,6 @@ def __dir__():
22122209
"QuayBasicAuth",
22132210
"QuayIntegrations",
22142211
"QuayProviderAccount",
2215-
"QuerySpansRequestSortDirection",
22162212
"QuerySpansResponse",
22172213
"RStudio",
22182214
"RateLimitConfig",
@@ -2266,6 +2262,7 @@ def __dir__():
22662262
"SlackWebhookAuth",
22672263
"SlackWebhookIntegration",
22682264
"SmtpCredentials",
2265+
"SortDirection",
22692266
"SpaCyFramework",
22702267
"SparkBuild",
22712268
"SparkConfig",

src/truefoundry_sdk/jobs/client.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
from ..types.job_run import JobRun
1111
from ..types.job_run_status import JobRunStatus
1212
from ..types.job_runs_sort_by import JobRunsSortBy
13-
from ..types.job_runs_sort_direction import JobRunsSortDirection
1413
from ..types.metadata import Metadata
14+
from ..types.sort_direction import SortDirection
1515
from ..types.terminate_job_response import TerminateJobResponse
1616
from ..types.trigger_job_run_response import TriggerJobRunResponse
1717
from .raw_client import AsyncRawJobsClient, RawJobsClient
@@ -44,7 +44,7 @@ def list_runs(
4444
offset: typing.Optional[int] = 0,
4545
search_prefix: typing.Optional[str] = None,
4646
sort_by: typing.Optional[JobRunsSortBy] = None,
47-
order: typing.Optional[JobRunsSortDirection] = None,
47+
order: typing.Optional[SortDirection] = None,
4848
triggered_by: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
4949
status: typing.Optional[typing.Union[JobRunStatus, typing.Sequence[JobRunStatus]]] = None,
5050
version_numbers: typing.Optional[typing.Union[float, typing.Sequence[float]]] = None,
@@ -70,7 +70,7 @@ def list_runs(
7070
sort_by : typing.Optional[JobRunsSortBy]
7171
Attribute to sort by
7272
73-
order : typing.Optional[JobRunsSortDirection]
73+
order : typing.Optional[SortDirection]
7474
Sorting order
7575
7676
triggered_by : typing.Optional[typing.Union[str, typing.Sequence[str]]]
@@ -92,7 +92,7 @@ def list_runs(
9292
9393
Examples
9494
--------
95-
from truefoundry_sdk import JobRunsSortBy, JobRunsSortDirection, TrueFoundry
95+
from truefoundry_sdk import JobRunsSortBy, SortDirection, TrueFoundry
9696
9797
client = TrueFoundry(
9898
api_key="YOUR_API_KEY",
@@ -104,7 +104,7 @@ def list_runs(
104104
offset=0,
105105
search_prefix="searchPrefix",
106106
sort_by=JobRunsSortBy.START_TIME,
107-
order=JobRunsSortDirection.ASC,
107+
order=SortDirection.ASC,
108108
)
109109
for item in response:
110110
yield item
@@ -318,7 +318,7 @@ async def list_runs(
318318
offset: typing.Optional[int] = 0,
319319
search_prefix: typing.Optional[str] = None,
320320
sort_by: typing.Optional[JobRunsSortBy] = None,
321-
order: typing.Optional[JobRunsSortDirection] = None,
321+
order: typing.Optional[SortDirection] = None,
322322
triggered_by: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
323323
status: typing.Optional[typing.Union[JobRunStatus, typing.Sequence[JobRunStatus]]] = None,
324324
version_numbers: typing.Optional[typing.Union[float, typing.Sequence[float]]] = None,
@@ -344,7 +344,7 @@ async def list_runs(
344344
sort_by : typing.Optional[JobRunsSortBy]
345345
Attribute to sort by
346346
347-
order : typing.Optional[JobRunsSortDirection]
347+
order : typing.Optional[SortDirection]
348348
Sorting order
349349
350350
triggered_by : typing.Optional[typing.Union[str, typing.Sequence[str]]]
@@ -368,11 +368,7 @@ async def list_runs(
368368
--------
369369
import asyncio
370370
371-
from truefoundry_sdk import (
372-
AsyncTrueFoundry,
373-
JobRunsSortBy,
374-
JobRunsSortDirection,
375-
)
371+
from truefoundry_sdk import AsyncTrueFoundry, JobRunsSortBy, SortDirection
376372
377373
client = AsyncTrueFoundry(
378374
api_key="YOUR_API_KEY",
@@ -387,7 +383,7 @@ async def main() -> None:
387383
offset=0,
388384
search_prefix="searchPrefix",
389385
sort_by=JobRunsSortBy.START_TIME,
390-
order=JobRunsSortDirection.ASC,
386+
order=SortDirection.ASC,
391387
)
392388
async for item in response:
393389
yield item

src/truefoundry_sdk/jobs/raw_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
from ..types.job_run import JobRun
2424
from ..types.job_run_status import JobRunStatus
2525
from ..types.job_runs_sort_by import JobRunsSortBy
26-
from ..types.job_runs_sort_direction import JobRunsSortDirection
2726
from ..types.list_job_run_response import ListJobRunResponse
2827
from ..types.metadata import Metadata
28+
from ..types.sort_direction import SortDirection
2929
from ..types.terminate_job_response import TerminateJobResponse
3030
from ..types.trigger_job_run_response import TriggerJobRunResponse
3131
from .types.trigger_job_request_input import TriggerJobRequestInput
@@ -46,7 +46,7 @@ def list_runs(
4646
offset: typing.Optional[int] = 0,
4747
search_prefix: typing.Optional[str] = None,
4848
sort_by: typing.Optional[JobRunsSortBy] = None,
49-
order: typing.Optional[JobRunsSortDirection] = None,
49+
order: typing.Optional[SortDirection] = None,
5050
triggered_by: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
5151
status: typing.Optional[typing.Union[JobRunStatus, typing.Sequence[JobRunStatus]]] = None,
5252
version_numbers: typing.Optional[typing.Union[float, typing.Sequence[float]]] = None,
@@ -72,7 +72,7 @@ def list_runs(
7272
sort_by : typing.Optional[JobRunsSortBy]
7373
Attribute to sort by
7474
75-
order : typing.Optional[JobRunsSortDirection]
75+
order : typing.Optional[SortDirection]
7676
Sorting order
7777
7878
triggered_by : typing.Optional[typing.Union[str, typing.Sequence[str]]]
@@ -527,7 +527,7 @@ async def list_runs(
527527
offset: typing.Optional[int] = 0,
528528
search_prefix: typing.Optional[str] = None,
529529
sort_by: typing.Optional[JobRunsSortBy] = None,
530-
order: typing.Optional[JobRunsSortDirection] = None,
530+
order: typing.Optional[SortDirection] = None,
531531
triggered_by: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
532532
status: typing.Optional[typing.Union[JobRunStatus, typing.Sequence[JobRunStatus]]] = None,
533533
version_numbers: typing.Optional[typing.Union[float, typing.Sequence[float]]] = None,
@@ -553,7 +553,7 @@ async def list_runs(
553553
sort_by : typing.Optional[JobRunsSortBy]
554554
Attribute to sort by
555555
556-
order : typing.Optional[JobRunsSortDirection]
556+
order : typing.Optional[SortDirection]
557557
Sorting order
558558
559559
triggered_by : typing.Optional[typing.Union[str, typing.Sequence[str]]]

src/truefoundry_sdk/traces/__init__.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,3 @@
22

33
# isort: skip_file
44

5-
import typing
6-
from importlib import import_module
7-
8-
if typing.TYPE_CHECKING:
9-
from .types import QuerySpansRequestSortDirection
10-
_dynamic_imports: typing.Dict[str, str] = {"QuerySpansRequestSortDirection": ".types"}
11-
12-
13-
def __getattr__(attr_name: str) -> typing.Any:
14-
module_name = _dynamic_imports.get(attr_name)
15-
if module_name is None:
16-
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
17-
try:
18-
module = import_module(module_name, __package__)
19-
if module_name == f".{attr_name}":
20-
return module
21-
else:
22-
return getattr(module, attr_name)
23-
except ImportError as e:
24-
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
25-
except AttributeError as e:
26-
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
27-
28-
29-
def __dir__():
30-
lazy_attrs = list(_dynamic_imports.keys())
31-
return sorted(lazy_attrs)
32-
33-
34-
__all__ = ["QuerySpansRequestSortDirection"]

src/truefoundry_sdk/traces/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
66
from ..core.pagination import AsyncPager, SyncPager
77
from ..core.request_options import RequestOptions
8+
from ..types.sort_direction import SortDirection
89
from ..types.trace_span import TraceSpan
910
from ..types.traces_subject_type import TracesSubjectType
1011
from .raw_client import AsyncRawTracesClient, RawTracesClient
11-
from .types.query_spans_request_sort_direction import QuerySpansRequestSortDirection
1212

1313
# this is used as the default value for optional parameters
1414
OMIT = typing.cast(typing.Any, ...)
@@ -42,7 +42,7 @@ def query_spans(
4242
created_by_subject_slugs: typing.Optional[typing.Sequence[str]] = OMIT,
4343
application_names: typing.Optional[typing.Sequence[str]] = OMIT,
4444
limit: typing.Optional[int] = OMIT,
45-
sort_direction: typing.Optional[QuerySpansRequestSortDirection] = OMIT,
45+
sort_direction: typing.Optional[SortDirection] = OMIT,
4646
page_token: typing.Optional[str] = OMIT,
4747
request_options: typing.Optional[RequestOptions] = None,
4848
) -> SyncPager[TraceSpan]:
@@ -79,7 +79,7 @@ def query_spans(
7979
limit : typing.Optional[int]
8080
The maximum number of spans to return per page. Defaults to 200 if not provided.
8181
82-
sort_direction : typing.Optional[QuerySpansRequestSortDirection]
82+
sort_direction : typing.Optional[SortDirection]
8383
Sort direction for results. Defaults to desc.
8484
8585
page_token : typing.Optional[str]
@@ -156,7 +156,7 @@ async def query_spans(
156156
created_by_subject_slugs: typing.Optional[typing.Sequence[str]] = OMIT,
157157
application_names: typing.Optional[typing.Sequence[str]] = OMIT,
158158
limit: typing.Optional[int] = OMIT,
159-
sort_direction: typing.Optional[QuerySpansRequestSortDirection] = OMIT,
159+
sort_direction: typing.Optional[SortDirection] = OMIT,
160160
page_token: typing.Optional[str] = OMIT,
161161
request_options: typing.Optional[RequestOptions] = None,
162162
) -> AsyncPager[TraceSpan]:
@@ -193,7 +193,7 @@ async def query_spans(
193193
limit : typing.Optional[int]
194194
The maximum number of spans to return per page. Defaults to 200 if not provided.
195195
196-
sort_direction : typing.Optional[QuerySpansRequestSortDirection]
196+
sort_direction : typing.Optional[SortDirection]
197197
Sort direction for results. Defaults to desc.
198198
199199
page_token : typing.Optional[str]

src/truefoundry_sdk/traces/raw_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
from ..core.pydantic_utilities import parse_obj_as
1010
from ..core.request_options import RequestOptions
1111
from ..types.query_spans_response import QuerySpansResponse
12+
from ..types.sort_direction import SortDirection
1213
from ..types.trace_span import TraceSpan
1314
from ..types.traces_subject_type import TracesSubjectType
14-
from .types.query_spans_request_sort_direction import QuerySpansRequestSortDirection
1515

1616
# this is used as the default value for optional parameters
1717
OMIT = typing.cast(typing.Any, ...)
@@ -34,7 +34,7 @@ def query_spans(
3434
created_by_subject_slugs: typing.Optional[typing.Sequence[str]] = OMIT,
3535
application_names: typing.Optional[typing.Sequence[str]] = OMIT,
3636
limit: typing.Optional[int] = OMIT,
37-
sort_direction: typing.Optional[QuerySpansRequestSortDirection] = OMIT,
37+
sort_direction: typing.Optional[SortDirection] = OMIT,
3838
page_token: typing.Optional[str] = OMIT,
3939
request_options: typing.Optional[RequestOptions] = None,
4040
) -> SyncPager[TraceSpan]:
@@ -71,7 +71,7 @@ def query_spans(
7171
limit : typing.Optional[int]
7272
The maximum number of spans to return per page. Defaults to 200 if not provided.
7373
74-
sort_direction : typing.Optional[QuerySpansRequestSortDirection]
74+
sort_direction : typing.Optional[SortDirection]
7575
Sort direction for results. Defaults to desc.
7676
7777
page_token : typing.Optional[str]
@@ -164,7 +164,7 @@ async def query_spans(
164164
created_by_subject_slugs: typing.Optional[typing.Sequence[str]] = OMIT,
165165
application_names: typing.Optional[typing.Sequence[str]] = OMIT,
166166
limit: typing.Optional[int] = OMIT,
167-
sort_direction: typing.Optional[QuerySpansRequestSortDirection] = OMIT,
167+
sort_direction: typing.Optional[SortDirection] = OMIT,
168168
page_token: typing.Optional[str] = OMIT,
169169
request_options: typing.Optional[RequestOptions] = None,
170170
) -> AsyncPager[TraceSpan]:
@@ -201,7 +201,7 @@ async def query_spans(
201201
limit : typing.Optional[int]
202202
The maximum number of spans to return per page. Defaults to 200 if not provided.
203203
204-
sort_direction : typing.Optional[QuerySpansRequestSortDirection]
204+
sort_direction : typing.Optional[SortDirection]
205205
Sort direction for results. Defaults to desc.
206206
207207
page_token : typing.Optional[str]

0 commit comments

Comments
 (0)