simulo 0.7.1__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {simulo-0.7.1/src/simulo.egg-info → simulo-0.8.0}/PKG-INFO +2 -1
  2. {simulo-0.7.1 → simulo-0.8.0}/pyproject.toml +7 -5
  3. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/cli.py +34 -1
  4. {simulo-0.7.1 → simulo-0.8.0/src/simulo.egg-info}/PKG-INFO +2 -1
  5. {simulo-0.7.1 → simulo-0.8.0}/src/simulo.egg-info/requires.txt +1 -0
  6. {simulo-0.7.1 → simulo-0.8.0}/MANIFEST.in +0 -0
  7. {simulo-0.7.1 → simulo-0.8.0}/PYPI.md +0 -0
  8. {simulo-0.7.1 → simulo-0.8.0}/setup.cfg +0 -0
  9. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/__init__.py +0 -0
  10. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/__init__.py +0 -0
  11. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/_entrypoint.py +0 -0
  12. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/_mounts.py +0 -0
  13. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/_runner.py +0 -0
  14. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/app.py +0 -0
  15. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/asset.py +0 -0
  16. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/bundle.py +0 -0
  17. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/config.py +0 -0
  18. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/credentials.py +0 -0
  19. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/discovery.py +0 -0
  20. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/http.py +0 -0
  21. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/jobs_api.py +0 -0
  22. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/learning.py +0 -0
  23. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/login.py +0 -0
  24. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/manifest.py +0 -0
  25. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/mode.py +0 -0
  26. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/packaging.py +0 -0
  27. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/registry.py +0 -0
  28. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/runtime.py +0 -0
  29. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/stub.py +0 -0
  30. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/submit_api.py +0 -0
  31. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/_client/volume.py +0 -0
  32. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/callbacks.py +0 -0
  33. {simulo-0.7.1 → simulo-0.8.0}/src/simulo/py.typed +0 -0
  34. {simulo-0.7.1 → simulo-0.8.0}/src/simulo.egg-info/SOURCES.txt +0 -0
  35. {simulo-0.7.1 → simulo-0.8.0}/src/simulo.egg-info/dependency_links.txt +0 -0
  36. {simulo-0.7.1 → simulo-0.8.0}/src/simulo.egg-info/entry_points.txt +0 -0
  37. {simulo-0.7.1 → simulo-0.8.0}/src/simulo.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simulo
3
- Version: 0.7.1
3
+ Version: 0.8.0
4
4
  Summary: Simulo SDK and CLI — define robotics simulation and training apps in Python and run them on the Simulo cloud.
5
5
  Author-email: Simulo Team <team@simulo.ai>
6
6
  License: BSD-3-Clause
@@ -16,6 +16,7 @@ Classifier: Typing :: Typed
16
16
  Requires-Python: >=3.11
17
17
  Description-Content-Type: text/markdown
18
18
  Requires-Dist: simulo-interfaces<0.2,>=0.1
19
+ Requires-Dist: mcap<2,>=1.3
19
20
  Provides-Extra: dev
20
21
  Requires-Dist: black>=24.0; extra == "dev"
21
22
  Requires-Dist: isort>=5.13; extra == "dev"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simulo"
7
- version = "0.7.1"
7
+ version = "0.8.0"
8
8
  description = "Simulo SDK and CLI — define robotics simulation and training apps in Python and run them on the Simulo cloud."
9
9
  readme = "PYPI.md"
10
10
  requires-python = ">=3.11"
@@ -20,10 +20,12 @@ classifiers = [
20
20
  "Programming Language :: Python :: 3.12",
21
21
  "Typing :: Typed",
22
22
  ]
23
- # Torch-free by construction: depends only on the contract layer. Heavy
24
- # imports (e.g. torch) belong inside the user's `runtime.imports()` guard,
25
- # resolved only at job-execution time — never in this distribution.
26
- dependencies = ["simulo-interfaces>=0.1,<0.2"]
23
+ # Torch-free by construction: depends only on the contract layer and mcap.
24
+ # Heavy imports (e.g. torch) belong inside the user's `runtime.imports()`
25
+ # guard, resolved only at job-execution time — never in this distribution.
26
+ # mcap: used by `simulo recordings` to read back a downloaded recording and
27
+ # verify it (message count) — MIT-licensed, deps only lz4+zstandard.
28
+ dependencies = ["simulo-interfaces>=0.1,<0.2", "mcap>=1.3,<2"]
27
29
 
28
30
  [project.optional-dependencies]
29
31
  dev = ["black>=24.0", "isort>=5.13", "ruff>=0.5", "mypy>=1.10", "pytest>=8.2", "build>=1.2", "twine>=5.1"]
@@ -450,8 +450,36 @@ def _recording_name(record: dict[str, Any]) -> str:
450
450
  return str(name) if name else f"{record.get('recording_id', 'recording')}.mcap"
451
451
 
452
452
 
453
+ def _verify_recording(dest: Path) -> None:
454
+ """Read *dest* back with the ``mcap`` reader and print a one-line summary.
455
+
456
+ This is the genuine use of the bundled ``mcap`` dependency (pyproject
457
+ dependencies): it replaces the manual ``python -c "from mcap.reader
458
+ import ..."`` check a user previously had to run by hand after `simulo
459
+ recordings` finished. The import is LAZY (inside this function, not at
460
+ module scope) so a plain `import simulo` — and every other CLI command
461
+ that never touches recordings — stays fast/torch-free; `mcap` is light,
462
+ but lazy is still the right default for a CLI-only code path.
463
+
464
+ Non-fatal by design: a corrupt or truncated download must not turn an
465
+ otherwise-successful fetch (the bytes are already on disk) into a crash.
466
+ Any failure — a genuinely corrupt file, or an mcap-library edge case —
467
+ prints a WARNING to stderr and returns; the file is kept and the caller's
468
+ exit code is unaffected.
469
+ """
470
+ try:
471
+ from mcap.reader import make_reader
472
+
473
+ with open(dest, "rb") as f:
474
+ reader = make_reader(f)
475
+ message_count = sum(1 for _ in reader.iter_messages())
476
+ print(f"verified {dest.name} — {message_count} messages", file=sys.stderr)
477
+ except Exception as exc: # noqa: BLE001 — best-effort verification only; must never crash a successful download
478
+ print(f"WARNING: could not verify {dest.name} as a valid MCAP file: {exc}", file=sys.stderr)
479
+
480
+
453
481
  def _download_and_report(client: SubmitApiClient, job_id: str, record: dict[str, Any], dest: Path) -> bool:
454
- """Download one recording to *dest*; print the Lichtblick hint on success.
482
+ """Download one recording to *dest*; verify + print the Lichtblick hint on success.
455
483
 
456
484
  ``dest`` must already be a caller-vetted destination — either the
457
485
  user's own ``-o PATH`` or ``out_dir / _safe_download_filename(...)``
@@ -467,12 +495,17 @@ def _download_and_report(client: SubmitApiClient, job_id: str, record: dict[str,
467
495
  — raises bare ``ValueError`` from the filesystem call, and it deserves
468
496
  the same clean one-liner (server-supplied names can no longer get here;
469
497
  ``_safe_download_filename`` rejects NULs outright).
498
+
499
+ A successful download is read back and verified (``_verify_recording``,
500
+ non-fatal) before the Lichtblick hint prints — a corrupt download is
501
+ still reported as a WARNING, never a crash.
470
502
  """
471
503
  try:
472
504
  resolved = client.download_recording(job_id, str(record["recording_id"]), dest)
473
505
  except (OSError, ValueError) as exc:
474
506
  print(f"Could not write recording to {dest}: {exc}", file=sys.stderr)
475
507
  return False
508
+ _verify_recording(resolved)
476
509
  print(f"Open in Lichtblick: {resolved.resolve()}")
477
510
  return True
478
511
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simulo
3
- Version: 0.7.1
3
+ Version: 0.8.0
4
4
  Summary: Simulo SDK and CLI — define robotics simulation and training apps in Python and run them on the Simulo cloud.
5
5
  Author-email: Simulo Team <team@simulo.ai>
6
6
  License: BSD-3-Clause
@@ -16,6 +16,7 @@ Classifier: Typing :: Typed
16
16
  Requires-Python: >=3.11
17
17
  Description-Content-Type: text/markdown
18
18
  Requires-Dist: simulo-interfaces<0.2,>=0.1
19
+ Requires-Dist: mcap<2,>=1.3
19
20
  Provides-Extra: dev
20
21
  Requires-Dist: black>=24.0; extra == "dev"
21
22
  Requires-Dist: isort>=5.13; extra == "dev"
@@ -1,4 +1,5 @@
1
1
  simulo-interfaces<0.2,>=0.1
2
+ mcap<2,>=1.3
2
3
 
3
4
  [dev]
4
5
  black>=24.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes