simulo-interfaces 0.1.0__tar.gz → 0.1.1__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 (48) hide show
  1. simulo_interfaces-0.1.1/MANIFEST.in +9 -0
  2. simulo_interfaces-0.1.1/PKG-INFO +39 -0
  3. simulo_interfaces-0.1.1/PYPI.md +9 -0
  4. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/pyproject.toml +19 -23
  5. simulo_interfaces-0.1.1/src/simulo_interfaces.egg-info/PKG-INFO +39 -0
  6. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo_interfaces.egg-info/SOURCES.txt +3 -12
  7. simulo_interfaces-0.1.0/PKG-INFO +0 -166
  8. simulo_interfaces-0.1.0/README.md +0 -135
  9. simulo_interfaces-0.1.0/src/simulo_interfaces.egg-info/PKG-INFO +0 -166
  10. simulo_interfaces-0.1.0/tests/test_anomaly_contract.py +0 -164
  11. simulo_interfaces-0.1.0/tests/test_domain_dataclasses.py +0 -34
  12. simulo_interfaces-0.1.0/tests/test_enums.py +0 -30
  13. simulo_interfaces-0.1.0/tests/test_ids.py +0 -13
  14. simulo_interfaces-0.1.0/tests/test_import_without_torch.py +0 -21
  15. simulo_interfaces-0.1.0/tests/test_no_heavy_deps.py +0 -19
  16. simulo_interfaces-0.1.0/tests/test_platform_protocols.py +0 -80
  17. simulo_interfaces-0.1.0/tests/test_runs_contract.py +0 -95
  18. simulo_interfaces-0.1.0/tests/test_runtime_protocols.py +0 -124
  19. simulo_interfaces-0.1.0/tests/test_submit_contract.py +0 -269
  20. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/setup.cfg +0 -0
  21. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/__init__.py +0 -0
  22. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/exceptions.py +0 -0
  23. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/ids.py +0 -0
  24. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/__init__.py +0 -0
  25. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/app.py +0 -0
  26. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/asset.py +0 -0
  27. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/callbacks.py +0 -0
  28. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/debug.py +0 -0
  29. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/domain.py +0 -0
  30. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/enums.py +0 -0
  31. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/runs.py +0 -0
  32. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/runtime.py +0 -0
  33. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/submit.py +0 -0
  34. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/platform/volume.py +0 -0
  35. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/py.typed +0 -0
  36. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/__init__.py +0 -0
  37. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/anomaly.py +0 -0
  38. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/components.py +0 -0
  39. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/env.py +0 -0
  40. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/player.py +0 -0
  41. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/policy.py +0 -0
  42. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/scenario.py +0 -0
  43. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/task.py +0 -0
  44. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/tensors.py +0 -0
  45. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo/interfaces/runtime/trainer.py +0 -0
  46. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo_interfaces.egg-info/dependency_links.txt +0 -0
  47. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo_interfaces.egg-info/requires.txt +0 -0
  48. {simulo_interfaces-0.1.0 → simulo_interfaces-0.1.1}/src/simulo_interfaces.egg-info/top_level.txt +0 -0
@@ -0,0 +1,9 @@
1
+ # Public-metadata discretion boundary (see release.yml Guard 5): the sdist is
2
+ # PUBLIC on PyPI's "Download files" page just like the wheel, but setuptools'
3
+ # sdist command auto-includes README.md and any top-level tests/ directory
4
+ # regardless of the `readme = "PYPI.md"` pyproject setting. Exclude the
5
+ # internal docs and test suite explicitly so only PYPI.md ships as prose.
6
+ exclude README.md
7
+ exclude CLAUDE.md
8
+ exclude CHANGELOG.md
9
+ prune tests
@@ -0,0 +1,39 @@
1
+ Metadata-Version: 2.4
2
+ Name: simulo-interfaces
3
+ Version: 0.1.1
4
+ Summary: Type contracts for the Simulo SDK. Installed automatically as a dependency of the simulo package.
5
+ Author-email: Simulo Team <team@simulo.ai>
6
+ License: BSD-3-Clause
7
+ Project-URL: Homepage, https://simulo.ai
8
+ Keywords: simulo,robotics,contracts
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: BSD License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Typing :: Typed
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ Provides-Extra: dev
19
+ Requires-Dist: black>=24.0; extra == "dev"
20
+ Requires-Dist: isort>=5.13; extra == "dev"
21
+ Requires-Dist: ruff>=0.5; extra == "dev"
22
+ Requires-Dist: mypy>=1.10; extra == "dev"
23
+ Requires-Dist: pytest>=8.2; extra == "dev"
24
+ Requires-Dist: build>=1.2; extra == "dev"
25
+ Requires-Dist: twine>=5.1; extra == "dev"
26
+ Provides-Extra: release
27
+ Requires-Dist: commitizen>=3.27; extra == "release"
28
+ Requires-Dist: build>=1.2; extra == "release"
29
+ Requires-Dist: twine>=5.1; extra == "release"
30
+
31
+ # simulo-interfaces
32
+
33
+ Type contracts (protocols, enums, and dataclasses) used by the [Simulo](https://pypi.org/project/simulo/)
34
+ SDK.
35
+
36
+ This package is installed automatically as a dependency of `simulo` and is not
37
+ intended for direct installation.
38
+
39
+ Learn more at [simulo.ai](https://simulo.ai).
@@ -0,0 +1,9 @@
1
+ # simulo-interfaces
2
+
3
+ Type contracts (protocols, enums, and dataclasses) used by the [Simulo](https://pypi.org/project/simulo/)
4
+ SDK.
5
+
6
+ This package is installed automatically as a dependency of `simulo` and is not
7
+ intended for direct installation.
8
+
9
+ Learn more at [simulo.ai](https://simulo.ai).
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simulo-interfaces"
7
- version = "0.1.0"
8
- description = "Implementation-free contract layer for the Simulo platform torch-free runtime/sim Protocols and platform/workspace domain contracts. Importable with no torch/numpy/gymnasium/Isaac installed."
9
- readme = "README.md"
7
+ version = "0.1.1"
8
+ description = "Type contracts for the Simulo SDK. Installed automatically as a dependency of the simulo package."
9
+ readme = "PYPI.md"
10
10
  requires-python = ">=3.11"
11
11
  license = { text = "BSD-3-Clause" }
12
12
  authors = [{ name = "Simulo Team", email = "team@simulo.ai" }]
13
- keywords = ["robotics", "contracts", "protocols", "interfaces", "simulo"]
13
+ keywords = ["simulo", "robotics", "contracts"]
14
14
  classifiers = [
15
15
  "Development Status :: 3 - Alpha",
16
16
  "Intended Audience :: Developers",
@@ -20,26 +20,24 @@ classifiers = [
20
20
  "Programming Language :: Python :: 3.12",
21
21
  "Typing :: Typed",
22
22
  ]
23
- # ZERO runtime dependencies. Hard invariant (Rule #11): the thin client must
24
- # import this with no torch/numpy/gymnasium/Isaac/AWS/HTTP present. Enforced by
25
- # tests/test_no_heavy_deps.py + tests/test_import_without_torch.py.
23
+ # ZERO runtime dependencies must import cleanly with no
24
+ # torch/numpy/gymnasium/Isaac/AWS/HTTP present. Enforced by
25
+ # test_no_heavy_deps.py + test_import_without_torch.py.
26
26
  dependencies = []
27
27
 
28
28
  [project.optional-dependencies]
29
29
  dev = ["black>=24.0", "isort>=5.13", "ruff>=0.5", "mypy>=1.10", "pytest>=8.2", "build>=1.2", "twine>=5.1"]
30
- # Mirrors simulo-backend's [release] extra. `dev` above carries build/twine
31
- # but deliberately NOT commitizen the release skill (.claude/skills/release/
32
- # SKILL.md) installs THIS extra specifically so `cz` is available without
33
- # also pulling in a second copy of build/twine.
30
+ # `dev` carries build/twine but deliberately not commitizen; `release` below
31
+ # adds commitizen for cutting version bumps without a second build/twine copy.
34
32
  release = ["commitizen>=3.27", "build>=1.2", "twine>=5.1"]
35
33
 
36
34
  [project.urls]
37
35
  Homepage = "https://simulo.ai"
38
- Source = "https://github.com/simulo-org/simulo-platform"
39
36
 
40
- # PEP 420 namespace package: NO src/simulo/__init__.py. `namespaces = true`
41
- # makes setuptools pick up simulo.interfaces.* while leaving `simulo` a shared
42
- # namespace simulo-backend also contributes to. Mirrors simulo-backend exactly.
37
+ # Namespace packaging: no `src/simulo/__init__.py` here — this distribution
38
+ # contributes only `simulo.interfaces.*` beneath the shared top-level `simulo`
39
+ # name. `namespaces = true` keeps setuptools from choking on the shared
40
+ # top-level name.
43
41
  [tool.setuptools.packages.find]
44
42
  where = ["src"]
45
43
  namespaces = true
@@ -72,15 +70,13 @@ line-length = 120
72
70
  target-version = ["py311"]
73
71
 
74
72
  # --- Commitizen ------------------------------------------------------------
75
- # Path B release flow (see `.claude/skills/release/SKILL.md`): `cz bump` here
76
- # creates the bump commit + tag locally; `.github/workflows/release.yml`
77
- # publishes to PyPI on tag push. version_provider = "pep621" reads/writes
78
- # [project].version directly; there is no in-tree __version__ mirror to keep
79
- # in sync (version_files = []).
73
+ # `cz bump` creates the version-bump commit + tag locally; CI publishes to
74
+ # PyPI on tag push. version_provider = "pep621" reads/writes [project].version
75
+ # directly; there is no in-tree __version__ mirror to keep in sync
76
+ # (version_files = []).
80
77
  #
81
- # The FIRST release is a hand-written bump commit per the release skill's
82
- # First-release appendix, NOT a `cz bump` this package's version is
83
- # already 0.1.0 with no releasable commits since repo history began, so a
78
+ # The FIRST release is a hand-written bump commit, not a `cz bump` — this
79
+ # package's version is already 0.1.0 with no releasable commits yet, so a
84
80
  # real `cz bump --dry-run` would report "no increment"; the first tag simply
85
81
  # publishes the current 0.1.0 as-is.
86
82
  [tool.commitizen]
@@ -0,0 +1,39 @@
1
+ Metadata-Version: 2.4
2
+ Name: simulo-interfaces
3
+ Version: 0.1.1
4
+ Summary: Type contracts for the Simulo SDK. Installed automatically as a dependency of the simulo package.
5
+ Author-email: Simulo Team <team@simulo.ai>
6
+ License: BSD-3-Clause
7
+ Project-URL: Homepage, https://simulo.ai
8
+ Keywords: simulo,robotics,contracts
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: BSD License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Typing :: Typed
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ Provides-Extra: dev
19
+ Requires-Dist: black>=24.0; extra == "dev"
20
+ Requires-Dist: isort>=5.13; extra == "dev"
21
+ Requires-Dist: ruff>=0.5; extra == "dev"
22
+ Requires-Dist: mypy>=1.10; extra == "dev"
23
+ Requires-Dist: pytest>=8.2; extra == "dev"
24
+ Requires-Dist: build>=1.2; extra == "dev"
25
+ Requires-Dist: twine>=5.1; extra == "dev"
26
+ Provides-Extra: release
27
+ Requires-Dist: commitizen>=3.27; extra == "release"
28
+ Requires-Dist: build>=1.2; extra == "release"
29
+ Requires-Dist: twine>=5.1; extra == "release"
30
+
31
+ # simulo-interfaces
32
+
33
+ Type contracts (protocols, enums, and dataclasses) used by the [Simulo](https://pypi.org/project/simulo/)
34
+ SDK.
35
+
36
+ This package is installed automatically as a dependency of `simulo` and is not
37
+ intended for direct installation.
38
+
39
+ Learn more at [simulo.ai](https://simulo.ai).
@@ -1,4 +1,5 @@
1
- README.md
1
+ MANIFEST.in
2
+ PYPI.md
2
3
  pyproject.toml
3
4
  src/simulo/interfaces/__init__.py
4
5
  src/simulo/interfaces/exceptions.py
@@ -29,14 +30,4 @@ src/simulo_interfaces.egg-info/PKG-INFO
29
30
  src/simulo_interfaces.egg-info/SOURCES.txt
30
31
  src/simulo_interfaces.egg-info/dependency_links.txt
31
32
  src/simulo_interfaces.egg-info/requires.txt
32
- src/simulo_interfaces.egg-info/top_level.txt
33
- tests/test_anomaly_contract.py
34
- tests/test_domain_dataclasses.py
35
- tests/test_enums.py
36
- tests/test_ids.py
37
- tests/test_import_without_torch.py
38
- tests/test_no_heavy_deps.py
39
- tests/test_platform_protocols.py
40
- tests/test_runs_contract.py
41
- tests/test_runtime_protocols.py
42
- tests/test_submit_contract.py
33
+ src/simulo_interfaces.egg-info/top_level.txt
@@ -1,166 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: simulo-interfaces
3
- Version: 0.1.0
4
- Summary: Implementation-free contract layer for the Simulo platform — torch-free runtime/sim Protocols and platform/workspace domain contracts. Importable with no torch/numpy/gymnasium/Isaac installed.
5
- Author-email: Simulo Team <team@simulo.ai>
6
- License: BSD-3-Clause
7
- Project-URL: Homepage, https://simulo.ai
8
- Project-URL: Source, https://github.com/simulo-org/simulo-platform
9
- Keywords: robotics,contracts,protocols,interfaces,simulo
10
- Classifier: Development Status :: 3 - Alpha
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: BSD License
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Typing :: Typed
17
- Requires-Python: >=3.11
18
- Description-Content-Type: text/markdown
19
- Provides-Extra: dev
20
- Requires-Dist: black>=24.0; extra == "dev"
21
- Requires-Dist: isort>=5.13; extra == "dev"
22
- Requires-Dist: ruff>=0.5; extra == "dev"
23
- Requires-Dist: mypy>=1.10; extra == "dev"
24
- Requires-Dist: pytest>=8.2; extra == "dev"
25
- Requires-Dist: build>=1.2; extra == "dev"
26
- Requires-Dist: twine>=5.1; extra == "dev"
27
- Provides-Extra: release
28
- Requires-Dist: commitizen>=3.27; extra == "release"
29
- Requires-Dist: build>=1.2; extra == "release"
30
- Requires-Dist: twine>=5.1; extra == "release"
31
-
32
- # simulo-interfaces
33
-
34
- The **implementation-free contract layer** for the Simulo platform. A single,
35
- stable, torch-free, **zero-runtime-dependency** package that both Simulo SDK
36
- distributions depend on:
37
-
38
- - `simulo-backend` — the cloud GPU SDK (torch + IsaacLab + Isaac Sim).
39
- - `simulo` — the future thin local client (no heavy deps).
40
-
41
- Because both distributions share these contracts, `simulo-interfaces` is the one
42
- place the runtime Protocols and the platform/workspace domain model are defined.
43
-
44
- ## What it is
45
-
46
- A pure-stdlib set of `typing.Protocol` contracts, frozen dataclasses, enums,
47
- `NewType` identifiers, and an exception hierarchy. Nothing here does any work —
48
- it only describes shapes.
49
-
50
- ## What it is NOT
51
-
52
- It imports **none** of: `torch`, `numpy`, `gymnasium`, IsaacLab / Isaac Sim, AWS
53
- SDKs, HTTP clients, or database drivers. It performs **no** I/O, persistence, or
54
- computation. It is **not** a dumping ground (Contract Rule #12) — only contracts
55
- shared by more than one distribution belong here.
56
-
57
- The central invariant (Contract Rule #11): this package must import on a laptop
58
- with no torch/numpy/gymnasium/Isaac installed. Two tests enforce it:
59
- `tests/test_import_without_torch.py` (no heavy module enters `sys.modules`) and
60
- `tests/test_no_heavy_deps.py` (zero unconditional `Requires-Dist`).
61
-
62
- ## Two parts
63
-
64
- ### Part A — `simulo.interfaces.runtime`
65
-
66
- Tensor-library-agnostic structural mirrors of the `simulo.core` runtime surface.
67
- Tensors are typed as `TensorLike` (an alias for `Any`) so the contracts never
68
- bind to a concrete tensor library.
69
-
70
- - `TaskProtocol`, `PolicyProtocol`, `TrainerProtocol`, `PlayerProtocol`
71
- - `LearningEnvProtocol`, `ScenarioProtocol`
72
- - `ObservationComponentProtocol`, `RewardComponentProtocol`,
73
- `TerminationConditionProtocol`
74
- - `PolicyExporterProtocol` — the narrow *optional* export capability
75
- (`export_policy(path) -> str`). Deliberately not a `TrainerProtocol` member:
76
- a Protocol binds all implementations, and only some trainers (today
77
- `simulo.core.trainer.RLTrainer`) can deliver a deterministic standalone
78
- policy export. Consumers feature-detect with `isinstance(trainer,
79
- PolicyExporterProtocol)`.
80
-
81
- ### Part B — `simulo.interfaces.platform`
82
-
83
- The platform/workspace domain contracts:
84
-
85
- - **Enums** — `JobStatus`, `ResumePolicy`, `ResourceKind`, `ArtifactKind`.
86
- - **Domain dataclasses** (frozen, slotted, keyword-only) — `Tag`, `Project`,
87
- `Package`, `Resource`, `Job`, `Checkpoint`, `TrainedModel`.
88
- - **Cloud-execution Protocols** — `AppProtocol`, `JobFunctionProtocol`,
89
- `RuntimeProtocol`, `AssetProtocol`, `VolumeProtocol`, `JobCallbackProtocol`,
90
- `DebugSessionProtocol`, `ReplaySessionProtocol`, `VisualizationSessionProtocol`.
91
-
92
- ## Public import surface
93
-
94
- ```python
95
- import simulo.interfaces as si
96
-
97
- # exceptions + ids re-exported at the top level
98
- si.SimuloError, si.ContractViolationError, si.JobFailedError
99
- si.ProjectId, si.JobId, si.ResourceUri, si.Digest
100
-
101
- # Part A
102
- from simulo.interfaces.runtime import TaskProtocol, PolicyProtocol, LearningEnvProtocol
103
-
104
- # Part B
105
- from simulo.interfaces.platform import (
106
- JobStatus, ResumePolicy, ResourceKind, ArtifactKind,
107
- Project, Package, Job, Resource, Checkpoint, TrainedModel, Tag,
108
- AppProtocol, RuntimeProtocol, AssetProtocol, VolumeProtocol,
109
- )
110
- ```
111
-
112
- ## Conformance model
113
-
114
- The contracts are `typing.Protocol`s — implementers conform **structurally**, no
115
- inheritance required.
116
-
117
- - **Static** — implementers (e.g. `simulo-backend`) are type-checked against
118
- these Protocols by mypy. That static assertion is the primary conformance
119
- gate and lives in the **implementer** package, not here.
120
- - **Runtime** — every Protocol is `@runtime_checkable`, so `isinstance(obj,
121
- SomeProtocol)` provides a lightweight smoke check (presence of members only —
122
- not signatures). This package's tests use that smoke form.
123
- - **Nominal (optional, opt-in per implementer)** — `simulo-backend`'s
124
- `simulo.core` classes additionally *declare* the Part A Protocols as base
125
- classes, so mypy drift-checks each implementation against its mirror at the
126
- class-definition site. Nominal declaration never replaces the structural
127
- contract — a third-party implementation that merely matches the signatures
128
- still conforms.
129
-
130
- ## Domain-model invariants
131
-
132
- - **Package ≠ Job** (Rule #5) — a `Package` is an immutable, content-addressed
133
- source archive; a `Job` is one execution of a package and references it by id.
134
- - **Resource ≠ Package** (Rule #6) — a `Resource` is a read-only, versioned,
135
- registry-resolved mount (robot / environment / dataset / …).
136
- - **Checkpoint ≠ TrainedModel** (Rule #8) — an intermediate training artifact is
137
- a distinct type from the final, deployable model. Never collapse them.
138
- - **Project is the anchor** (Rule #7) — every other domain object hangs off a
139
- `Project`.
140
- - **No packaged-skill type** (Rule #11) — there is deliberately no `Skill` /
141
- `PackagedSkill` type here.
142
-
143
- ## Stability policy
144
-
145
- - Enum **values** are a stable wire ABI: append-only, never renumber or rename.
146
- - Dataclass fields and Protocol method signatures follow the same
147
- breaking-change discipline as the rest of the contract layer.
148
- - The package follows SemVer; additive changes (new optional field, new
149
- Protocol, new enum member at the end) are minor/patch, removals/renames major.
150
-
151
- ## Requirements
152
-
153
- - Python **>= 3.11** (uses `enum.StrEnum`). Tested on 3.11 and 3.12.
154
- - Standard library only — **zero** runtime dependencies.
155
-
156
- ## Development
157
-
158
- ```bash
159
- pip install -e ".[dev]"
160
- ruff check src
161
- black --check src tests
162
- isort --check-only src tests
163
- mypy src # strict
164
- python -m build && twine check dist/*
165
- pytest
166
- ```
@@ -1,135 +0,0 @@
1
- # simulo-interfaces
2
-
3
- The **implementation-free contract layer** for the Simulo platform. A single,
4
- stable, torch-free, **zero-runtime-dependency** package that both Simulo SDK
5
- distributions depend on:
6
-
7
- - `simulo-backend` — the cloud GPU SDK (torch + IsaacLab + Isaac Sim).
8
- - `simulo` — the future thin local client (no heavy deps).
9
-
10
- Because both distributions share these contracts, `simulo-interfaces` is the one
11
- place the runtime Protocols and the platform/workspace domain model are defined.
12
-
13
- ## What it is
14
-
15
- A pure-stdlib set of `typing.Protocol` contracts, frozen dataclasses, enums,
16
- `NewType` identifiers, and an exception hierarchy. Nothing here does any work —
17
- it only describes shapes.
18
-
19
- ## What it is NOT
20
-
21
- It imports **none** of: `torch`, `numpy`, `gymnasium`, IsaacLab / Isaac Sim, AWS
22
- SDKs, HTTP clients, or database drivers. It performs **no** I/O, persistence, or
23
- computation. It is **not** a dumping ground (Contract Rule #12) — only contracts
24
- shared by more than one distribution belong here.
25
-
26
- The central invariant (Contract Rule #11): this package must import on a laptop
27
- with no torch/numpy/gymnasium/Isaac installed. Two tests enforce it:
28
- `tests/test_import_without_torch.py` (no heavy module enters `sys.modules`) and
29
- `tests/test_no_heavy_deps.py` (zero unconditional `Requires-Dist`).
30
-
31
- ## Two parts
32
-
33
- ### Part A — `simulo.interfaces.runtime`
34
-
35
- Tensor-library-agnostic structural mirrors of the `simulo.core` runtime surface.
36
- Tensors are typed as `TensorLike` (an alias for `Any`) so the contracts never
37
- bind to a concrete tensor library.
38
-
39
- - `TaskProtocol`, `PolicyProtocol`, `TrainerProtocol`, `PlayerProtocol`
40
- - `LearningEnvProtocol`, `ScenarioProtocol`
41
- - `ObservationComponentProtocol`, `RewardComponentProtocol`,
42
- `TerminationConditionProtocol`
43
- - `PolicyExporterProtocol` — the narrow *optional* export capability
44
- (`export_policy(path) -> str`). Deliberately not a `TrainerProtocol` member:
45
- a Protocol binds all implementations, and only some trainers (today
46
- `simulo.core.trainer.RLTrainer`) can deliver a deterministic standalone
47
- policy export. Consumers feature-detect with `isinstance(trainer,
48
- PolicyExporterProtocol)`.
49
-
50
- ### Part B — `simulo.interfaces.platform`
51
-
52
- The platform/workspace domain contracts:
53
-
54
- - **Enums** — `JobStatus`, `ResumePolicy`, `ResourceKind`, `ArtifactKind`.
55
- - **Domain dataclasses** (frozen, slotted, keyword-only) — `Tag`, `Project`,
56
- `Package`, `Resource`, `Job`, `Checkpoint`, `TrainedModel`.
57
- - **Cloud-execution Protocols** — `AppProtocol`, `JobFunctionProtocol`,
58
- `RuntimeProtocol`, `AssetProtocol`, `VolumeProtocol`, `JobCallbackProtocol`,
59
- `DebugSessionProtocol`, `ReplaySessionProtocol`, `VisualizationSessionProtocol`.
60
-
61
- ## Public import surface
62
-
63
- ```python
64
- import simulo.interfaces as si
65
-
66
- # exceptions + ids re-exported at the top level
67
- si.SimuloError, si.ContractViolationError, si.JobFailedError
68
- si.ProjectId, si.JobId, si.ResourceUri, si.Digest
69
-
70
- # Part A
71
- from simulo.interfaces.runtime import TaskProtocol, PolicyProtocol, LearningEnvProtocol
72
-
73
- # Part B
74
- from simulo.interfaces.platform import (
75
- JobStatus, ResumePolicy, ResourceKind, ArtifactKind,
76
- Project, Package, Job, Resource, Checkpoint, TrainedModel, Tag,
77
- AppProtocol, RuntimeProtocol, AssetProtocol, VolumeProtocol,
78
- )
79
- ```
80
-
81
- ## Conformance model
82
-
83
- The contracts are `typing.Protocol`s — implementers conform **structurally**, no
84
- inheritance required.
85
-
86
- - **Static** — implementers (e.g. `simulo-backend`) are type-checked against
87
- these Protocols by mypy. That static assertion is the primary conformance
88
- gate and lives in the **implementer** package, not here.
89
- - **Runtime** — every Protocol is `@runtime_checkable`, so `isinstance(obj,
90
- SomeProtocol)` provides a lightweight smoke check (presence of members only —
91
- not signatures). This package's tests use that smoke form.
92
- - **Nominal (optional, opt-in per implementer)** — `simulo-backend`'s
93
- `simulo.core` classes additionally *declare* the Part A Protocols as base
94
- classes, so mypy drift-checks each implementation against its mirror at the
95
- class-definition site. Nominal declaration never replaces the structural
96
- contract — a third-party implementation that merely matches the signatures
97
- still conforms.
98
-
99
- ## Domain-model invariants
100
-
101
- - **Package ≠ Job** (Rule #5) — a `Package` is an immutable, content-addressed
102
- source archive; a `Job` is one execution of a package and references it by id.
103
- - **Resource ≠ Package** (Rule #6) — a `Resource` is a read-only, versioned,
104
- registry-resolved mount (robot / environment / dataset / …).
105
- - **Checkpoint ≠ TrainedModel** (Rule #8) — an intermediate training artifact is
106
- a distinct type from the final, deployable model. Never collapse them.
107
- - **Project is the anchor** (Rule #7) — every other domain object hangs off a
108
- `Project`.
109
- - **No packaged-skill type** (Rule #11) — there is deliberately no `Skill` /
110
- `PackagedSkill` type here.
111
-
112
- ## Stability policy
113
-
114
- - Enum **values** are a stable wire ABI: append-only, never renumber or rename.
115
- - Dataclass fields and Protocol method signatures follow the same
116
- breaking-change discipline as the rest of the contract layer.
117
- - The package follows SemVer; additive changes (new optional field, new
118
- Protocol, new enum member at the end) are minor/patch, removals/renames major.
119
-
120
- ## Requirements
121
-
122
- - Python **>= 3.11** (uses `enum.StrEnum`). Tested on 3.11 and 3.12.
123
- - Standard library only — **zero** runtime dependencies.
124
-
125
- ## Development
126
-
127
- ```bash
128
- pip install -e ".[dev]"
129
- ruff check src
130
- black --check src tests
131
- isort --check-only src tests
132
- mypy src # strict
133
- python -m build && twine check dist/*
134
- pytest
135
- ```
@@ -1,166 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: simulo-interfaces
3
- Version: 0.1.0
4
- Summary: Implementation-free contract layer for the Simulo platform — torch-free runtime/sim Protocols and platform/workspace domain contracts. Importable with no torch/numpy/gymnasium/Isaac installed.
5
- Author-email: Simulo Team <team@simulo.ai>
6
- License: BSD-3-Clause
7
- Project-URL: Homepage, https://simulo.ai
8
- Project-URL: Source, https://github.com/simulo-org/simulo-platform
9
- Keywords: robotics,contracts,protocols,interfaces,simulo
10
- Classifier: Development Status :: 3 - Alpha
11
- Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: BSD License
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Classifier: Typing :: Typed
17
- Requires-Python: >=3.11
18
- Description-Content-Type: text/markdown
19
- Provides-Extra: dev
20
- Requires-Dist: black>=24.0; extra == "dev"
21
- Requires-Dist: isort>=5.13; extra == "dev"
22
- Requires-Dist: ruff>=0.5; extra == "dev"
23
- Requires-Dist: mypy>=1.10; extra == "dev"
24
- Requires-Dist: pytest>=8.2; extra == "dev"
25
- Requires-Dist: build>=1.2; extra == "dev"
26
- Requires-Dist: twine>=5.1; extra == "dev"
27
- Provides-Extra: release
28
- Requires-Dist: commitizen>=3.27; extra == "release"
29
- Requires-Dist: build>=1.2; extra == "release"
30
- Requires-Dist: twine>=5.1; extra == "release"
31
-
32
- # simulo-interfaces
33
-
34
- The **implementation-free contract layer** for the Simulo platform. A single,
35
- stable, torch-free, **zero-runtime-dependency** package that both Simulo SDK
36
- distributions depend on:
37
-
38
- - `simulo-backend` — the cloud GPU SDK (torch + IsaacLab + Isaac Sim).
39
- - `simulo` — the future thin local client (no heavy deps).
40
-
41
- Because both distributions share these contracts, `simulo-interfaces` is the one
42
- place the runtime Protocols and the platform/workspace domain model are defined.
43
-
44
- ## What it is
45
-
46
- A pure-stdlib set of `typing.Protocol` contracts, frozen dataclasses, enums,
47
- `NewType` identifiers, and an exception hierarchy. Nothing here does any work —
48
- it only describes shapes.
49
-
50
- ## What it is NOT
51
-
52
- It imports **none** of: `torch`, `numpy`, `gymnasium`, IsaacLab / Isaac Sim, AWS
53
- SDKs, HTTP clients, or database drivers. It performs **no** I/O, persistence, or
54
- computation. It is **not** a dumping ground (Contract Rule #12) — only contracts
55
- shared by more than one distribution belong here.
56
-
57
- The central invariant (Contract Rule #11): this package must import on a laptop
58
- with no torch/numpy/gymnasium/Isaac installed. Two tests enforce it:
59
- `tests/test_import_without_torch.py` (no heavy module enters `sys.modules`) and
60
- `tests/test_no_heavy_deps.py` (zero unconditional `Requires-Dist`).
61
-
62
- ## Two parts
63
-
64
- ### Part A — `simulo.interfaces.runtime`
65
-
66
- Tensor-library-agnostic structural mirrors of the `simulo.core` runtime surface.
67
- Tensors are typed as `TensorLike` (an alias for `Any`) so the contracts never
68
- bind to a concrete tensor library.
69
-
70
- - `TaskProtocol`, `PolicyProtocol`, `TrainerProtocol`, `PlayerProtocol`
71
- - `LearningEnvProtocol`, `ScenarioProtocol`
72
- - `ObservationComponentProtocol`, `RewardComponentProtocol`,
73
- `TerminationConditionProtocol`
74
- - `PolicyExporterProtocol` — the narrow *optional* export capability
75
- (`export_policy(path) -> str`). Deliberately not a `TrainerProtocol` member:
76
- a Protocol binds all implementations, and only some trainers (today
77
- `simulo.core.trainer.RLTrainer`) can deliver a deterministic standalone
78
- policy export. Consumers feature-detect with `isinstance(trainer,
79
- PolicyExporterProtocol)`.
80
-
81
- ### Part B — `simulo.interfaces.platform`
82
-
83
- The platform/workspace domain contracts:
84
-
85
- - **Enums** — `JobStatus`, `ResumePolicy`, `ResourceKind`, `ArtifactKind`.
86
- - **Domain dataclasses** (frozen, slotted, keyword-only) — `Tag`, `Project`,
87
- `Package`, `Resource`, `Job`, `Checkpoint`, `TrainedModel`.
88
- - **Cloud-execution Protocols** — `AppProtocol`, `JobFunctionProtocol`,
89
- `RuntimeProtocol`, `AssetProtocol`, `VolumeProtocol`, `JobCallbackProtocol`,
90
- `DebugSessionProtocol`, `ReplaySessionProtocol`, `VisualizationSessionProtocol`.
91
-
92
- ## Public import surface
93
-
94
- ```python
95
- import simulo.interfaces as si
96
-
97
- # exceptions + ids re-exported at the top level
98
- si.SimuloError, si.ContractViolationError, si.JobFailedError
99
- si.ProjectId, si.JobId, si.ResourceUri, si.Digest
100
-
101
- # Part A
102
- from simulo.interfaces.runtime import TaskProtocol, PolicyProtocol, LearningEnvProtocol
103
-
104
- # Part B
105
- from simulo.interfaces.platform import (
106
- JobStatus, ResumePolicy, ResourceKind, ArtifactKind,
107
- Project, Package, Job, Resource, Checkpoint, TrainedModel, Tag,
108
- AppProtocol, RuntimeProtocol, AssetProtocol, VolumeProtocol,
109
- )
110
- ```
111
-
112
- ## Conformance model
113
-
114
- The contracts are `typing.Protocol`s — implementers conform **structurally**, no
115
- inheritance required.
116
-
117
- - **Static** — implementers (e.g. `simulo-backend`) are type-checked against
118
- these Protocols by mypy. That static assertion is the primary conformance
119
- gate and lives in the **implementer** package, not here.
120
- - **Runtime** — every Protocol is `@runtime_checkable`, so `isinstance(obj,
121
- SomeProtocol)` provides a lightweight smoke check (presence of members only —
122
- not signatures). This package's tests use that smoke form.
123
- - **Nominal (optional, opt-in per implementer)** — `simulo-backend`'s
124
- `simulo.core` classes additionally *declare* the Part A Protocols as base
125
- classes, so mypy drift-checks each implementation against its mirror at the
126
- class-definition site. Nominal declaration never replaces the structural
127
- contract — a third-party implementation that merely matches the signatures
128
- still conforms.
129
-
130
- ## Domain-model invariants
131
-
132
- - **Package ≠ Job** (Rule #5) — a `Package` is an immutable, content-addressed
133
- source archive; a `Job` is one execution of a package and references it by id.
134
- - **Resource ≠ Package** (Rule #6) — a `Resource` is a read-only, versioned,
135
- registry-resolved mount (robot / environment / dataset / …).
136
- - **Checkpoint ≠ TrainedModel** (Rule #8) — an intermediate training artifact is
137
- a distinct type from the final, deployable model. Never collapse them.
138
- - **Project is the anchor** (Rule #7) — every other domain object hangs off a
139
- `Project`.
140
- - **No packaged-skill type** (Rule #11) — there is deliberately no `Skill` /
141
- `PackagedSkill` type here.
142
-
143
- ## Stability policy
144
-
145
- - Enum **values** are a stable wire ABI: append-only, never renumber or rename.
146
- - Dataclass fields and Protocol method signatures follow the same
147
- breaking-change discipline as the rest of the contract layer.
148
- - The package follows SemVer; additive changes (new optional field, new
149
- Protocol, new enum member at the end) are minor/patch, removals/renames major.
150
-
151
- ## Requirements
152
-
153
- - Python **>= 3.11** (uses `enum.StrEnum`). Tested on 3.11 and 3.12.
154
- - Standard library only — **zero** runtime dependencies.
155
-
156
- ## Development
157
-
158
- ```bash
159
- pip install -e ".[dev]"
160
- ruff check src
161
- black --check src tests
162
- isort --check-only src tests
163
- mypy src # strict
164
- python -m build && twine check dist/*
165
- pytest
166
- ```