Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,31 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: uv python install 3.11

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils xvfb libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev
python -m pip install --upgrade pip
pip install ".[dev]"
pip install pre-commit

- name: Install dependencies
run: uv sync --extra dev

- name: Run pre-commit checks
run: pre-commit run --all-files
run: uv run pre-commit run --all-files

- name: Start Xvfb
run: |
Xvfb :99 -ac &
echo "DISPLAY=:99" >> $GITHUB_ENV

- name: Run tests
env:
DISPLAY: :99
run: pytest tests/
run: uv run pytest tests/
138 changes: 138 additions & 0 deletions .github/workflows/bump_and_publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Bump and Publish

on:
push:
branches:
- main

jobs:
check-version-bump:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
pull-requests: read
outputs:
should_release: ${{ steps.check.outputs.should_release }}
bump_type: ${{ steps.check.outputs.bump_type }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check PR labels for version bump
id: check
uses: actions/github-script@v7
with:
script: |
const prs = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha
});

if (prs.data.length === 0) {
core.setOutput('should_release', 'false');
return;
}

const validLabels = ['version:major', 'version:minor', 'version:patch', 'version:none'];
const label = prs.data[0].labels.find(l => validLabels.includes(l.name));
const bump_type = label?.name.split(':')[1];

if (!bump_type || bump_type === 'none') {
core.setOutput('should_release', 'false');
} else {
core.setOutput('should_release', 'true');
core.setOutput('bump_type', bump_type);
}

version-bump:
needs: check-version-bump
if: needs.check-version-bump.outputs.should_release == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new_version: ${{ steps.bump.outputs.version }}

steps:
- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.NC_VERSION_BUMPER_APP_ID }}
private-key: ${{ secrets.NC_VERSION_BUMPER_PRIVATE_KEY }}

- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up Python
run: uv python install 3.11

- name: Bump version
id: bump
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
uv version --bump ${{ needs.check-version-bump.outputs.bump_type }}
VERSION=$(uv version --short)
git add pyproject.toml uv.lock
git commit -m "Bump version to ${VERSION}"
git tag "v${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
git push origin main --tags

publish-python:
needs: version-bump
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0

- name: Pull latest changes
run: git pull --tags

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up Python
run: uv python install 3.11

- name: Build and publish to PyPI
run: uv build && uv publish
env:
UV_PUBLISH_USERNAME: ${{ secrets.PYPI_USERNAME }}
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

create-release:
needs: [version-bump, publish-python]
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Create GitHub Release
uses: actions/github-script@v7
with:
script: |
const version = '${{ needs.version-bump.outputs.new_version }}';
await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `v${version}`,
name: `Release v${version}`,
body: `## Release v${version}\n\nPublished to [PyPI](https://pypi.org/project/bigym/${version}/)\n\n\`\`\`bash\npip install bigym==${version}\n\`\`\``,
draft: false,
prerelease: false
});
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</h1>

<p>
<a href="https://github.com/chernyadev/bigym/actions/workflows/build.yaml?query=branch%3Amaster" alt="GitHub Actions">
<img src="https://img.shields.io/github/actions/workflow/status/chernyadev/bigym/build.yaml?branch=master">
<a href="https://github.com/NeuracoreAI/bigym/actions/workflows/build.yaml?query=branch%3Amaster" alt="GitHub Actions">
<img src="https://img.shields.io/github/actions/workflow/status/NeuracoreAI/bigym/build.yaml?branch=master">
</a>
<a href="#contributing">
<img src="https://img.shields.io/badge/PRs-welcome-green.svg" alt="PRs" height="20">
Expand Down
4 changes: 3 additions & 1 deletion bigym/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Init."""

__version__ = "4.1.0"
from importlib.metadata import version

__version__ = version("bigym")
36 changes: 18 additions & 18 deletions bigym/envs/xmls/3D_MODELS_ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This document provides the attribution details for the 3D models included in thi

## Groceries

- **Asset(s)**: [`bigym/envs/xmls/props/groceries/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/groceries/assets)
- **Asset(s)**: [`bigym/envs/xmls/props/groceries/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/groceries/assets)
- **Author**: [tulex_art](https://sketchfab.com/CassioFernandes)
- **Source**: [Sketchfab](https://skfb.ly/6RCNy)
- **License**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
Expand All @@ -26,7 +26,7 @@ This document provides the attribution details for the 3D models included in thi

## Kitchen Set

- **Asset(s)**: [`bigym/envs/xmls/props/kitchen/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/kitchen/assets)
- **Asset(s)**: [`bigym/envs/xmls/props/kitchen/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/kitchen/assets)
- **Author**: [RedKit](https://sketchfab.com/redkitpro)
- **Source**: [Sketchfab](https://skfb.ly/6SXBW)
- **License**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
Expand All @@ -36,13 +36,13 @@ This document provides the attribution details for the 3D models included in thi
## Kitchen Utensils

- **Asset(s)**:
- [`bigym/envs/xmls/props/board/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/board/assets)
- [`bigym/envs/xmls/props/pan/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/pan/assets)
- [`bigym/envs/xmls/props/saucepan/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/saucepan/assets)
- [`bigym/envs/xmls/props/spatula/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/spatula/assets)
- [`bigym/envs/xmls/props/groceries/detergent/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/groceries/detergent/assets)
- [`bigym/envs/xmls/props/groceries/soap/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/groceries/soap/assets)
- [`bigym/envs/xmls/props/groceries/wine/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/groceries/wine/assets)
- [`bigym/envs/xmls/props/board/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/board/assets)
- [`bigym/envs/xmls/props/pan/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/pan/assets)
- [`bigym/envs/xmls/props/saucepan/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/saucepan/assets)
- [`bigym/envs/xmls/props/spatula/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/spatula/assets)
- [`bigym/envs/xmls/props/groceries/detergent/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/groceries/detergent/assets)
- [`bigym/envs/xmls/props/groceries/soap/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/groceries/soap/assets)
- [`bigym/envs/xmls/props/groceries/wine/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/groceries/wine/assets)
- **Author**: [Nicolai Kilstrup](https://sketchfab.com/nkilstrup)
- **Source**: [Sketchfab](https://skfb.ly/oFoUn)
- **License**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
Expand All @@ -51,7 +51,7 @@ This document provides the attribution details for the 3D models included in thi

## Box

- **Asset(s)**: [`bigym/envs/xmls/props/box/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/box/assets)
- **Asset(s)**: [`bigym/envs/xmls/props/box/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/box/assets)
- **Author**: [Pricey1600](https://sketchfab.com/Pricey1600)
- **Source**: [Sketchfab](https://skfb.ly/6ZWFF)
- **License**: [CC BY NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
Expand All @@ -61,9 +61,9 @@ This document provides the attribution details for the 3D models included in thi
## Cutlery

- **Asset(s)**:
- [`bigym/envs/xmls/props/cutlery/knife/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/cutlery/knife/assets)
- [`bigym/envs/xmls/props/cutlery/fork/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/cutlery/fork/assets)
- [`bigym/envs/xmls/props/cutlery/spoon/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/cutlery/spoon/assets)
- [`bigym/envs/xmls/props/cutlery/knife/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/cutlery/knife/assets)
- [`bigym/envs/xmls/props/cutlery/fork/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/cutlery/fork/assets)
- [`bigym/envs/xmls/props/cutlery/spoon/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/cutlery/spoon/assets)
- **Author**: [thebasemesh.com](https://thebasemesh.com)
- **Source**: [thebasemesh.com](https://thebasemesh.com)
- **License**: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
Expand All @@ -73,8 +73,8 @@ This document provides the attribution details for the 3D models included in thi
## Tables

- **Asset(s)**:
- [`bigym/envs/xmls/props/table/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/table/assets)
- [`bigym/envs/xmls/props/table_dishwasher/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/table_dishwasher/assets)
- [`bigym/envs/xmls/props/table/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/table/assets)
- [`bigym/envs/xmls/props/table_dishwasher/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/table_dishwasher/assets)
- **Author**: [thebasemesh.com](https://thebasemesh.com)
- **Source**: [thebasemesh.com](https://thebasemesh.com)
- **License**: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
Expand All @@ -83,7 +83,7 @@ This document provides the attribution details for the 3D models included in thi

## Plate

- **Asset(s)**: [`bigym/envs/xmls/props/plate/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/plate/assets)
- **Asset(s)**: [`bigym/envs/xmls/props/plate/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/plate/assets)
- **Author**: [thebasemesh.com](https://thebasemesh.com)
- **Source**: [thebasemesh.com](https://thebasemesh.com)
- **License**: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
Expand All @@ -92,7 +92,7 @@ This document provides the attribution details for the 3D models included in thi

## Mug

- **Asset(s)**: [`bigym/envs/xmls/props/mug/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/mug/assets)
- **Asset(s)**: [`bigym/envs/xmls/props/mug/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/mug/assets)
- **Author**: [thebasemesh.com](https://thebasemesh.com)
- **Source**: [thebasemesh.com](https://thebasemesh.com)
- **License**: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
Expand All @@ -101,7 +101,7 @@ This document provides the attribution details for the 3D models included in thi

## Cutlery Tray

- **Asset(s)**: [`bigym/envs/xmls/props/cutlery_tray/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/cutlery_tray/assets)
- **Asset(s)**: [`bigym/envs/xmls/props/cutlery_tray/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/cutlery_tray/assets)
- **Author**: [thebasemesh.com](https://thebasemesh.com)
- **Source**: [thebasemesh.com](https://thebasemesh.com)
- **License**: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
79 changes: 79 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "bigym"
version = "4.1.0"
description = "BiGym: A Demo-Driven Mobile Bi-Manual Manipulation Benchmark"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
{ name = "Nikita Cherniadev", email = "nikita.chernyadev@gmail.com" }
]
keywords = [
"robotics",
"reinforcement-learning",
"benchmark",
"manipulation",
"mujoco",
"gymnasium",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Robotics",
]
dependencies = [
# includes bugfix in mujoco_rendering
"gymnasium @ git+https://github.com/stepjam/Gymnasium.git@0.29.2",
# pyquaternion doesn't support 2.x yet
"numpy==1.26.*",
"safetensors==0.3.3",
# WARNING: recorded demos might break when updating Mujoco
"mujoco==3.1.5",
# needed for pyMJCF
"dm_control==1.0.19",
"imageio",
"pyquaternion",
"mujoco_utils",
"wget",
"mojo @ git+https://github.com/stepjam/mojo.git@0.1.1",
"pyyaml",
"dearpygui",
"pyopenxr<1.1.5001",
]

[project.optional-dependencies]
dev = ["pre-commit", "pytest"]
examples = [
"moviepy",
"pygame",
"opencv-python",
"matplotlib",
]
all = ["bigym[dev,examples]"]

[project.urls]
Homepage = "https://chernyadev.github.io/bigym/"
Documentation = "https://github.com/NeuracoreAI/bigym#readme"
Repository = "https://github.com/NeuracoreAI/bigym"
"Bug Tracker" = "https://github.com/NeuracoreAI/bigym/issues"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["."]
include = ["bigym*", "demonstrations*", "tools*", "vr*"]

[tool.setuptools.package-data]
"*" = ["*.yaml", "*.xml"]
Loading