jaxsim 0.8.2.dev32__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.
- jaxsim-0.8.2.dev32/.devcontainer/Dockerfile +19 -0
- jaxsim-0.8.2.dev32/.devcontainer/devcontainer.json +51 -0
- jaxsim-0.8.2.dev32/.gitattributes +2 -0
- jaxsim-0.8.2.dev32/.github/CODEOWNERS +1 -0
- jaxsim-0.8.2.dev32/.github/dependabot.yml +15 -0
- jaxsim-0.8.2.dev32/.github/release.yml +6 -0
- jaxsim-0.8.2.dev32/.github/workflows/ci_cd.yml +154 -0
- jaxsim-0.8.2.dev32/.github/workflows/gpu_benchmark.yml +111 -0
- jaxsim-0.8.2.dev32/.github/workflows/pixi.yml +59 -0
- jaxsim-0.8.2.dev32/.github/workflows/read_the_docs.yml +18 -0
- jaxsim-0.8.2.dev32/.gitignore +153 -0
- jaxsim-0.8.2.dev32/.pre-commit-config.yaml +55 -0
- jaxsim-0.8.2.dev32/.readthedocs.yaml +19 -0
- jaxsim-0.8.2.dev32/CONTRIBUTING.md +74 -0
- jaxsim-0.8.2.dev32/LICENSE +29 -0
- jaxsim-0.8.2.dev32/PKG-INFO +404 -0
- jaxsim-0.8.2.dev32/README.md +339 -0
- jaxsim-0.8.2.dev32/docs/Makefile +16 -0
- jaxsim-0.8.2.dev32/docs/conf.py +120 -0
- jaxsim-0.8.2.dev32/docs/examples.rst +61 -0
- jaxsim-0.8.2.dev32/docs/guide/configuration.rst +69 -0
- jaxsim-0.8.2.dev32/docs/guide/install.rst +36 -0
- jaxsim-0.8.2.dev32/docs/index.rst +137 -0
- jaxsim-0.8.2.dev32/docs/make.bat +36 -0
- jaxsim-0.8.2.dev32/docs/modules/api.rst +110 -0
- jaxsim-0.8.2.dev32/docs/modules/math.rst +28 -0
- jaxsim-0.8.2.dev32/docs/modules/mujoco.rst +27 -0
- jaxsim-0.8.2.dev32/docs/modules/parsers.rst +14 -0
- jaxsim-0.8.2.dev32/docs/modules/rbda.rst +48 -0
- jaxsim-0.8.2.dev32/docs/modules/typing.rst +18 -0
- jaxsim-0.8.2.dev32/docs/modules/utils.rst +10 -0
- jaxsim-0.8.2.dev32/environment.yml +65 -0
- jaxsim-0.8.2.dev32/examples/.gitattributes +2 -0
- jaxsim-0.8.2.dev32/examples/.gitignore +2 -0
- jaxsim-0.8.2.dev32/examples/README.md +45 -0
- jaxsim-0.8.2.dev32/examples/assets/build_cartpole_urdf.py +202 -0
- jaxsim-0.8.2.dev32/examples/assets/cartpole.urdf +92 -0
- jaxsim-0.8.2.dev32/examples/jaxsim_as_multibody_dynamics_library.ipynb +921 -0
- jaxsim-0.8.2.dev32/examples/jaxsim_as_physics_engine.ipynb +282 -0
- jaxsim-0.8.2.dev32/examples/jaxsim_as_physics_engine_advanced.ipynb +470 -0
- jaxsim-0.8.2.dev32/examples/jaxsim_for_robot_controllers.ipynb +466 -0
- jaxsim-0.8.2.dev32/pixi.lock +3 -0
- jaxsim-0.8.2.dev32/pyproject.toml +296 -0
- jaxsim-0.8.2.dev32/setup.cfg +4 -0
- jaxsim-0.8.2.dev32/src/jaxsim/__init__.py +121 -0
- jaxsim-0.8.2.dev32/src/jaxsim/_version.py +34 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/__init__.py +14 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/actuation_model.py +126 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/com.py +421 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/common.py +222 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/contact.py +603 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/data.py +682 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/frame.py +471 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/integrators.py +272 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/joint.py +277 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/kin_dyn_parameters.py +1347 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/link.py +461 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/model.py +2664 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/ode.py +225 -0
- jaxsim-0.8.2.dev32/src/jaxsim/api/references.py +546 -0
- jaxsim-0.8.2.dev32/src/jaxsim/exceptions.py +80 -0
- jaxsim-0.8.2.dev32/src/jaxsim/logging.py +107 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/__init__.py +14 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/adjoint.py +160 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/cross.py +58 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/inertia.py +63 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/joint_model.py +200 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/quaternion.py +169 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/rotation.py +98 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/skew.py +58 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/transform.py +95 -0
- jaxsim-0.8.2.dev32/src/jaxsim/math/utils.py +58 -0
- jaxsim-0.8.2.dev32/src/jaxsim/mujoco/__init__.py +4 -0
- jaxsim-0.8.2.dev32/src/jaxsim/mujoco/__main__.py +192 -0
- jaxsim-0.8.2.dev32/src/jaxsim/mujoco/loaders.py +707 -0
- jaxsim-0.8.2.dev32/src/jaxsim/mujoco/model.py +482 -0
- jaxsim-0.8.2.dev32/src/jaxsim/mujoco/utils.py +231 -0
- jaxsim-0.8.2.dev32/src/jaxsim/mujoco/visualizer.py +385 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/__init__.py +0 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/descriptions/__init__.py +10 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/descriptions/collision.py +178 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/descriptions/joint.py +130 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/descriptions/link.py +115 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/descriptions/model.py +282 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/kinematic_graph.py +980 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/rod/__init__.py +2 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/rod/meshes.py +104 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/rod/parser.py +420 -0
- jaxsim-0.8.2.dev32/src/jaxsim/parsers/rod/utils.py +280 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/__init__.py +13 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/aba.py +292 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/actuation/__init__.py +1 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/actuation/common.py +19 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/collidable_points.py +65 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/contacts/__init__.py +9 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/contacts/common.py +291 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/contacts/relaxed_rigid.py +653 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/contacts/rigid.py +539 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/contacts/soft.py +444 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/crba.py +170 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/forward_kinematics.py +113 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/jacobian.py +339 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/kinematic_constraints.py +345 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/mass_inverse.py +233 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/rnea.py +238 -0
- jaxsim-0.8.2.dev32/src/jaxsim/rbda/utils.py +166 -0
- jaxsim-0.8.2.dev32/src/jaxsim/terrain/__init__.py +2 -0
- jaxsim-0.8.2.dev32/src/jaxsim/terrain/terrain.py +238 -0
- jaxsim-0.8.2.dev32/src/jaxsim/typing.py +39 -0
- jaxsim-0.8.2.dev32/src/jaxsim/utils/__init__.py +5 -0
- jaxsim-0.8.2.dev32/src/jaxsim/utils/jaxsim_dataclass.py +368 -0
- jaxsim-0.8.2.dev32/src/jaxsim/utils/tracing.py +19 -0
- jaxsim-0.8.2.dev32/src/jaxsim/utils/wrappers.py +159 -0
- jaxsim-0.8.2.dev32/src/jaxsim.egg-info/PKG-INFO +404 -0
- jaxsim-0.8.2.dev32/src/jaxsim.egg-info/SOURCES.txt +137 -0
- jaxsim-0.8.2.dev32/src/jaxsim.egg-info/dependency_links.txt +1 -0
- jaxsim-0.8.2.dev32/src/jaxsim.egg-info/requires.txt +37 -0
- jaxsim-0.8.2.dev32/src/jaxsim.egg-info/top_level.txt +1 -0
- jaxsim-0.8.2.dev32/tests/__init__.py +0 -0
- jaxsim-0.8.2.dev32/tests/assets/4_bar_opened.urdf +137 -0
- jaxsim-0.8.2.dev32/tests/assets/double_pendulum.sdf +172 -0
- jaxsim-0.8.2.dev32/tests/conftest.py +912 -0
- jaxsim-0.8.2.dev32/tests/test_actuation.py +48 -0
- jaxsim-0.8.2.dev32/tests/test_api_com.py +73 -0
- jaxsim-0.8.2.dev32/tests/test_api_contact.py +201 -0
- jaxsim-0.8.2.dev32/tests/test_api_data.py +122 -0
- jaxsim-0.8.2.dev32/tests/test_api_frame.py +301 -0
- jaxsim-0.8.2.dev32/tests/test_api_joint.py +48 -0
- jaxsim-0.8.2.dev32/tests/test_api_link.py +383 -0
- jaxsim-0.8.2.dev32/tests/test_api_model.py +577 -0
- jaxsim-0.8.2.dev32/tests/test_api_model_hw_parametrization.py +740 -0
- jaxsim-0.8.2.dev32/tests/test_automatic_differentiation.py +519 -0
- jaxsim-0.8.2.dev32/tests/test_benchmark.py +212 -0
- jaxsim-0.8.2.dev32/tests/test_exceptions.py +82 -0
- jaxsim-0.8.2.dev32/tests/test_meshes.py +103 -0
- jaxsim-0.8.2.dev32/tests/test_pytree.py +76 -0
- jaxsim-0.8.2.dev32/tests/test_simulations.py +618 -0
- jaxsim-0.8.2.dev32/tests/test_visualizer.py +64 -0
- jaxsim-0.8.2.dev32/tests/utils.py +509 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1.4
|
|
2
|
+
FROM mcr.microsoft.com/devcontainers/base:jammy
|
|
3
|
+
|
|
4
|
+
ARG PROJECT_NAME=jaxsim
|
|
5
|
+
ARG PIXI_VERSION=v0.35.0
|
|
6
|
+
|
|
7
|
+
RUN curl -o /usr/local/bin/pixi -SL https://github.com/prefix-dev/pixi/releases/download/${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl \
|
|
8
|
+
&& chmod +x /usr/local/bin/pixi \
|
|
9
|
+
&& pixi info
|
|
10
|
+
|
|
11
|
+
# Add LFS repository and install.
|
|
12
|
+
RUN apt-get update && apt-get install -y curl \
|
|
13
|
+
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \
|
|
14
|
+
&& apt install -y git-lfs
|
|
15
|
+
|
|
16
|
+
USER vscode
|
|
17
|
+
WORKDIR /home/vscode
|
|
18
|
+
|
|
19
|
+
RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
2
|
+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
|
|
3
|
+
{
|
|
4
|
+
"name": "Ubuntu",
|
|
5
|
+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
|
6
|
+
"build": {
|
|
7
|
+
"context": "..",
|
|
8
|
+
"dockerfile": "Dockerfile"
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
// Features to add to the dev container. More info: https://containers.dev/features.
|
|
12
|
+
"features": {
|
|
13
|
+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
// Put `.pixi` folder in a mounted volume of a case-insensitive filesystem.
|
|
17
|
+
"mounts": ["source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"],
|
|
18
|
+
|
|
19
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
20
|
+
// "forwardPorts": [],
|
|
21
|
+
|
|
22
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
|
23
|
+
"postCreateCommand": "sudo chown vscode .pixi && git lfs pull --include='pixi.lock' && pixi install --environment=test-cpu",
|
|
24
|
+
|
|
25
|
+
// Configure tool-specific properties.
|
|
26
|
+
// "customizations": {},
|
|
27
|
+
|
|
28
|
+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
|
29
|
+
// "remoteUser": "root"
|
|
30
|
+
|
|
31
|
+
// VSCode extensions
|
|
32
|
+
"customizations": {
|
|
33
|
+
"vscode": {
|
|
34
|
+
"settings": {
|
|
35
|
+
"python.pythonPath": "/workspaces/jaxsim/.pixi/envs/test-cpu/bin/python",
|
|
36
|
+
"python.defaultInterpreterPath": "/workspaces/jaxsim/.pixi/envs/test-cpu/bin/python",
|
|
37
|
+
"python.terminal.activateEnvironment": true,
|
|
38
|
+
"python.terminal.activateEnvInCurrentTerminal": true
|
|
39
|
+
},
|
|
40
|
+
"extensions": [
|
|
41
|
+
"ms-python.python",
|
|
42
|
+
"donjayamanne.python-extension-pack",
|
|
43
|
+
"ms-toolsai.jupyter",
|
|
44
|
+
"GitHub.codespaces",
|
|
45
|
+
"GitHub.copilot",
|
|
46
|
+
"ms-azuretools.vscode-docker",
|
|
47
|
+
"charliermarsh.ruff"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @flferretti @xela-95
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
|
|
4
|
+
# Check for updates to GitHub Actions every month.
|
|
5
|
+
- package-ecosystem: github-actions
|
|
6
|
+
directory: /
|
|
7
|
+
schedule:
|
|
8
|
+
interval: monthly
|
|
9
|
+
# Disable rebasing automatically existing pull requests.
|
|
10
|
+
rebase-strategy: "disabled"
|
|
11
|
+
# Group updates to a single PR.
|
|
12
|
+
groups:
|
|
13
|
+
dependencies:
|
|
14
|
+
patterns:
|
|
15
|
+
- '*'
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
name: Python CI/CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
pull_request:
|
|
7
|
+
release:
|
|
8
|
+
types:
|
|
9
|
+
- published
|
|
10
|
+
schedule:
|
|
11
|
+
# Execute a nightly build at 2am UTC.
|
|
12
|
+
- cron: '0 2 * * *'
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
|
|
17
|
+
package:
|
|
18
|
+
name: Package the project
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.11"
|
|
31
|
+
|
|
32
|
+
- name: Install Python tools
|
|
33
|
+
run: pip install build twine
|
|
34
|
+
|
|
35
|
+
- name: Create distributions
|
|
36
|
+
run: python -m build -o dist/
|
|
37
|
+
|
|
38
|
+
- name: Inspect dist folder
|
|
39
|
+
run: ls -lah dist/
|
|
40
|
+
|
|
41
|
+
- name: Check wheel's abi and platform tags
|
|
42
|
+
run: test $(find dist/ -name *-none-any.whl | wc -l) -gt 0
|
|
43
|
+
|
|
44
|
+
- name: Run twine check
|
|
45
|
+
run: twine check dist/*
|
|
46
|
+
|
|
47
|
+
- name: Upload artifacts
|
|
48
|
+
uses: actions/upload-artifact@v5
|
|
49
|
+
with:
|
|
50
|
+
path: dist/*
|
|
51
|
+
name: dist
|
|
52
|
+
|
|
53
|
+
test:
|
|
54
|
+
name: 'Python${{ matrix.python }}@${{ matrix.os }}'
|
|
55
|
+
needs: package
|
|
56
|
+
runs-on: ${{ matrix.os }}
|
|
57
|
+
strategy:
|
|
58
|
+
fail-fast: false
|
|
59
|
+
matrix:
|
|
60
|
+
os:
|
|
61
|
+
- ubuntu-latest
|
|
62
|
+
- macos-latest
|
|
63
|
+
- windows-latest
|
|
64
|
+
python:
|
|
65
|
+
- "3.10"
|
|
66
|
+
- "3.11"
|
|
67
|
+
- "3.12"
|
|
68
|
+
- "3.13"
|
|
69
|
+
|
|
70
|
+
steps:
|
|
71
|
+
|
|
72
|
+
- name: Set up Python
|
|
73
|
+
uses: actions/setup-python@v6
|
|
74
|
+
with:
|
|
75
|
+
python-version: ${{ matrix.python }}
|
|
76
|
+
|
|
77
|
+
- name: Download Python packages
|
|
78
|
+
uses: actions/download-artifact@v6
|
|
79
|
+
with:
|
|
80
|
+
path: dist
|
|
81
|
+
name: dist
|
|
82
|
+
|
|
83
|
+
- name: Install wheel (ubuntu)
|
|
84
|
+
if: contains(matrix.os, 'ubuntu')
|
|
85
|
+
shell: bash
|
|
86
|
+
run: pip install "$(find dist/ -type f -name '*.whl')"
|
|
87
|
+
|
|
88
|
+
- name: Install wheel (macos|windows)
|
|
89
|
+
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
|
|
90
|
+
shell: bash
|
|
91
|
+
run: pip install "$(find dist/ -type f -name '*.whl')"
|
|
92
|
+
|
|
93
|
+
- name: Document installed pip packages
|
|
94
|
+
shell: bash
|
|
95
|
+
run: pip list --verbose
|
|
96
|
+
|
|
97
|
+
- name: Import the package
|
|
98
|
+
run: python -c "import jaxsim"
|
|
99
|
+
|
|
100
|
+
- uses: actions/checkout@v6
|
|
101
|
+
with:
|
|
102
|
+
lfs: true
|
|
103
|
+
|
|
104
|
+
- uses: prefix-dev/setup-pixi@v0.9.3
|
|
105
|
+
if: contains(matrix.os, 'ubuntu')
|
|
106
|
+
with:
|
|
107
|
+
pixi-version: "latest"
|
|
108
|
+
frozen: true
|
|
109
|
+
cache: true
|
|
110
|
+
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
|
|
111
|
+
|
|
112
|
+
- name: Ensure version file is written
|
|
113
|
+
if: |
|
|
114
|
+
contains(matrix.os, 'ubuntu') &&
|
|
115
|
+
(github.event_name != 'pull_request')
|
|
116
|
+
run: |
|
|
117
|
+
pixi run --frozen python -m setuptools_scm --force-write-version-file
|
|
118
|
+
|
|
119
|
+
- name: Run the Python tests
|
|
120
|
+
if: |
|
|
121
|
+
contains(matrix.os, 'ubuntu') &&
|
|
122
|
+
(github.event_name != 'pull_request')
|
|
123
|
+
run: pixi run --frozen test --numprocesses auto
|
|
124
|
+
env:
|
|
125
|
+
# https://github.com/pytest-dev/pytest/issues/7443#issuecomment-656642591
|
|
126
|
+
PY_COLORS: "1"
|
|
127
|
+
JAX_PLATFORM_NAME: cpu
|
|
128
|
+
|
|
129
|
+
publish:
|
|
130
|
+
name: Publish to PyPI
|
|
131
|
+
needs: test
|
|
132
|
+
runs-on: ubuntu-latest
|
|
133
|
+
permissions:
|
|
134
|
+
id-token: write
|
|
135
|
+
|
|
136
|
+
steps:
|
|
137
|
+
|
|
138
|
+
- name: Download Python packages
|
|
139
|
+
uses: actions/download-artifact@v6
|
|
140
|
+
with:
|
|
141
|
+
path: dist
|
|
142
|
+
name: dist
|
|
143
|
+
|
|
144
|
+
- name: Inspect dist folder
|
|
145
|
+
run: ls -lah dist/
|
|
146
|
+
|
|
147
|
+
- name: Publish to PyPI
|
|
148
|
+
if: |
|
|
149
|
+
github.repository == 'ami-iit/jaxsim' &&
|
|
150
|
+
((github.event_name == 'push' && github.ref == 'refs/heads/main') ||
|
|
151
|
+
(github.event_name == 'release'))
|
|
152
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
153
|
+
with:
|
|
154
|
+
skip-existing: true
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
name: GPU Benchmarks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, reopened, synchronize]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
schedule:
|
|
11
|
+
- cron: "0 0 * * 1" # Run At 00:00 on Monday
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
pull-requests: write
|
|
15
|
+
deployments: write
|
|
16
|
+
contents: write
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
benchmark:
|
|
20
|
+
runs-on: self-hosted
|
|
21
|
+
container:
|
|
22
|
+
image: ghcr.io/prefix-dev/pixi:0.46.0-noble@sha256:c12bcbe8ba5dfd71867495d3471b95a6993b79cc7de7eafec016f8f59e4e4961
|
|
23
|
+
options: --rm --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -e "TERM=xterm-256color"
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Install Git and Git-LFS
|
|
27
|
+
run: |
|
|
28
|
+
apt update && apt install -y git git-lfs
|
|
29
|
+
|
|
30
|
+
- name: Checkout repository
|
|
31
|
+
uses: actions/checkout@v6
|
|
32
|
+
with:
|
|
33
|
+
lfs: true
|
|
34
|
+
fetch-depth: 0
|
|
35
|
+
|
|
36
|
+
- name: Fetch pixi.lock from LFS
|
|
37
|
+
run: |
|
|
38
|
+
git config --global safe.directory /__w/jaxsim/jaxsim
|
|
39
|
+
git lfs checkout pixi.lock
|
|
40
|
+
|
|
41
|
+
- name: Get main branch SHA
|
|
42
|
+
id: get-main-branch-sha
|
|
43
|
+
run: |
|
|
44
|
+
SHA=$(git rev-parse origin/main)
|
|
45
|
+
echo "sha=$SHA" >> $GITHUB_OUTPUT
|
|
46
|
+
|
|
47
|
+
- name: Get benchmark results from main branch
|
|
48
|
+
id: cache
|
|
49
|
+
uses: actions/cache/restore@v4
|
|
50
|
+
with:
|
|
51
|
+
path: ./cache
|
|
52
|
+
key: ${{ runner.os }}-benchmark
|
|
53
|
+
|
|
54
|
+
- name: Ensure version file is written
|
|
55
|
+
run: |
|
|
56
|
+
pixi run --frozen --environment gpu python -m setuptools_scm --force-write-version-file
|
|
57
|
+
|
|
58
|
+
- name: Run benchmark and store result
|
|
59
|
+
run: |
|
|
60
|
+
pixi run --frozen --environment gpu benchmark --batch-size 128 --benchmark-json output.json
|
|
61
|
+
env:
|
|
62
|
+
PY_COLORS: "1"
|
|
63
|
+
|
|
64
|
+
- name: Compare benchmark results with main branch
|
|
65
|
+
uses: benchmark-action/github-action-benchmark@v1.20.7
|
|
66
|
+
with:
|
|
67
|
+
tool: 'pytest'
|
|
68
|
+
output-file-path: output.json
|
|
69
|
+
external-data-json-path: ./cache/benchmark-data.json
|
|
70
|
+
save-data-file: false
|
|
71
|
+
fail-on-alert: true
|
|
72
|
+
summary-always: true
|
|
73
|
+
comment-always: true
|
|
74
|
+
alert-threshold: 150%
|
|
75
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
76
|
+
|
|
77
|
+
- name: Store benchmark result for main branch
|
|
78
|
+
uses: benchmark-action/github-action-benchmark@v1.20.7
|
|
79
|
+
if: ${{ github.ref_name == 'main' }}
|
|
80
|
+
with:
|
|
81
|
+
tool: 'pytest'
|
|
82
|
+
output-file-path: output.json
|
|
83
|
+
external-data-json-path: ./cache/benchmark-data.json
|
|
84
|
+
save-data-file: true
|
|
85
|
+
fail-on-alert: false
|
|
86
|
+
summary-always: true
|
|
87
|
+
comment-always: true
|
|
88
|
+
alert-threshold: 150%
|
|
89
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
90
|
+
|
|
91
|
+
- name: Publish Benchmark Results to GitHub Pages
|
|
92
|
+
uses: benchmark-action/github-action-benchmark@v1.20.7
|
|
93
|
+
if: ${{ github.ref_name == 'main' }}
|
|
94
|
+
with:
|
|
95
|
+
tool: 'pytest'
|
|
96
|
+
output-file-path: output.json
|
|
97
|
+
benchmark-data-dir-path: "benchmarks"
|
|
98
|
+
fail-on-alert: false
|
|
99
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
100
|
+
comment-on-alert: true
|
|
101
|
+
summary-always: true
|
|
102
|
+
save-data-file: true
|
|
103
|
+
alert-threshold: "150%"
|
|
104
|
+
auto-push: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
|
|
105
|
+
|
|
106
|
+
- name: Update Benchmark Results cache
|
|
107
|
+
uses: actions/cache/save@v4
|
|
108
|
+
if: ${{ github.ref_name == 'main' }}
|
|
109
|
+
with:
|
|
110
|
+
path: ./cache
|
|
111
|
+
key: ${{ runner.os }}-benchmark
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: Pixi
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
pull-requests: write
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
schedule:
|
|
10
|
+
# Execute at 5am UTC on the first day of the month.
|
|
11
|
+
- cron: '0 5 1 * *'
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
|
|
15
|
+
pixi-update:
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
with:
|
|
22
|
+
lfs: true
|
|
23
|
+
|
|
24
|
+
- name: Set up pixi
|
|
25
|
+
uses: prefix-dev/setup-pixi@v0.9.3
|
|
26
|
+
with:
|
|
27
|
+
run-install: false
|
|
28
|
+
|
|
29
|
+
- name: Install pixi-diff-to-markdown
|
|
30
|
+
run: pixi global install pixi-diff-to-markdown
|
|
31
|
+
|
|
32
|
+
- name: Update pixi lockfile and generate diff
|
|
33
|
+
run: |
|
|
34
|
+
set -o pipefail
|
|
35
|
+
pixi update --json | pixi exec pixi-diff-to-markdown --explicit-column > diff.md
|
|
36
|
+
|
|
37
|
+
- name: Test project against updated pixi
|
|
38
|
+
run: pixi run --environment default test
|
|
39
|
+
env:
|
|
40
|
+
PY_COLORS: "1"
|
|
41
|
+
JAX_PLATFORM_NAME: cpu
|
|
42
|
+
|
|
43
|
+
- name: Commit and push changes
|
|
44
|
+
run: echo "BRANCH_NAME=update-pixi-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
|
|
45
|
+
|
|
46
|
+
- name: Create pull request
|
|
47
|
+
uses: peter-evans/create-pull-request@v7
|
|
48
|
+
with:
|
|
49
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
+
commit-message: Update `pixi.lock`
|
|
51
|
+
title: Update `pixi` lockfile
|
|
52
|
+
body-path: diff.md
|
|
53
|
+
branch: ${{ env.BRANCH_NAME }}
|
|
54
|
+
base: main
|
|
55
|
+
labels: pixi
|
|
56
|
+
add-paths: pixi.lock
|
|
57
|
+
delete-branch: true
|
|
58
|
+
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
59
|
+
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Read the Docs PR
|
|
2
|
+
on:
|
|
3
|
+
pull_request_target:
|
|
4
|
+
types:
|
|
5
|
+
- opened
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
pull-requests: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
|
|
12
|
+
documentation-links:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: readthedocs/actions/preview@v1
|
|
16
|
+
with:
|
|
17
|
+
project-slug: "jaxsim"
|
|
18
|
+
project-language: ""
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# IDEs
|
|
2
|
+
.idea*
|
|
3
|
+
.vscode/
|
|
4
|
+
|
|
5
|
+
# Matlab
|
|
6
|
+
*.m~
|
|
7
|
+
|
|
8
|
+
# Byte-compiled / optimized / DLL files
|
|
9
|
+
__pycache__/
|
|
10
|
+
*.py[cod]
|
|
11
|
+
*$py.class
|
|
12
|
+
|
|
13
|
+
# C extensions
|
|
14
|
+
*.so
|
|
15
|
+
|
|
16
|
+
# Distribution / packaging
|
|
17
|
+
.Python
|
|
18
|
+
build/
|
|
19
|
+
develop-eggs/
|
|
20
|
+
dist/
|
|
21
|
+
downloads/
|
|
22
|
+
eggs/
|
|
23
|
+
.eggs/
|
|
24
|
+
lib/
|
|
25
|
+
lib64/
|
|
26
|
+
parts/
|
|
27
|
+
sdist/
|
|
28
|
+
var/
|
|
29
|
+
wheels/
|
|
30
|
+
pip-wheel-metadata/
|
|
31
|
+
share/python-wheels/
|
|
32
|
+
*.egg-info/
|
|
33
|
+
.installed.cfg
|
|
34
|
+
*.egg
|
|
35
|
+
MANIFEST
|
|
36
|
+
|
|
37
|
+
# PyInstaller
|
|
38
|
+
# Usually these files are written by a python script from a template
|
|
39
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
40
|
+
*.manifest
|
|
41
|
+
*.spec
|
|
42
|
+
|
|
43
|
+
# Installer logs
|
|
44
|
+
pip-log.txt
|
|
45
|
+
pip-delete-this-directory.txt
|
|
46
|
+
|
|
47
|
+
# Unit test / coverage reports
|
|
48
|
+
htmlcov/
|
|
49
|
+
.tox/
|
|
50
|
+
.nox/
|
|
51
|
+
.coverage
|
|
52
|
+
.coverage.*
|
|
53
|
+
.cache
|
|
54
|
+
nosetests.xml
|
|
55
|
+
coverage.xml
|
|
56
|
+
*.cover
|
|
57
|
+
*.py,cover
|
|
58
|
+
.hypothesis/
|
|
59
|
+
.pytest_cache/
|
|
60
|
+
|
|
61
|
+
# Translations
|
|
62
|
+
*.mo
|
|
63
|
+
*.pot
|
|
64
|
+
|
|
65
|
+
# Django stuff:
|
|
66
|
+
*.log
|
|
67
|
+
local_settings.py
|
|
68
|
+
db.sqlite3
|
|
69
|
+
db.sqlite3-journal
|
|
70
|
+
|
|
71
|
+
# Flask stuff:
|
|
72
|
+
instance/
|
|
73
|
+
.webassets-cache
|
|
74
|
+
|
|
75
|
+
# Scrapy stuff:
|
|
76
|
+
.scrapy
|
|
77
|
+
|
|
78
|
+
# Sphinx documentation
|
|
79
|
+
docs/_build/
|
|
80
|
+
docs/_collections/
|
|
81
|
+
docs/modules/_autosummary/
|
|
82
|
+
docs/modules/generated
|
|
83
|
+
docs/sg_execution_times.rst
|
|
84
|
+
|
|
85
|
+
# PyBuilder
|
|
86
|
+
target/
|
|
87
|
+
|
|
88
|
+
# Jupyter Notebook
|
|
89
|
+
.ipynb_checkpoints
|
|
90
|
+
|
|
91
|
+
# IPython
|
|
92
|
+
profile_default/
|
|
93
|
+
ipython_config.py
|
|
94
|
+
|
|
95
|
+
# pyenv
|
|
96
|
+
.python-version
|
|
97
|
+
|
|
98
|
+
# pipenv
|
|
99
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
100
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
101
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
102
|
+
# install all needed dependencies.
|
|
103
|
+
#Pipfile.lock
|
|
104
|
+
|
|
105
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
106
|
+
__pypackages__/
|
|
107
|
+
|
|
108
|
+
# Celery stuff
|
|
109
|
+
celerybeat-schedule
|
|
110
|
+
celerybeat.pid
|
|
111
|
+
|
|
112
|
+
# SageMath parsed files
|
|
113
|
+
*.sage.py
|
|
114
|
+
|
|
115
|
+
# Environments
|
|
116
|
+
.env
|
|
117
|
+
.venv
|
|
118
|
+
env/
|
|
119
|
+
venv/
|
|
120
|
+
ENV/
|
|
121
|
+
env.bak/
|
|
122
|
+
venv.bak/
|
|
123
|
+
|
|
124
|
+
# Spyder project settings
|
|
125
|
+
.spyderproject
|
|
126
|
+
.spyproject
|
|
127
|
+
|
|
128
|
+
# Rope project settings
|
|
129
|
+
.ropeproject
|
|
130
|
+
|
|
131
|
+
# mkdocs documentation
|
|
132
|
+
/site
|
|
133
|
+
|
|
134
|
+
# mypy
|
|
135
|
+
.mypy_cache/
|
|
136
|
+
.dmypy.json
|
|
137
|
+
dmypy.json
|
|
138
|
+
|
|
139
|
+
# Pyre type checker
|
|
140
|
+
.pyre/
|
|
141
|
+
|
|
142
|
+
# setuptools_scm dynamic version
|
|
143
|
+
src/jaxsim/_version.py
|
|
144
|
+
|
|
145
|
+
# ruff
|
|
146
|
+
.ruff_cache/
|
|
147
|
+
|
|
148
|
+
# pixi environments
|
|
149
|
+
.pixi
|
|
150
|
+
|
|
151
|
+
# data
|
|
152
|
+
.mp4
|
|
153
|
+
.png
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autofix_prs: false
|
|
3
|
+
autoupdate_schedule: quarterly
|
|
4
|
+
submodules: false
|
|
5
|
+
|
|
6
|
+
default_language_version:
|
|
7
|
+
python: python3
|
|
8
|
+
|
|
9
|
+
repos:
|
|
10
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
11
|
+
rev: v6.0.0
|
|
12
|
+
hooks:
|
|
13
|
+
- id: check-ast
|
|
14
|
+
- id: check-merge-conflict
|
|
15
|
+
- id: check-yaml
|
|
16
|
+
- id: end-of-file-fixer
|
|
17
|
+
- id: trailing-whitespace
|
|
18
|
+
- id: check-toml
|
|
19
|
+
- id: check-added-large-files
|
|
20
|
+
args: ["--maxkb=2000"]
|
|
21
|
+
|
|
22
|
+
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
23
|
+
rev: 25.9.0
|
|
24
|
+
hooks:
|
|
25
|
+
- id: black
|
|
26
|
+
args: ["--check", "--diff"]
|
|
27
|
+
|
|
28
|
+
- repo: https://github.com/pycqa/isort
|
|
29
|
+
rev: 6.1.0
|
|
30
|
+
hooks:
|
|
31
|
+
- id: isort
|
|
32
|
+
args: ["--check", "--diff"]
|
|
33
|
+
|
|
34
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
35
|
+
rev: v1.10.0
|
|
36
|
+
hooks:
|
|
37
|
+
- id: rst-backticks
|
|
38
|
+
- id: rst-directive-colons
|
|
39
|
+
- id: rst-inline-touching-normal
|
|
40
|
+
|
|
41
|
+
- repo: https://github.com/codespell-project/codespell
|
|
42
|
+
rev: v2.4.1
|
|
43
|
+
hooks:
|
|
44
|
+
- id: codespell
|
|
45
|
+
args: ["-S", "*.lock"]
|
|
46
|
+
|
|
47
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
48
|
+
rev: v0.13.3
|
|
49
|
+
hooks:
|
|
50
|
+
- id: ruff
|
|
51
|
+
|
|
52
|
+
- repo: https://github.com/kynan/nbstripout
|
|
53
|
+
rev: 0.8.1
|
|
54
|
+
hooks:
|
|
55
|
+
- id: nbstripout
|