Skip to content

Commit 1ac543f

Browse files
feat: add uv for project management and publishing workflow to pypi
1 parent 79420b0 commit 1ac543f

File tree

7 files changed

+2257
-94
lines changed

7 files changed

+2257
-94
lines changed

.github/workflows/build.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,31 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
steps:
1313
- name: Check out repository
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v4
18+
1519
- name: Set up Python
16-
uses: actions/setup-python@v4
17-
with:
18-
python-version: "3.11"
19-
- name: Install dependencies
20+
run: uv python install 3.11
21+
22+
- name: Install system dependencies
2023
run: |
2124
sudo apt-get update
2225
sudo apt-get install -y libxml2-utils xvfb libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev
23-
python -m pip install --upgrade pip
24-
pip install ".[dev]"
25-
pip install pre-commit
26+
27+
- name: Install dependencies
28+
run: uv sync --extra dev
29+
2630
- name: Run pre-commit checks
27-
run: pre-commit run --all-files
31+
run: uv run pre-commit run --all-files
32+
2833
- name: Start Xvfb
2934
run: |
3035
Xvfb :99 -ac &
3136
echo "DISPLAY=:99" >> $GITHUB_ENV
37+
3238
- name: Run tests
3339
env:
3440
DISPLAY: :99
35-
run: pytest tests/
41+
run: uv run pytest tests/

.github/workflows/publish.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Publish to TestPyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
name: Build distribution
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v4
18+
19+
- name: Set up Python
20+
run: uv python install 3.11
21+
22+
- name: Build package
23+
run: uv build
24+
25+
- name: Upload distribution artifacts
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: python-package-distributions
29+
path: dist/
30+
31+
publish-to-testpypi:
32+
name: Publish to TestPyPI
33+
needs: build
34+
runs-on: ubuntu-22.04
35+
environment:
36+
name: testpypi
37+
url: https://test.pypi.org/project/bigym/
38+
permissions:
39+
id-token: write # Required for trusted publishing
40+
41+
steps:
42+
- name: Download distribution artifacts
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
48+
- name: Publish to TestPyPI
49+
uses: pypa/gh-action-pypi-publish@release/v1
50+
with:
51+
repository-url: https://test.pypi.org/legacy/
52+
53+
# TODO: Uncomment when publishing to PyPI
54+
# publish-to-pypi:
55+
# name: Publish to PyPI
56+
# if: github.event_name == 'release'
57+
# needs: build
58+
# runs-on: ubuntu-22.04
59+
# environment:
60+
# name: pypi
61+
# url: https://pypi.org/project/bigym/
62+
# permissions:
63+
# id-token: write # Required for trusted publishing
64+
#
65+
# steps:
66+
# - name: Download distribution artifacts
67+
# uses: actions/download-artifact@v4
68+
# with:
69+
# name: python-package-distributions
70+
# path: dist/
71+
#
72+
# - name: Publish to PyPI
73+
# uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
</h1>
44

55
<p>
6-
<a href="https://github.com/chernyadev/bigym/actions/workflows/build.yaml?query=branch%3Amaster" alt="GitHub Actions">
7-
<img src="https://img.shields.io/github/actions/workflow/status/chernyadev/bigym/build.yaml?branch=master">
6+
<a href="https://github.com/NeuracoreAI/bigym/actions/workflows/build.yaml?query=branch%3Amaster" alt="GitHub Actions">
7+
<img src="https://img.shields.io/github/actions/workflow/status/NeuracoreAI/bigym/build.yaml?branch=master">
88
</a>
99
<a href="#contributing">
1010
<img src="https://img.shields.io/badge/PRs-welcome-green.svg" alt="PRs" height="20">

bigym/envs/xmls/3D_MODELS_ATTRIBUTION.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This document provides the attribution details for the 3D models included in thi
1717

1818
## Groceries
1919

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

2727
## Kitchen Set
2828

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

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

5252
## Box
5353

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

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

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

8484
## Plate
8585

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

9393
## Mug
9494

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

102102
## Cutlery Tray
103103

104-
- **Asset(s)**: [`bigym/envs/xmls/props/cutlery_tray/assets`](https://github.com/chernyadev/bigym/tree/master/bigym/envs/xmls/props/cutlery_tray/assets)
104+
- **Asset(s)**: [`bigym/envs/xmls/props/cutlery_tray/assets`](https://github.com/NeuracoreAI/bigym/tree/master/bigym/envs/xmls/props/cutlery_tray/assets)
105105
- **Author**: [thebasemesh.com](https://thebasemesh.com)
106106
- **Source**: [thebasemesh.com](https://thebasemesh.com)
107107
- **License**: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)

pyproject.toml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "bigym"
7+
dynamic = ["version"]
8+
description = "BiGym: A Demo-Driven Mobile Bi-Manual Manipulation Benchmark"
9+
readme = "README.md"
10+
license = "Apache-2.0"
11+
requires-python = ">=3.10"
12+
authors = [
13+
{ name = "Nikita Cherniadev", email = "[email protected]" }
14+
]
15+
keywords = [
16+
"robotics",
17+
"reinforcement-learning",
18+
"benchmark",
19+
"manipulation",
20+
"mujoco",
21+
"gymnasium",
22+
]
23+
classifiers = [
24+
"Development Status :: 4 - Beta",
25+
"Intended Audience :: Developers",
26+
"Intended Audience :: Science/Research",
27+
"Operating System :: OS Independent",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
33+
"Topic :: Scientific/Engineering :: Robotics",
34+
]
35+
dependencies = [
36+
# includes bugfix in mujoco_rendering
37+
"gymnasium @ git+https://github.com/stepjam/[email protected]",
38+
# pyquaternion doesn't support 2.x yet
39+
"numpy==1.26.*",
40+
"safetensors==0.3.3",
41+
# WARNING: recorded demos might break when updating Mujoco
42+
"mujoco==3.1.5",
43+
# needed for pyMJCF
44+
"dm_control==1.0.19",
45+
"imageio",
46+
"pyquaternion",
47+
"mujoco_utils",
48+
"wget",
49+
"mojo @ git+https://github.com/stepjam/[email protected]",
50+
"pyyaml",
51+
"dearpygui",
52+
"pyopenxr<1.1.5001",
53+
]
54+
55+
[project.optional-dependencies]
56+
dev = ["pre-commit", "pytest"]
57+
examples = [
58+
"moviepy",
59+
"pygame",
60+
"opencv-python",
61+
"matplotlib",
62+
]
63+
all = ["bigym[dev,examples]"]
64+
65+
[project.urls]
66+
Homepage = "https://chernyadev.github.io/bigym/"
67+
Documentation = "https://github.com/NeuracoreAI/bigym#readme"
68+
Repository = "https://github.com/NeuracoreAI/bigym"
69+
"Bug Tracker" = "https://github.com/NeuracoreAI/bigym/issues"
70+
71+
[tool.setuptools]
72+
include-package-data = true
73+
74+
[tool.setuptools.dynamic]
75+
version = { attr = "bigym.__version__" }
76+
77+
[tool.setuptools.packages.find]
78+
where = ["."]
79+
include = ["bigym*", "demonstrations*", "tools*", "vr*"]
80+
81+
[tool.setuptools.package-data]
82+
"*" = ["*.yaml", "*.xml"]

setup.py

Lines changed: 4 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,5 @@
1-
import codecs
2-
import os
3-
from pathlib import Path
1+
# This file is kept for backwards compatibility with legacy installations.
2+
# All configuration has been moved to pyproject.toml.
3+
from setuptools import setup
44

5-
import setuptools
6-
7-
8-
def read(rel_path):
9-
here = os.path.abspath(os.path.dirname(__file__))
10-
with codecs.open(os.path.join(here, rel_path), "r") as fp:
11-
return fp.read()
12-
13-
14-
def get_version(rel_path):
15-
for line in read(rel_path).splitlines():
16-
if line.startswith("__version__"):
17-
delim = '"' if '"' in line else "'"
18-
return line.split(delim)[1]
19-
else:
20-
raise RuntimeError("Unable to find version string.")
21-
22-
23-
core_requirements = [
24-
# includes bugfix in mujoco_rendering
25-
"gymnasium @ git+https://[email protected]/stepjam/[email protected]",
26-
# pyquaternion doesn't support 2.x yet
27-
"numpy==1.26.*",
28-
"safetensors==0.3.3",
29-
# WARNING: recorded demos might break when updating Mujoco
30-
"mujoco==3.1.5",
31-
# needed for pyMJCF
32-
"dm_control==1.0.19",
33-
"imageio",
34-
"pyquaternion",
35-
"mujoco_utils",
36-
"wget",
37-
"mojo @ git+https://[email protected]/stepjam/[email protected]",
38-
"pyyaml",
39-
"dearpygui",
40-
"pyopenxr",
41-
]
42-
43-
setuptools.setup(
44-
version=get_version("bigym/__init__.py"),
45-
name="bigym",
46-
author="Nikita Cherniadev",
47-
author_email="[email protected]",
48-
packages=setuptools.find_packages(),
49-
python_requires=">=3.10",
50-
install_requires=core_requirements,
51-
package_data={
52-
"": [str(p.resolve()) for p in Path("bigym/envs/xmls").glob("**/*")]
53-
+ [str(p.resolve()) for p in Path("bigym/envs/presets").glob("**/*.yaml")]
54-
+ [str(p.resolve()) for p in Path("vr/viewer/xmls").glob("**/*")]
55-
},
56-
extras_require={
57-
"dev": ["pre-commit", "pytest"],
58-
"examples": [
59-
"moviepy",
60-
"pygame",
61-
"opencv-python",
62-
"matplotlib",
63-
],
64-
},
65-
)
5+
setup()

0 commit comments

Comments
 (0)