1818import concurrent .futures
1919import random
2020import datetime
21+ import json
2122import simvue
22- from simvue .api .objects import Alert , Metrics
23+ from simvue .api .objects import Alert , Metrics , Folder
2324from simvue .api .objects .grids import GridMetrics
2425from simvue .exception import ObjectNotFoundError , SimvueRunError
2526from simvue .sender import Sender
2627import simvue .run as sv_run
2728import simvue .client as sv_cl
28- import simvue .config .user as sv_cfg
2929
3030from simvue .api .objects import Run as RunObject
3131
@@ -1052,6 +1052,7 @@ def test_update_tags_offline(
10521052
10531053
10541054@pytest .mark .run
1055+ @pytest .mark .online
10551056@pytest .mark .parametrize ("object_type" , ("DataFrame" , "ndarray" ))
10561057def test_save_object (
10571058 create_plain_run : tuple [sv_run .Run , dict ], object_type : str
@@ -1074,6 +1075,7 @@ def test_save_object(
10741075
10751076
10761077@pytest .mark .run
1078+ @pytest .mark .online
10771079def test_add_alerts () -> None :
10781080 _uuid = f"{ uuid .uuid4 ()} " .split ("-" )[0 ]
10791081
@@ -1259,6 +1261,7 @@ def test_add_alerts_offline(monkeypatch) -> None:
12591261
12601262
12611263@pytest .mark .run
1264+ @pytest .mark .online
12621265def test_log_alert () -> None :
12631266 _uuid = f"{ uuid .uuid4 ()} " .split ("-" )[0 ]
12641267
@@ -1309,6 +1312,7 @@ def test_log_alert() -> None:
13091312
13101313
13111314@pytest .mark .run
1315+ @pytest .mark .online
13121316def test_abort_on_alert_process (mocker : pytest_mock .MockerFixture ) -> None :
13131317 def testing_exit (status : int ) -> None :
13141318 raise SystemExit (status )
@@ -1362,6 +1366,7 @@ def abort_callback(abort_run=trigger) -> None:
13621366
13631367
13641368@pytest .mark .run
1369+ @pytest .mark .online
13651370def test_abort_on_alert_python (
13661371 speedy_heartbeat , create_plain_run : tuple [sv_run .Run , dict ], mocker : pytest_mock .MockerFixture
13671372) -> None :
@@ -1382,6 +1387,7 @@ def test_abort_on_alert_python(
13821387
13831388
13841389@pytest .mark .run
1390+ @pytest .mark .online
13851391def test_abort_on_alert_raise (
13861392 create_plain_run : tuple [sv_run .Run , dict ]
13871393) -> None :
@@ -1406,6 +1412,7 @@ def test_abort_on_alert_raise(
14061412
14071413
14081414@pytest .mark .run
1415+ @pytest .mark .online
14091416def test_kill_all_processes (create_plain_run : tuple [sv_run .Run , dict ]) -> None :
14101417 run , _ = create_plain_run
14111418 run .config (system_metrics_interval = 1 )
@@ -1421,6 +1428,7 @@ def test_kill_all_processes(create_plain_run: tuple[sv_run.Run, dict]) -> None:
14211428
14221429
14231430@pytest .mark .run
1431+ @pytest .mark .online
14241432def test_run_created_with_no_timeout () -> None :
14251433 _uuid = f"{ uuid .uuid4 ()} " .split ("-" )[0 ]
14261434 with simvue .Run () as run :
@@ -1443,6 +1451,7 @@ def test_run_created_with_no_timeout() -> None:
14431451
14441452@pytest .mark .parametrize ("mode" , ("online" , "offline" ), ids = ("online" , "offline" ))
14451453@pytest .mark .run
1454+ @pytest .mark .online
14461455def test_reconnect_functionality (mode , monkeypatch : pytest .MonkeyPatch ) -> None :
14471456 temp_d : tempfile .TemporaryDirectory | None = None
14481457 _uuid = f"{ uuid .uuid4 ()} " .split ("-" )[0 ]
@@ -1486,6 +1495,7 @@ def test_reconnect_functionality(mode, monkeypatch: pytest.MonkeyPatch) -> None:
14861495
14871496
14881497@pytest .mark .run
1498+ @pytest .mark .online
14891499def test_env_var_metadata () -> None :
14901500 # Add some environment variables to glob
14911501 _recorded_env = {
@@ -1506,6 +1516,7 @@ def test_env_var_metadata() -> None:
15061516 assert all (key in _recorded_meta .get ("shell" ) for key in _recorded_env )
15071517
15081518@pytest .mark .run
1519+ @pytest .mark .online
15091520def test_reconnect_with_process () -> None :
15101521 _uuid = f"{ uuid .uuid4 ()} " .split ("-" )[0 ]
15111522 with simvue .Run () as run :
@@ -1537,6 +1548,8 @@ def test_reconnect_with_process() -> None:
15371548@pytest .mark .parametrize (
15381549 "environment" , ("python_conda" , "python_poetry" , "python_uv" , "julia" , "rust" , "nodejs" )
15391550)
1551+ @pytest .mark .run
1552+ @pytest .mark .online
15401553def test_run_environment_metadata (environment : str , mocker : pytest_mock .MockerFixture ) -> None :
15411554 """Tests that the environment information is compatible with the server."""
15421555 from simvue .config .user import SimvueConfiguration
@@ -1558,3 +1571,4 @@ def test_run_environment_metadata(environment: str, mocker: pytest_mock.MockerFi
15581571 )
15591572 run .update_metadata (env_func (_target_dir ))
15601573
1574+
0 commit comments