Skip to content

Commit 10ee52a

Browse files
authored
Merge pull request #393 from simvue-io/hotfix/return-self-runs-by-default
Set default for get_runs to be user runs only
2 parents c19b5a6 + 3ef9eeb commit 10ee52a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

simvue/client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ def get_runs(
272272
output_format: typing.Literal["dict", "dataframe"] = "dict",
273273
count: int = 100,
274274
start_index: int = 0,
275+
show_shared: bool = False,
275276
) -> typing.Union[
276277
DataFrame, list[dict[str, typing.Union[int, str, float, None]]], None
277278
]:
@@ -298,6 +299,8 @@ def get_runs(
298299
maximum number of entries to return. Default is 100.
299300
start_index : int, optional
300301
the index from which to count entries. Default is 0.
302+
show_shared : bool, optional
303+
whether to include runs shared with the current user. Default is False.
301304
302305
Returns
303306
-------
@@ -312,6 +315,9 @@ def get_runs(
312315
RuntimeError
313316
if there was a failure in data retrieval from the server
314317
"""
318+
if not show_shared:
319+
filters = (filters or []) + ["user == self"]
320+
315321
params = {
316322
"filters": json.dumps(filters),
317323
"return_basic": True,

0 commit comments

Comments
 (0)