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.
- nomad_harness-0.1.0.dev0/.github/workflows/ci.yml +52 -0
- nomad_harness-0.1.0.dev0/.github/workflows/release.yml +59 -0
- nomad_harness-0.1.0.dev0/.gitignore +12 -0
- nomad_harness-0.1.0.dev0/LICENSE +21 -0
- nomad_harness-0.1.0.dev0/PKG-INFO +548 -0
- nomad_harness-0.1.0.dev0/README.md +508 -0
- nomad_harness-0.1.0.dev0/examples/offline_demo.py +91 -0
- nomad_harness-0.1.0.dev0/examples/robosuite_scripted_lift.py +76 -0
- nomad_harness-0.1.0.dev0/pyproject.toml +79 -0
- nomad_harness-0.1.0.dev0/src/nomad/__init__.py +57 -0
- nomad_harness-0.1.0.dev0/src/nomad/agent.py +32 -0
- nomad_harness-0.1.0.dev0/src/nomad/budget.py +135 -0
- nomad_harness-0.1.0.dev0/src/nomad/context.py +89 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/__init__.py +78 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/actions.py +88 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/codes.py +103 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/errors.py +19 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/geometry.py +110 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/manifest.py +311 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/model_io.py +79 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/observations.py +66 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/protocols.py +82 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/results.py +54 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/run.py +66 -0
- nomad_harness-0.1.0.dev0/src/nomad/core/types.py +50 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/__init__.py +17 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/_execution.py +97 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/_manifests.py +19 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/_png.py +29 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/fake.py +505 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/manifests/fake.yaml +41 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/manifests/robosuite_lift.yaml +50 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/__init__.py +15 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/_imports.py +41 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/adapter.py +522 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/config.py +153 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/conversions.py +146 -0
- nomad_harness-0.1.0.dev0/src/nomad/embodiments/robosuite/video.py +50 -0
- nomad_harness-0.1.0.dev0/src/nomad/models/__init__.py +10 -0
- nomad_harness-0.1.0.dev0/src/nomad/models/fake.py +102 -0
- nomad_harness-0.1.0.dev0/src/nomad/models/scripted.py +210 -0
- nomad_harness-0.1.0.dev0/src/nomad/py.typed +0 -0
- nomad_harness-0.1.0.dev0/src/nomad/runtime.py +393 -0
- nomad_harness-0.1.0.dev0/src/nomad/tracing.py +258 -0
- nomad_harness-0.1.0.dev0/src/nomad/validation.py +261 -0
- nomad_harness-0.1.0.dev0/tests/support.py +154 -0
- nomad_harness-0.1.0.dev0/tests/test_actions.py +158 -0
- nomad_harness-0.1.0.dev0/tests/test_budget.py +174 -0
- nomad_harness-0.1.0.dev0/tests/test_context.py +100 -0
- nomad_harness-0.1.0.dev0/tests/test_execution_guard.py +46 -0
- nomad_harness-0.1.0.dev0/tests/test_fake_embodiment.py +236 -0
- nomad_harness-0.1.0.dev0/tests/test_fake_model.py +65 -0
- nomad_harness-0.1.0.dev0/tests/test_geometry.py +119 -0
- nomad_harness-0.1.0.dev0/tests/test_import_hygiene.py +56 -0
- nomad_harness-0.1.0.dev0/tests/test_manifest.py +207 -0
- nomad_harness-0.1.0.dev0/tests/test_offline_demo.py +31 -0
- nomad_harness-0.1.0.dev0/tests/test_protocols.py +61 -0
- nomad_harness-0.1.0.dev0/tests/test_records.py +134 -0
- nomad_harness-0.1.0.dev0/tests/test_robosuite_config.py +136 -0
- nomad_harness-0.1.0.dev0/tests/test_robosuite_conversions.py +151 -0
- nomad_harness-0.1.0.dev0/tests/test_robosuite_embodiment.py +223 -0
- nomad_harness-0.1.0.dev0/tests/test_robosuite_execution.py +241 -0
- nomad_harness-0.1.0.dev0/tests/test_robosuite_scripted_lift.py +65 -0
- nomad_harness-0.1.0.dev0/tests/test_runtime.py +550 -0
- nomad_harness-0.1.0.dev0/tests/test_scripted_policy.py +128 -0
- nomad_harness-0.1.0.dev0/tests/test_tracing.py +162 -0
- 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,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.
|