mujoco-usd-converter 0.1.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.
- mujoco_usd_converter-0.1.0/.github/CODEOWNERS +1 -0
- mujoco_usd_converter-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +92 -0
- mujoco_usd_converter-0.1.0/.github/ISSUE_TEMPLATE/config.yml +11 -0
- mujoco_usd_converter-0.1.0/.github/ISSUE_TEMPLATE/documentation_request.yml +38 -0
- mujoco_usd_converter-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +51 -0
- mujoco_usd_converter-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +7 -0
- mujoco_usd_converter-0.1.0/.github/actions/bootstrap/action.yml +29 -0
- mujoco_usd_converter-0.1.0/.github/codecov.yml +10 -0
- mujoco_usd_converter-0.1.0/.github/workflows/benchmark.yml +69 -0
- mujoco_usd_converter-0.1.0/.github/workflows/ci.yml +180 -0
- mujoco_usd_converter-0.1.0/.gitignore +17 -0
- mujoco_usd_converter-0.1.0/.vscode/settings.json +16 -0
- mujoco_usd_converter-0.1.0/CHANGELOG.md +254 -0
- mujoco_usd_converter-0.1.0/CITATION.md +16 -0
- mujoco_usd_converter-0.1.0/CODE_OF_CONDUCT.md +1 -0
- mujoco_usd_converter-0.1.0/CONTRIBUTING.md +142 -0
- mujoco_usd_converter-0.1.0/LICENSE.md +201 -0
- mujoco_usd_converter-0.1.0/PKG-INFO +140 -0
- mujoco_usd_converter-0.1.0/README.md +122 -0
- mujoco_usd_converter-0.1.0/SECURITY.md +1 -0
- mujoco_usd_converter-0.1.0/benchmarks.md +148 -0
- mujoco_usd_converter-0.1.0/build.bat +49 -0
- mujoco_usd_converter-0.1.0/build.sh +30 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/__init__.py +9 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/__main__.py +7 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/_flatten.py +43 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/actuator.py +137 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/body.py +142 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/cli.py +119 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/convert.py +170 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/data.py +38 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/equality.py +199 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/exclude.py +26 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/geom.py +421 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/joint.py +112 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/material.py +118 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/mesh.py +155 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/numpy.py +119 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/scene.py +147 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/tendon.py +144 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_impl/utils.py +226 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/_version.py +3 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/plugins/mjcPhysics/resources/generatedSchema.usda +730 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/plugins/mjcPhysics/resources/plugInfo.json +155 -0
- mujoco_usd_converter-0.1.0/mujoco_usd_converter/plugins/plugInfo.json +5 -0
- mujoco_usd_converter-0.1.0/pyproject.toml +182 -0
- mujoco_usd_converter-0.1.0/tests/data/actuator_edge_cases.xml +58 -0
- mujoco_usd_converter-0.1.0/tests/data/actuators.xml +39 -0
- mujoco_usd_converter-0.1.0/tests/data/assets/box.obj +65 -0
- mujoco_usd_converter-0.1.0/tests/data/assets/box.stl +86 -0
- mujoco_usd_converter-0.1.0/tests/data/assets/complex_cube.obj +118 -0
- mujoco_usd_converter-0.1.0/tests/data/assets/grid.png +0 -0
- mujoco_usd_converter-0.1.0/tests/data/ball_joints.xml +24 -0
- mujoco_usd_converter-0.1.0/tests/data/bodies.xml +57 -0
- mujoco_usd_converter-0.1.0/tests/data/contact_excludes.xml +36 -0
- mujoco_usd_converter-0.1.0/tests/data/equality_connect.xml +51 -0
- mujoco_usd_converter-0.1.0/tests/data/equality_connect_attributes.xml +108 -0
- mujoco_usd_converter-0.1.0/tests/data/equality_connect_vs_weld.xml +43 -0
- mujoco_usd_converter-0.1.0/tests/data/equality_invalid_names.xml +43 -0
- mujoco_usd_converter-0.1.0/tests/data/equality_joint_attributes.xml +49 -0
- mujoco_usd_converter-0.1.0/tests/data/equality_weld_attributes.xml +60 -0
- mujoco_usd_converter-0.1.0/tests/data/equality_weld_with_nested_bodies.xml +24 -0
- mujoco_usd_converter-0.1.0/tests/data/equality_weld_with_sites.xml +32 -0
- mujoco_usd_converter-0.1.0/tests/data/fixed_vs_free_joints.xml +22 -0
- mujoco_usd_converter-0.1.0/tests/data/frames.xml +21 -0
- mujoco_usd_converter-0.1.0/tests/data/geom_default_density.xml +11 -0
- mujoco_usd_converter-0.1.0/tests/data/geoms.xml +41 -0
- mujoco_usd_converter-0.1.0/tests/data/geoms_fitting.xml +146 -0
- mujoco_usd_converter-0.1.0/tests/data/geoms_fitting_aabb.xml +146 -0
- mujoco_usd_converter-0.1.0/tests/data/geoms_ignore_geom_inertia.xml +16 -0
- mujoco_usd_converter-0.1.0/tests/data/hinge_joints.xml +27 -0
- mujoco_usd_converter-0.1.0/tests/data/invalid names.xml +17 -0
- mujoco_usd_converter-0.1.0/tests/data/joint_attributes.xml +43 -0
- mujoco_usd_converter-0.1.0/tests/data/joint_limits.xml +31 -0
- mujoco_usd_converter-0.1.0/tests/data/joint_limits_no_autolimits.xml +22 -0
- mujoco_usd_converter-0.1.0/tests/data/materials.xml +30 -0
- mujoco_usd_converter-0.1.0/tests/data/meshes.xml +20 -0
- mujoco_usd_converter-0.1.0/tests/data/physics_materials.xml +19 -0
- mujoco_usd_converter-0.1.0/tests/data/reflected_meshes.xml +20 -0
- mujoco_usd_converter-0.1.0/tests/data/scene_attributes.xml +43 -0
- mujoco_usd_converter-0.1.0/tests/data/simple_actuator.xml +11 -0
- mujoco_usd_converter-0.1.0/tests/data/sites.xml +9 -0
- mujoco_usd_converter-0.1.0/tests/data/slide_joints.xml +23 -0
- mujoco_usd_converter-0.1.0/tests/data/tendon_actuator.xml +33 -0
- mujoco_usd_converter-0.1.0/tests/data/tendon_docs.xml +66 -0
- mujoco_usd_converter-0.1.0/tests/data/tendon_fixed_attributes.xml +56 -0
- mujoco_usd_converter-0.1.0/tests/data/tendon_pulley.xml +50 -0
- mujoco_usd_converter-0.1.0/tests/data/tendon_single_springlength.xml +28 -0
- mujoco_usd_converter-0.1.0/tests/data/tendon_spatial_anchor.xml +68 -0
- mujoco_usd_converter-0.1.0/tests/data/tendon_spatial_attributes.xml +63 -0
- mujoco_usd_converter-0.1.0/tests/data/tendon_spatial_sidesites.xml +88 -0
- mujoco_usd_converter-0.1.0/tests/data/worldgeom.xml +8 -0
- mujoco_usd_converter-0.1.0/tests/testActuators.py +290 -0
- mujoco_usd_converter-0.1.0/tests/testAssetStructure.py +389 -0
- mujoco_usd_converter-0.1.0/tests/testBodies.py +124 -0
- mujoco_usd_converter-0.1.0/tests/testCli.py +142 -0
- mujoco_usd_converter-0.1.0/tests/testDependencies.py +26 -0
- mujoco_usd_converter-0.1.0/tests/testEqualities.py +695 -0
- mujoco_usd_converter-0.1.0/tests/testExcludes.py +48 -0
- mujoco_usd_converter-0.1.0/tests/testFrames.py +36 -0
- mujoco_usd_converter-0.1.0/tests/testGeom.py +404 -0
- mujoco_usd_converter-0.1.0/tests/testGeomFitting.py +423 -0
- mujoco_usd_converter-0.1.0/tests/testGeomFittingAABB.py +423 -0
- mujoco_usd_converter-0.1.0/tests/testJoints.py +472 -0
- mujoco_usd_converter-0.1.0/tests/testMaterial.py +127 -0
- mujoco_usd_converter-0.1.0/tests/testMesh.py +81 -0
- mujoco_usd_converter-0.1.0/tests/testMeshReflection.py +38 -0
- mujoco_usd_converter-0.1.0/tests/testNumpy.py +285 -0
- mujoco_usd_converter-0.1.0/tests/testPhysicsMaterials.py +84 -0
- mujoco_usd_converter-0.1.0/tests/testScene.py +254 -0
- mujoco_usd_converter-0.1.0/tests/testSites.py +82 -0
- mujoco_usd_converter-0.1.0/tests/testTendons.py +551 -0
- mujoco_usd_converter-0.1.0/tests/testUtils.py +53 -0
- mujoco_usd_converter-0.1.0/tests/util/ConverterTestCase.py +19 -0
- mujoco_usd_converter-0.1.0/tools/analyze_menagerie_models.py +305 -0
- mujoco_usd_converter-0.1.0/tools/benchmark_menagerie.py +1031 -0
- mujoco_usd_converter-0.1.0/tools/install_mjc_schema.py +131 -0
- mujoco_usd_converter-0.1.0/tools/license_format.py +151 -0
- mujoco_usd_converter-0.1.0/tools/manage_annotations.py +217 -0
- mujoco_usd_converter-0.1.0/tools/menagerie_annotations.yaml +1236 -0
- mujoco_usd_converter-0.1.0/tools/update_markdown_for_pypi.py +90 -0
- mujoco_usd_converter-0.1.0/uv.lock +772 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @andrewkaufman @LouRohanNV
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 The Newton Developers
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
name: Bug Report
|
|
5
|
+
description: File a bug report
|
|
6
|
+
labels: ["bug"]
|
|
7
|
+
|
|
8
|
+
body:
|
|
9
|
+
- type: markdown
|
|
10
|
+
attributes:
|
|
11
|
+
value: |
|
|
12
|
+
Thanks for taking the time to fill out this bug report!
|
|
13
|
+
|
|
14
|
+
- type: input
|
|
15
|
+
id: version
|
|
16
|
+
attributes:
|
|
17
|
+
label: Version
|
|
18
|
+
description: What version of mujoco-usd-converter are you running?
|
|
19
|
+
placeholder: "example: v1.0.0"
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
|
|
23
|
+
- type: dropdown
|
|
24
|
+
id: installation_method
|
|
25
|
+
attributes:
|
|
26
|
+
label: Did you install official release artifacts or build from source?
|
|
27
|
+
options:
|
|
28
|
+
- Official release artifacts
|
|
29
|
+
- Built from Source
|
|
30
|
+
validations:
|
|
31
|
+
required: true
|
|
32
|
+
|
|
33
|
+
- type: dropdown
|
|
34
|
+
id: modifications
|
|
35
|
+
attributes:
|
|
36
|
+
label: Did you modify the sdist, whl, or source code (including the pyproject.toml or uv.lock)?
|
|
37
|
+
options:
|
|
38
|
+
- "No"
|
|
39
|
+
- "Yes"
|
|
40
|
+
validations:
|
|
41
|
+
required: true
|
|
42
|
+
|
|
43
|
+
- type: input
|
|
44
|
+
id: py_version
|
|
45
|
+
attributes:
|
|
46
|
+
label: Python Version
|
|
47
|
+
description: What version of Python are you using?
|
|
48
|
+
validations:
|
|
49
|
+
required: true
|
|
50
|
+
|
|
51
|
+
- type: input
|
|
52
|
+
id: platform
|
|
53
|
+
attributes:
|
|
54
|
+
label: Operating System
|
|
55
|
+
description: What Operating System / Platform are you using?
|
|
56
|
+
placeholder: "example: Ubuntu 22.04 Linux x86_64"
|
|
57
|
+
validations:
|
|
58
|
+
required: true
|
|
59
|
+
|
|
60
|
+
- type: textarea
|
|
61
|
+
id: description
|
|
62
|
+
attributes:
|
|
63
|
+
label: Describe the bug.
|
|
64
|
+
description: Also tell us, what did you expect to happen?
|
|
65
|
+
placeholder: XYZ occurred, I expected QRS results
|
|
66
|
+
validations:
|
|
67
|
+
required: true
|
|
68
|
+
|
|
69
|
+
- type: textarea
|
|
70
|
+
id: mvr
|
|
71
|
+
attributes:
|
|
72
|
+
label: Minimum reproducible example
|
|
73
|
+
description: Please supply a minimum reproducible example here
|
|
74
|
+
render: python
|
|
75
|
+
|
|
76
|
+
- type: textarea
|
|
77
|
+
id: logs
|
|
78
|
+
attributes:
|
|
79
|
+
label: Relevant log output
|
|
80
|
+
description: Please paste relevant error and log output here
|
|
81
|
+
render: shell
|
|
82
|
+
|
|
83
|
+
- type: checkboxes
|
|
84
|
+
id: terms
|
|
85
|
+
attributes:
|
|
86
|
+
label: Code of Conduct
|
|
87
|
+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/newton-physics/mujoco-usd-converter/blob/HEAD/CODE_OF_CONDUCT.md)
|
|
88
|
+
options:
|
|
89
|
+
- label: I agree to follow mujoco-usd-converter Code of Conduct
|
|
90
|
+
required: true
|
|
91
|
+
- label: I have searched the [open issues](https://github.com/newton-physics/mujoco-usd-converter/issues) and have found no duplicates
|
|
92
|
+
required: true
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# GitHub info on config.yml
|
|
2
|
+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
|
|
3
|
+
# Set to 'false' if you only want the templates to be used.
|
|
4
|
+
blank_issues_enabled: false
|
|
5
|
+
|
|
6
|
+
# When using discussions instead of Question issue templates,
|
|
7
|
+
# link that below to have it show up in the 'Submit Issue' page
|
|
8
|
+
contact_links:
|
|
9
|
+
- name: Ask a Question
|
|
10
|
+
url: https://github.com/newton-physics/mujoco-usd-converter/discussions
|
|
11
|
+
about: Please ask any questions here.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 The Newton Developers
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
name: Documentation
|
|
5
|
+
description: Request changes or additions to documentation
|
|
6
|
+
labels: ["documentation"]
|
|
7
|
+
|
|
8
|
+
body:
|
|
9
|
+
- type: markdown
|
|
10
|
+
attributes:
|
|
11
|
+
value: |
|
|
12
|
+
Thanks for taking the time to improve our documentation!
|
|
13
|
+
|
|
14
|
+
- type: textarea
|
|
15
|
+
id: problem
|
|
16
|
+
attributes:
|
|
17
|
+
label: Describe the changes or additions to documentation
|
|
18
|
+
placeholder: A code snippet mentions function foo(args) but I cannot find any documentation on it.
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: search_locs
|
|
24
|
+
attributes:
|
|
25
|
+
label: Where have you looked?
|
|
26
|
+
placeholder: |
|
|
27
|
+
https://github.com/newton-physics/mujoco-usd-converter/blob/main/README.md
|
|
28
|
+
|
|
29
|
+
- type: checkboxes
|
|
30
|
+
id: terms
|
|
31
|
+
attributes:
|
|
32
|
+
label: Code of Conduct
|
|
33
|
+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/newton-physics/mujoco-usd-converter/blob/HEAD/CODE_OF_CONDUCT.md)
|
|
34
|
+
options:
|
|
35
|
+
- label: I agree to follow mujoco-usd-converter Code of Conduct
|
|
36
|
+
required: true
|
|
37
|
+
- label: I have searched the [open issues](https://github.com/newton-physics/mujoco-usd-converter/issues) and have found no duplicates
|
|
38
|
+
required: true
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 The Newton Developers
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
name: Feature Request
|
|
5
|
+
description: Request new or improved functionality or changes to existing functionality
|
|
6
|
+
labels: ["enhancement"]
|
|
7
|
+
|
|
8
|
+
body:
|
|
9
|
+
- type: markdown
|
|
10
|
+
attributes:
|
|
11
|
+
value: |
|
|
12
|
+
Thanks for taking the time to fill out this feature request!
|
|
13
|
+
|
|
14
|
+
- type: dropdown
|
|
15
|
+
id: new_or_improvement
|
|
16
|
+
attributes:
|
|
17
|
+
label: Is this a new feature, an improvement, or a change to existing functionality?
|
|
18
|
+
options:
|
|
19
|
+
- New Feature
|
|
20
|
+
- Improvement
|
|
21
|
+
- Change
|
|
22
|
+
validations:
|
|
23
|
+
required: true
|
|
24
|
+
|
|
25
|
+
- type: textarea
|
|
26
|
+
id: Feature_Description
|
|
27
|
+
attributes:
|
|
28
|
+
label: Feature Description
|
|
29
|
+
description: Please provide clear description of the feature you request
|
|
30
|
+
placeholder: >
|
|
31
|
+
For new feature request, consider using the following format to describe the feature from the end-user perspective:
|
|
32
|
+
As a <persona>, I <want to>, <so that>.
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
35
|
+
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: misc
|
|
38
|
+
attributes:
|
|
39
|
+
label: Additional context or alternatives
|
|
40
|
+
description: Add any other context, code examples, references to existing implementations, or alternatives you have considered
|
|
41
|
+
|
|
42
|
+
- type: checkboxes
|
|
43
|
+
id: terms
|
|
44
|
+
attributes:
|
|
45
|
+
label: Code of Conduct
|
|
46
|
+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/newton-physics/mujoco-usd-converter/blob/HEAD/CODE_OF_CONDUCT.md)
|
|
47
|
+
options:
|
|
48
|
+
- label: I agree to follow mujoco-usd-converter Code of Conduct
|
|
49
|
+
required: true
|
|
50
|
+
- label: I have searched the [open issues](https://github.com/newton-physics/mujoco-usd-converter/issues) and have found no duplicates
|
|
51
|
+
required: true
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
<!-- Set a descriptive pull request title. -->
|
|
3
|
+
<!-- Provide a standalone description of changes in this PR. -->
|
|
4
|
+
<!-- Reference any issues relevant to this PR. -->
|
|
5
|
+
|
|
6
|
+
## Checklist
|
|
7
|
+
- [ ] I am familiar with the [Contributing Guidelines](https://github.com/newton-physics/mujoco-usd-converter/blob/HEAD/CONTRIBUTING.md).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: 'Bootstrap'
|
|
2
|
+
description: 'Bootstrap the repository'
|
|
3
|
+
inputs:
|
|
4
|
+
python-version:
|
|
5
|
+
description: 'Python version to use'
|
|
6
|
+
required: false
|
|
7
|
+
default: '3.11'
|
|
8
|
+
enable-uv-cache:
|
|
9
|
+
description: 'Enable uv cache'
|
|
10
|
+
required: false
|
|
11
|
+
default: 'true'
|
|
12
|
+
cache-dependency-glob:
|
|
13
|
+
description: 'Glob pattern for cache dependencies'
|
|
14
|
+
required: false
|
|
15
|
+
default: 'uv.lock'
|
|
16
|
+
|
|
17
|
+
runs:
|
|
18
|
+
using: "composite"
|
|
19
|
+
steps:
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ inputs.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
|
|
27
|
+
with:
|
|
28
|
+
enable-cache: ${{ inputs.enable-uv-cache }}
|
|
29
|
+
cache-dependency-glob: ${{ inputs.cache-dependency-glob }}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Benchmark
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [labeled]
|
|
6
|
+
workflow_dispatch: # Manual trigger from Actions tab
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pull-requests: write # Required to comment on PRs
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
benchmark:
|
|
14
|
+
# Run if: labeled with 'benchmark' OR manual trigger
|
|
15
|
+
if: |
|
|
16
|
+
(github.event_name == 'pull_request' && contains(github.event.label.name, 'benchmark')) ||
|
|
17
|
+
github.event_name == 'workflow_dispatch'
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout repository
|
|
21
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
22
|
+
|
|
23
|
+
- name: Bootstrap
|
|
24
|
+
uses: ./.github/actions/bootstrap
|
|
25
|
+
|
|
26
|
+
- name: Run benchmarks
|
|
27
|
+
run: uv run --group dev poe benchmark
|
|
28
|
+
|
|
29
|
+
- name: Upload benchmark results
|
|
30
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
31
|
+
with:
|
|
32
|
+
name: mujoco-usd-converter-benchmarks-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
|
|
33
|
+
path: benchmarks/*.*
|
|
34
|
+
|
|
35
|
+
- name: Comment PR with results
|
|
36
|
+
if: github.event_name == 'pull_request'
|
|
37
|
+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
|
|
38
|
+
with:
|
|
39
|
+
script: |
|
|
40
|
+
// Wait a bit for artifacts to be fully uploaded
|
|
41
|
+
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
42
|
+
|
|
43
|
+
// Get artifacts from this workflow run
|
|
44
|
+
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
45
|
+
owner: context.repo.owner,
|
|
46
|
+
repo: context.repo.repo,
|
|
47
|
+
run_id: context.runId
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Find the benchmark-results artifact (with PR number)
|
|
51
|
+
const artifactName = `benchmark-results-pr-${context.issue.number}`;
|
|
52
|
+
const benchmarkArtifact = artifacts.data.artifacts.find(a => a.name === artifactName);
|
|
53
|
+
|
|
54
|
+
let comment = `## Benchmark Results\n\n`;
|
|
55
|
+
|
|
56
|
+
if (benchmarkArtifact) {
|
|
57
|
+
const artifactUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts/${benchmarkArtifact.id}`;
|
|
58
|
+
comment += `[Download benchmark results](${artifactUrl})\n\n`;
|
|
59
|
+
} else {
|
|
60
|
+
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
|
|
61
|
+
comment += `[View workflow run](${runUrl})\n\n`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
github.rest.issues.createComment({
|
|
65
|
+
issue_number: context.issue.number,
|
|
66
|
+
owner: context.repo.owner,
|
|
67
|
+
repo: context.repo.repo,
|
|
68
|
+
body: comment
|
|
69
|
+
});
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
tags: [ '*' ]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
workflow_dispatch: # Manual trigger from Actions tab
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
pull-requests: write # Required to comment on PRs
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
21
|
+
|
|
22
|
+
- name: Bootstrap
|
|
23
|
+
uses: ./.github/actions/bootstrap
|
|
24
|
+
|
|
25
|
+
- name: Check uv lock file
|
|
26
|
+
run: uv lock --check
|
|
27
|
+
|
|
28
|
+
- name: Run linting
|
|
29
|
+
run: uv run --group dev poe lint
|
|
30
|
+
|
|
31
|
+
build:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- name: Checkout repository
|
|
35
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
36
|
+
|
|
37
|
+
- name: Bootstrap
|
|
38
|
+
uses: ./.github/actions/bootstrap
|
|
39
|
+
|
|
40
|
+
- name: Update README
|
|
41
|
+
run: uv run --group dev poe update-readme
|
|
42
|
+
|
|
43
|
+
- name: Build package
|
|
44
|
+
run: uv build
|
|
45
|
+
|
|
46
|
+
- name: Restore README
|
|
47
|
+
run: git restore README.md
|
|
48
|
+
|
|
49
|
+
- name: Upload artifacts
|
|
50
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
51
|
+
with:
|
|
52
|
+
name: mujoco-usd-converter-dist-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
|
|
53
|
+
path: dist/
|
|
54
|
+
|
|
55
|
+
test:
|
|
56
|
+
needs: build
|
|
57
|
+
strategy:
|
|
58
|
+
matrix:
|
|
59
|
+
os:
|
|
60
|
+
[
|
|
61
|
+
ubuntu-latest,
|
|
62
|
+
ubuntu-24.04-arm,
|
|
63
|
+
windows-latest,
|
|
64
|
+
]
|
|
65
|
+
runs-on: ${{ matrix.os }}
|
|
66
|
+
steps:
|
|
67
|
+
- name: Checkout repository
|
|
68
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
69
|
+
|
|
70
|
+
- name: Bootstrap
|
|
71
|
+
uses: ./.github/actions/bootstrap
|
|
72
|
+
|
|
73
|
+
- name: Download artifacts
|
|
74
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
75
|
+
with:
|
|
76
|
+
name: mujoco-usd-converter-dist-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
|
|
77
|
+
path: dist/
|
|
78
|
+
|
|
79
|
+
- name: Run tests
|
|
80
|
+
run: uv run --group dev poe test-ci
|
|
81
|
+
|
|
82
|
+
- name: Upload report artifacts
|
|
83
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
84
|
+
with:
|
|
85
|
+
name: mujoco-usd-converter-coverage-${{ matrix.os }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
|
|
86
|
+
include-hidden-files: true
|
|
87
|
+
path: |
|
|
88
|
+
${{ github.workspace }}/.coverage.xml
|
|
89
|
+
${{ github.workspace }}/.results.xml
|
|
90
|
+
|
|
91
|
+
- name: Upload test results to Codecov
|
|
92
|
+
if: ${{ !cancelled() }}
|
|
93
|
+
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
|
|
94
|
+
with:
|
|
95
|
+
files: ${{ github.workspace }}/.results.xml
|
|
96
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
97
|
+
|
|
98
|
+
- name: Upload coverage reports to Codecov
|
|
99
|
+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
|
|
100
|
+
with:
|
|
101
|
+
files: ${{ github.workspace }}/.coverage.xml
|
|
102
|
+
flags: unittests
|
|
103
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
104
|
+
|
|
105
|
+
test-package:
|
|
106
|
+
needs: build
|
|
107
|
+
strategy:
|
|
108
|
+
matrix:
|
|
109
|
+
os:
|
|
110
|
+
[
|
|
111
|
+
ubuntu-latest,
|
|
112
|
+
ubuntu-24.04-arm,
|
|
113
|
+
windows-latest,
|
|
114
|
+
]
|
|
115
|
+
runs-on: ${{ matrix.os }}
|
|
116
|
+
steps:
|
|
117
|
+
- name: Checkout repository
|
|
118
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
119
|
+
|
|
120
|
+
- name: Bootstrap
|
|
121
|
+
uses: ./.github/actions/bootstrap
|
|
122
|
+
with:
|
|
123
|
+
enable-uv-cache: 'false'
|
|
124
|
+
|
|
125
|
+
- name: Download artifacts
|
|
126
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
127
|
+
with:
|
|
128
|
+
name: mujoco-usd-converter-dist-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
|
|
129
|
+
path: dist/
|
|
130
|
+
|
|
131
|
+
- name: Test wheel installation (Linux)
|
|
132
|
+
if: runner.os == 'Linux'
|
|
133
|
+
run: |
|
|
134
|
+
# Create a fresh virtual environment to test the wheel
|
|
135
|
+
uv venv /tmp/wheel_test_env
|
|
136
|
+
source /tmp/wheel_test_env/bin/activate
|
|
137
|
+
|
|
138
|
+
# Install the wheel directly using uv
|
|
139
|
+
uv pip install --index-strategy unsafe-best-match dist/*.whl
|
|
140
|
+
|
|
141
|
+
# Test conversion
|
|
142
|
+
mkdir -p /tmp/test_outputs
|
|
143
|
+
mujoco_usd_converter tests/data/geoms.xml /tmp/test_outputs/geoms_output
|
|
144
|
+
|
|
145
|
+
- name: Test wheel installation (Windows)
|
|
146
|
+
if: runner.os == 'Windows'
|
|
147
|
+
shell: powershell
|
|
148
|
+
run: |
|
|
149
|
+
# Create a fresh virtual environment to test the wheel
|
|
150
|
+
uv venv wheel_test_env
|
|
151
|
+
wheel_test_env\Scripts\activate.ps1
|
|
152
|
+
|
|
153
|
+
# Find and install the wheel file
|
|
154
|
+
$wheelFile = Get-ChildItem -Path "dist" -Filter "*.whl" | Select-Object -First 1
|
|
155
|
+
uv pip install --index-strategy unsafe-best-match $wheelFile.FullName
|
|
156
|
+
|
|
157
|
+
# Test conversion
|
|
158
|
+
New-Item -ItemType Directory -Force -Path test_outputs
|
|
159
|
+
mujoco_usd_converter tests/data/geoms.xml test_outputs\geoms_output
|
|
160
|
+
|
|
161
|
+
deploy:
|
|
162
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
163
|
+
needs:
|
|
164
|
+
- build
|
|
165
|
+
- test
|
|
166
|
+
- test-package
|
|
167
|
+
runs-on: ubuntu-latest
|
|
168
|
+
environment:
|
|
169
|
+
name: pypi
|
|
170
|
+
url: https://pypi.org/p/mujoco-usd-converter
|
|
171
|
+
permissions:
|
|
172
|
+
id-token: write
|
|
173
|
+
steps:
|
|
174
|
+
- name: Download wheel and source tarball
|
|
175
|
+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
|
176
|
+
with:
|
|
177
|
+
name: mujoco-usd-converter-dist-${{ github.ref_name }}
|
|
178
|
+
path: dist/
|
|
179
|
+
- name: Publish distribution to PyPI
|
|
180
|
+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# build environment
|
|
2
|
+
.*venv
|
|
3
|
+
.coverage
|
|
4
|
+
.coverage.xml
|
|
5
|
+
.results.xml
|
|
6
|
+
|
|
7
|
+
# editor files
|
|
8
|
+
.vscode/launch.json
|
|
9
|
+
|
|
10
|
+
# generated files
|
|
11
|
+
*.pyc
|
|
12
|
+
tests/output/*
|
|
13
|
+
benchmarks/*
|
|
14
|
+
|
|
15
|
+
# installation artifacts
|
|
16
|
+
dist
|
|
17
|
+
mujoco_usd_converter/plugins/mjcPhysics
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.rulers": [150],
|
|
3
|
+
"files.trimTrailingWhitespace": true,
|
|
4
|
+
"files.trimFinalNewlines": true,
|
|
5
|
+
"diffEditor.ignoreTrimWhitespace": false,
|
|
6
|
+
"python.analysis.extraPaths": [
|
|
7
|
+
".venv/lib/python3.10/site-packages",
|
|
8
|
+
".venv/Lib/site-packages",
|
|
9
|
+
],
|
|
10
|
+
"python.languageServer": "Pylance",
|
|
11
|
+
"isort.args": ["--profile", "black"],
|
|
12
|
+
"flake8.args": [
|
|
13
|
+
"--max-line-length=150",
|
|
14
|
+
"--ignore=F405"
|
|
15
|
+
]
|
|
16
|
+
}
|