Skip to content

Commit 6417db2

Browse files
committed
Merge branch 'dev' of github.com:simvue-io/python-api into dev
2 parents c2401b7 + 9fc0481 commit 6417db2

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
args: [--branch, main, --branch, dev]
2424
- id: check-added-large-files
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: v0.13.0
26+
rev: v0.13.1
2727
hooks:
2828
- id: ruff
2929
args: [ --fix, --exit-non-zero-on-fix, "--ignore=C901" ]

simvue/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
FOLDER_REGEX: str = r"^/.*"
88
NAME_REGEX: str = r"^[a-zA-Z0-9\-\_\s\/\.:]+$"
9-
METRIC_KEY_REGEX: str = r"^[a-zA-Z0-9\-\_\s\/\.:=><]+$"
9+
METRIC_KEY_REGEX: str = r"^[a-zA-Z0-9\-\_\s\/\.:=><+\(\)]+$"
1010
DATETIME_FORMAT: str = "%Y-%m-%dT%H:%M:%S.%f"
1111

1212
MetadataKeyString = typing.Annotated[

tests/functional/test_run_class.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_log_metrics_online(
167167
visibility: typing.Literal["public", "tenant"] | list[str] | None,
168168
metric_type: typing.Literal["regular", "tensor"],
169169
) -> None:
170-
METRICS = {"a": 10, "b": 1.2}
170+
METRICS = {"a": 10, "aB0-_/.:=><+()": 1.2}
171171

172172
# Have to create the run outside of fixtures because the resources dispatch
173173
# occurs immediately and is not captured by the handler when using the fixture
@@ -313,7 +313,7 @@ def test_log_metrics_offline(
313313
axes_labels=["x", "y"]
314314
)
315315
else:
316-
METRICS = {"a": 10, "b": 1.2, "c": 2}
316+
METRICS = {"a": 10, "aB0-_/.:=><+()": 1.2, "c": 2}
317317

318318
run.log_metrics(METRICS)
319319

tests/unit/test_metrics.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_metrics_creation_online() -> None:
1919
_values = {
2020
"x": 1,
2121
"y": 2.0,
22-
"z": True
22+
"aB0-_/.:=><+()": True
2323
}
2424
_time: int = 1
2525
_step: int = 1
@@ -40,7 +40,7 @@ def test_metrics_creation_online() -> None:
4040
)
4141
assert _metrics.to_dict()
4242
_metrics.commit()
43-
_data = next(_metrics.get(metrics=["x", "y", "z"], runs=[_run.id], xaxis="step"))
43+
_data = next(_metrics.get(metrics=["x", "y", "aB0-_/.:=><+()"], runs=[_run.id], xaxis="step"))
4444
assert sorted(_metrics.names(run_ids=[_run.id])) == sorted(_values.keys())
4545
assert _data.get(_run.id).get('y')[0].get('value') == 2.0
4646
assert _data.get(_run.id).get('y')[0].get('step') == 1
@@ -61,7 +61,7 @@ def test_metrics_creation_offline(offline_cache_setup) -> None:
6161
_values = {
6262
"x": 1,
6363
"y": 2.0,
64-
"z": True
64+
"aB0-_/.:=><+()": True
6565
}
6666
_time: int = 1
6767
_step: int = 1
@@ -93,7 +93,7 @@ def test_metrics_creation_offline(offline_cache_setup) -> None:
9393

9494
# Get online version of metrics
9595
_online_metrics = Metrics(_id_mapping.get(_metrics.id))
96-
_data = next(_online_metrics.get(metrics=["x", "y", "z"], runs=[_id_mapping.get(_run.id)], xaxis="step"))
96+
_data = next(_online_metrics.get(metrics=["x", "y", "aB0-_/.:=><+()"], runs=[_id_mapping.get(_run.id)], xaxis="step"))
9797
assert sorted(_online_metrics.names(run_ids=[_id_mapping.get(_run.id)])) == sorted(_values.keys())
9898
assert _data.get(_id_mapping.get(_run.id)).get('y')[0].get('value') == 2.0
9999
assert _data.get(_id_mapping.get(_run.id)).get('y')[0].get('step') == 1

0 commit comments

Comments
 (0)