Skip to content

Commit 9d876dd

Browse files
committed
airt updates
1 parent 1ef3266 commit 9d876dd

39 files changed

+2409
-1728
lines changed

docs/sdk/airt.mdx

Lines changed: 248 additions & 162 deletions
Large diffs are not rendered by default.

docs/sdk/api.mdx

Lines changed: 15 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,7 @@ ApiClient
1111
---------
1212

1313
```python
14-
ApiClient(
15-
base_url: str,
16-
*,
17-
api_key: str | None = None,
18-
cookies: dict[str, str] | None = None,
19-
debug: bool = False,
20-
)
14+
ApiClient(base_url: str, *, api_key: str | None = None, cookies: dict[str, str] | None = None, debug: bool = False)
2115
```
2216

2317
Client for the Dreadnode API.
@@ -102,14 +96,7 @@ def __init__(
10296
### export\_metrics
10397

10498
```python
105-
export_metrics(
106-
project: str,
107-
*,
108-
filter: str | None = None,
109-
status: StatusFilter = "completed",
110-
metrics: list[str] | None = None,
111-
aggregations: list[MetricAggregationType] | None = None,
112-
) -> pd.DataFrame
99+
export_metrics(project: str, *, filter: str | None = None, status: StatusFilter = 'completed', metrics: list[str] | None = None, aggregations: list[MetricAggregationType] | None = None) -> pd.DataFrame
113100
```
114101

115102
Exports metric data for a specific project.
@@ -191,15 +178,7 @@ def export_metrics(
191178
### export\_parameters
192179

193180
```python
194-
export_parameters(
195-
project: str,
196-
*,
197-
filter: str | None = None,
198-
status: StatusFilter = "completed",
199-
parameters: list[str] | None = None,
200-
metrics: list[str] | None = None,
201-
aggregations: list[MetricAggregationType] | None = None,
202-
) -> pd.DataFrame
181+
export_parameters(project: str, *, filter: str | None = None, status: StatusFilter = 'completed', parameters: list[str] | None = None, metrics: list[str] | None = None, aggregations: list[MetricAggregationType] | None = None) -> pd.DataFrame
203182
```
204183

205184
Exports parameter data for a specific project.
@@ -286,15 +265,7 @@ def export_parameters(
286265
### export\_runs
287266

288267
```python
289-
export_runs(
290-
project: str,
291-
*,
292-
filter: str | None = None,
293-
status: StatusFilter = "completed",
294-
aggregations: list[MetricAggregationType] | None = None,
295-
format: ExportFormat = "parquet",
296-
base_dir: str | None = None,
297-
) -> str
268+
export_runs(project: str, *, filter: str | None = None, status: StatusFilter = 'completed', aggregations: list[MetricAggregationType] | None = None, format: ExportFormat = 'parquet', base_dir: str | None = None) -> str
298269
```
299270

300271
Export runs using pagination - always writes to disk.
@@ -405,15 +376,7 @@ def export_runs(
405376
### export\_timeseries
406377

407378
```python
408-
export_timeseries(
409-
project: str,
410-
*,
411-
filter: str | None = None,
412-
status: StatusFilter = "completed",
413-
metrics: list[str] | None = None,
414-
time_axis: TimeAxisType = "relative",
415-
aggregations: list[TimeAggregationType] | None = None,
416-
) -> pd.DataFrame
379+
export_timeseries(project: str, *, filter: str | None = None, status: StatusFilter = 'completed', metrics: list[str] | None = None, time_axis: TimeAxisType = 'relative', aggregations: list[TimeAggregationType] | None = None) -> pd.DataFrame
417380
```
418381

419382
Exports timeseries data for a specific project.
@@ -481,7 +444,6 @@ def export_timeseries(
481444
Returns:
482445
A DataFrame containing the exported timeseries data.
483446
"""
484-
import pandas as pd
485447

486448
response = self.request(
487449
"GET",
@@ -524,9 +486,7 @@ def get_device_codes(self) -> DeviceCodeResponse:
524486
### get\_github\_access\_token
525487

526488
```python
527-
get_github_access_token(
528-
repos: list[str],
529-
) -> GithubTokenResponse
489+
get_github_access_token(repos: list[str]) -> GithubTokenResponse
530490
```
531491

532492
Try to get a GitHub access token for the given repositories.
@@ -619,21 +579,15 @@ def get_run(self, run: str | ULID) -> Run:
619579
### get\_run\_tasks
620580

621581
```python
622-
get_run_tasks(
623-
run: str | ULID, *, format: Literal["tree"]
624-
) -> list[TaskTree]
582+
get_run_tasks(run: str | ULID, *, format: Literal['tree']) -> list[TaskTree]
625583
```
626584

627585
```python
628-
get_run_tasks(
629-
run: str | ULID, *, format: Literal["flat"] = "flat"
630-
) -> list[Task]
586+
get_run_tasks(run: str | ULID, *, format: Literal['flat'] = 'flat') -> list[Task]
631587
```
632588

633589
```python
634-
get_run_tasks(
635-
run: str | ULID, *, format: TraceFormat = "flat"
636-
) -> list[Task] | list[TaskTree]
590+
get_run_tasks(run: str | ULID, *, format: TraceFormat = 'flat') -> list[Task] | list[TaskTree]
637591
```
638592

639593
Gets all tasks for a specific run.
@@ -683,21 +637,15 @@ def get_run_tasks(
683637
### get\_run\_trace
684638

685639
```python
686-
get_run_trace(
687-
run: str | ULID, *, format: Literal["tree"]
688-
) -> list[TraceTree]
640+
get_run_trace(run: str | ULID, *, format: Literal['tree']) -> list[TraceTree]
689641
```
690642

691643
```python
692-
get_run_trace(
693-
run: str | ULID, *, format: Literal["flat"] = "flat"
694-
) -> list[Task | TraceSpan]
644+
get_run_trace(run: str | ULID, *, format: Literal['flat'] = 'flat') -> list[Task | TraceSpan]
695645
```
696646

697647
```python
698-
get_run_trace(
699-
run: str | ULID, *, format: TraceFormat = "flat"
700-
) -> list[Task | TraceSpan] | list[TraceTree]
648+
get_run_trace(run: str | ULID, *, format: TraceFormat = 'flat') -> list[Task | TraceSpan] | list[TraceTree]
701649
```
702650

703651
Retrieves the run trace (spans+tasks) of a specific run.
@@ -867,11 +815,7 @@ def list_runs(self, project: str) -> list[RunSummary]:
867815
### poll\_for\_token
868816

869817
```python
870-
poll_for_token(
871-
device_code: str,
872-
interval: int = DEFAULT_POLL_INTERVAL,
873-
max_poll_time: int = DEFAULT_MAX_POLL_TIME,
874-
) -> AccessRefreshTokenResponse
818+
poll_for_token(device_code: str, interval: int = DEFAULT_POLL_INTERVAL, max_poll_time: int = DEFAULT_MAX_POLL_TIME) -> AccessRefreshTokenResponse
875819
```
876820

877821
Poll for the access token with the given device code.
@@ -908,12 +852,7 @@ def poll_for_token(
908852
### request
909853

910854
```python
911-
request(
912-
method: str,
913-
path: str,
914-
params: dict[str, Any] | None = None,
915-
json_data: dict[str, Any] | None = None,
916-
) -> httpx.Response
855+
request(method: str, path: str, params: dict[str, Any] | None = None, json_data: dict[str, Any] | None = None) -> httpx.Response
917856
```
918857

919858
Makes an HTTP request to the API and raises exceptions for errors.
@@ -1016,18 +955,7 @@ MetricAggregationType
1016955
---------------------
1017956

1018957
```python
1019-
MetricAggregationType = Literal[
1020-
"avg",
1021-
"median",
1022-
"min",
1023-
"max",
1024-
"sum",
1025-
"first",
1026-
"last",
1027-
"count",
1028-
"std",
1029-
"var",
1030-
]
958+
MetricAggregationType = Literal['avg', 'median', 'min', 'max', 'sum', 'first', 'last', 'count', 'std', 'var']
1031959
```
1032960

1033961
How to aggregate metrics in traces and runs

docs/sdk/artifact.mdx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,7 @@ def __init__(self, credential_manager: CredentialManager):
279279
### batch\_upload\_files
280280

281281
```python
282-
batch_upload_files(
283-
source_paths: list[str], target_paths: list[str]
284-
) -> list[str]
282+
batch_upload_files(source_paths: list[str], target_paths: list[str]) -> list[str]
285283
```
286284

287285
Upload multiple files in a single batch operation.
@@ -344,9 +342,7 @@ def batch_upload_files(self, source_paths: list[str], target_paths: list[str]) -
344342
### compute\_file\_hash
345343

346344
```python
347-
compute_file_hash(
348-
file_path: Path, stream_threshold_mb: int = 10
349-
) -> str
345+
compute_file_hash(file_path: Path, stream_threshold_mb: int = 10) -> str
350346
```
351347

352348
Compute SHA1 hash of a file, using streaming only for larger files.
@@ -404,9 +400,7 @@ def compute_file_hash(self, file_path: Path, stream_threshold_mb: int = 10) -> s
404400
### compute\_file\_hashes
405401

406402
```python
407-
compute_file_hashes(
408-
file_paths: list[Path],
409-
) -> dict[str, str]
403+
compute_file_hashes(file_paths: list[Path]) -> dict[str, str]
410404
```
411405

412406
Compute SHA1 hashes for multiple files.
@@ -503,9 +497,7 @@ ArtifactTreeBuilder
503497
-------------------
504498

505499
```python
506-
ArtifactTreeBuilder(
507-
storage: ArtifactStorage, prefix_path: str | None = None
508-
)
500+
ArtifactTreeBuilder(storage: ArtifactStorage, prefix_path: str | None = None)
509501
```
510502

511503
Builds a hierarchical tree structure for artifacts while uploading them to storage.

docs/sdk/data_types.mdx

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ Audio
1010
-----
1111

1212
```python
13-
Audio(
14-
data: AudioDataType,
15-
sample_rate: int | None = None,
16-
caption: str | None = None,
17-
format: str | None = None,
18-
)
13+
Audio(data: AudioDataType, sample_rate: int | None = None, caption: str | None = None, format: str | None = None)
1914
```
2015

2116
Audio media type for Dreadnode logging.
@@ -140,12 +135,7 @@ Image
140135
-----
141136

142137
```python
143-
Image(
144-
data: ImageDataOrPathType,
145-
mode: str | None = None,
146-
caption: str | None = None,
147-
format: str | None = None,
148-
)
138+
Image(data: ImageDataOrPathType, mode: str | None = None, caption: str | None = None, format: str | None = None)
149139
```
150140

151141
Image media type for Dreadnode logging.
@@ -274,11 +264,7 @@ Object3D
274264
--------
275265

276266
```python
277-
Object3D(
278-
data: Object3DDataType,
279-
caption: str | None = None,
280-
format: str | None = None,
281-
)
267+
Object3D(data: Object3DDataType, caption: str | None = None, format: str | None = None)
282268
```
283269

284270
3D object media type for Dreadnode logging.
@@ -370,13 +356,7 @@ Table
370356
-----
371357

372358
```python
373-
Table(
374-
data: TableDataType,
375-
caption: str | None = None,
376-
format: str | None = None,
377-
*,
378-
index: bool = False,
379-
)
359+
Table(data: TableDataType, caption: str | None = None, format: str | None = None, *, index: bool = False)
380360
```
381361

382362
Table data type for Dreadnode logging.
@@ -525,14 +505,7 @@ Video
525505
-----
526506

527507
```python
528-
Video(
529-
data: VideoDataType,
530-
fps: float | None = None,
531-
caption: str | None = None,
532-
format: str | None = None,
533-
width: int | None = None,
534-
height: int | None = None,
535-
)
508+
Video(data: VideoDataType, fps: float | None = None, caption: str | None = None, format: str | None = None, width: int | None = None, height: int | None = None)
536509
```
537510

538511
Video media type for Dreadnode logging.
@@ -643,7 +616,7 @@ def to_serializable(self) -> tuple[bytes, dict[str, t.Any]]:
643616
Returns:
644617
A tuple of (video_bytes, metadata_dict)
645618
"""
646-
import numpy as np # type: ignore[import,unused-ignore] # noqa: PLC0415
619+
import numpy as np # type: ignore[import,unused-ignore]
647620

648621
try:
649622
from moviepy.video.VideoClip import ( # type: ignore[import,unused-ignore,import-untyped]

0 commit comments

Comments
 (0)