nomad-harness 0.1.0.dev0__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 (67) hide show
  1. nomad_harness-0.1.0.dev0/.github/workflows/ci.yml +52 -0
  2. nomad_harness-0.1.0.dev0/.github/workflows/release.yml +59 -0
  3. nomad_harness-0.1.0.dev0/.gitignore +12 -0
  4. nomad_harness-0.1.0.dev0/LICENSE +21 -0
  5. nomad_harness-0.1.0.dev0/PKG-INFO +548 -0
  6. nomad_harness-0.1.0.dev0/README.md +508 -0
  7. nomad_harness-0.1.0.dev0/examples/offline_demo.py +91 -0
  8. nomad_harness-0.1.0.dev0/examples/robosuite_scripted_lift.py +76 -0
  9. nomad_harness-0.1.0.dev0/pyproject.toml +79 -0
  10. nomad_harness-0.1.0.dev0/src/nomad/__init__.py +57 -0
  11. nomad_harness-0.1.0.dev0/src/nomad/agent.py +32 -0
  12. nomad_harness-0.1.0.dev0/src/nomad/budget.py +135 -0
  13. nomad_harness-0.1.0.dev0/src/nomad/context.py +89 -0
  14. nomad_harness-0.1.0.dev0/src/nomad/core/__init__.py +78 -0
  15. nomad_harness-0.1.0.dev0/src/nomad/core/actions.py +88 -0
  16. nomad_harness-0.1.0.dev0/src/nomad/core/codes.py +103 -0
  17. nomad_harness-0.1.0.dev0/src/nomad/core/errors.py +19 -0
  18. nomad_harness-0.1.0.dev0/src/nomad/core/geometry.py +110 -0
  19. nomad_harness-0.1.0.dev0/src/nomad/core/manifest.py +311 -0
  20. nomad_harness-0.1.0.dev0/src/nomad/core/model_io.py +79 -0
  21. nomad_harness-0.1.0.dev0/src/nomad/core/observations.py +66 -0
  22. nomad_harness-0.1.0.dev0/src/nomad/core/protocols.py +82 -0
  23. nomad_harness-0.1.0.dev0/src/nomad/core/results.py +54 -0
  24. nomad_harness-0.1.0.dev0/src/nomad/core/run.py +66 -0
  25. nomad_harness-0.1.0.dev0/src/nomad/core/types.py +50 -0
  26. nomad_harness-0.1.0.dev0/src/nomad/embodiments/__init__.py +17 -0
  27. nomad_harness-0.1.0.dev0/src/nomad/embodiments/_execution.py +97 -0
  28. nomad_harness-0.1.0.dev0/src/nomad/embodiments/_manifests.py +19 -0
  29. nomad_harness-0.1.0.dev0/src/nomad/embodiments/_png.py +29 -0
  30. nomad_harness-0.1.0.dev0/src/nomad/embodiments/fake.py +505 -0
  31. nomad_harness-0.1.0.dev0/src/nomad/embodiments/manifests/fake.yaml +41 -0
  32. nomad_harness-0.1.0.dev0/src/nomad/embodiments/manifests/robosuite_lift.yaml +50 -0
  33. nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/__init__.py +15 -0
  34. nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/_imports.py +41 -0
  35. nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/adapter.py +522 -0
  36. nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/config.py +153 -0
  37. nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/conversions.py +146 -0
  38. nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/video.py +50 -0
  39. nomad_harness-0.1.0.dev0/src/nomad/models/__init__.py +10 -0
  40. nomad_harness-0.1.0.dev0/src/nomad/models/fake.py +102 -0
  41. nomad_harness-0.1.0.dev0/src/nomad/models/scripted.py +210 -0
  42. nomad_harness-0.1.0.dev0/src/nomad/py.typed +0 -0
  43. nomad_harness-0.1.0.dev0/src/nomad/runtime.py +393 -0
  44. nomad_harness-0.1.0.dev0/src/nomad/tracing.py +258 -0
  45. nomad_harness-0.1.0.dev0/src/nomad/validation.py +261 -0
  46. nomad_harness-0.1.0.dev0/tests/support.py +154 -0
  47. nomad_harness-0.1.0.dev0/tests/test_actions.py +158 -0
  48. nomad_harness-0.1.0.dev0/tests/test_budget.py +174 -0
  49. nomad_harness-0.1.0.dev0/tests/test_context.py +100 -0
  50. nomad_harness-0.1.0.dev0/tests/test_execution_guard.py +46 -0
  51. nomad_harness-0.1.0.dev0/tests/test_fake_embodiment.py +236 -0
  52. nomad_harness-0.1.0.dev0/tests/test_fake_model.py +65 -0
  53. nomad_harness-0.1.0.dev0/tests/test_geometry.py +119 -0
  54. nomad_harness-0.1.0.dev0/tests/test_import_hygiene.py +56 -0
  55. nomad_harness-0.1.0.dev0/tests/test_manifest.py +207 -0
  56. nomad_harness-0.1.0.dev0/tests/test_offline_demo.py +31 -0
  57. nomad_harness-0.1.0.dev0/tests/test_protocols.py +61 -0
  58. nomad_harness-0.1.0.dev0/tests/test_records.py +134 -0
  59. nomad_harness-0.1.0.dev0/tests/test_robosuite_config.py +136 -0
  60. nomad_harness-0.1.0.dev0/tests/test_robosuite_conversions.py +151 -0
  61. nomad_harness-0.1.0.dev0/tests/test_robosuite_embodiment.py +223 -0
  62. nomad_harness-0.1.0.dev0/tests/test_robosuite_execution.py +241 -0
  63. nomad_harness-0.1.0.dev0/tests/test_robosuite_scripted_lift.py +65 -0
  64. nomad_harness-0.1.0.dev0/tests/test_runtime.py +550 -0
  65. nomad_harness-0.1.0.dev0/tests/test_scripted_policy.py +128 -0
  66. nomad_harness-0.1.0.dev0/tests/test_tracing.py +162 -0
  67. nomad_harness-0.1.0.dev0/tests/test_validation.py +231 -0
@@ -0,0 +1,52 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12"]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - name: Install
21
+ run: python -m pip install -e ".[dev]"
22
+ - name: Lint
23
+ run: |
24
+ ruff check .
25
+ ruff format --check .
26
+ - name: Type check
27
+ run: mypy
28
+ - name: Test
29
+ run: pytest
30
+
31
+ # Simulator acceptance tests. Non-blocking until the headless rendering setup
32
+ # has a track record on hosted runners; the default job above never needs MuJoCo.
33
+ robosuite:
34
+ runs-on: ubuntu-latest
35
+ continue-on-error: true
36
+ env:
37
+ MUJOCO_GL: osmesa
38
+ PYOPENGL_PLATFORM: osmesa
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: "3.11"
44
+ - name: Install OSMesa for offscreen rendering
45
+ run: sudo apt-get update && sudo apt-get install -y libosmesa6
46
+ - name: Install
47
+ run: python -m pip install -e ".[dev,robosuite]"
48
+ - name: Check the simulator imports
49
+ # Fails loudly here instead of letting importorskip skip every test.
50
+ run: python -c "import robosuite, mujoco; print(robosuite.__version__, mujoco.__version__)"
51
+ - name: Test
52
+ run: pytest -m robosuite -ra
@@ -0,0 +1,59 @@
1
+ # Publishes nomad-harness with PyPI Trusted Publishing (OIDC): no API tokens are
2
+ # stored in the repository or in GitHub secrets.
3
+ #
4
+ # - Run manually (Actions -> Release -> Run workflow) for a dry run: test, build,
5
+ # and check the distributions, which are kept as a workflow artifact. Nothing
6
+ # is uploaded.
7
+ # - Publish a GitHub release to build and upload to PyPI.
8
+ #
9
+ # One-time setup, done by a maintainer outside this repository:
10
+ # 1. On pypi.org, add a pending trusted publisher for project "nomad-harness":
11
+ # owner Lambda-Robotics-Inc, repository Nomad_Harness_Interface, workflow
12
+ # release.yml, environment "pypi".
13
+ # 2. In GitHub repository settings, create the environment "pypi" and add
14
+ # required reviewers so every upload needs an approval.
15
+ name: Release
16
+
17
+ on:
18
+ workflow_dispatch:
19
+ release:
20
+ types: [published]
21
+
22
+ jobs:
23
+ build:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - uses: actions/setup-python@v5
28
+ with:
29
+ python-version: "3.11"
30
+ - name: Test before building
31
+ run: |
32
+ python -m pip install -e ".[dev]"
33
+ pytest
34
+ - name: Build sdist and wheel
35
+ run: |
36
+ python -m pip install build twine
37
+ python -m build
38
+ twine check --strict dist/*
39
+ - uses: actions/upload-artifact@v4
40
+ with:
41
+ name: dist
42
+ path: dist/
43
+
44
+ pypi:
45
+ # Uploads only come from a published GitHub release; manual runs stop after build.
46
+ if: github.event_name == 'release'
47
+ needs: build
48
+ runs-on: ubuntu-latest
49
+ environment:
50
+ name: pypi
51
+ url: https://pypi.org/project/nomad-harness/
52
+ permissions:
53
+ id-token: write
54
+ steps:
55
+ - uses: actions/download-artifact@v4
56
+ with:
57
+ name: dist
58
+ path: dist/
59
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,12 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .venv/
7
+ .pytest_cache/
8
+ .mypy_cache/
9
+ .ruff_cache/
10
+
11
+ # Run artifacts written by the trace writer.
12
+ runs/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lambda Robotics
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.