Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1e0acf2c9 |
@@ -0,0 +1,26 @@
|
|||||||
|
name: Ensure Tagged Commits on Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check_tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Check if base commit of PR is tagged
|
||||||
|
run: |
|
||||||
|
BASE_COMMIT=$(jq -r .pull_request.base.sha < "$GITHUB_EVENT_PATH")
|
||||||
|
TAG=$(git tag --contains $BASE_COMMIT)
|
||||||
|
if [ -z "$TAG" ]; then
|
||||||
|
echo "Base commit of PR is not tagged. PRs onto release must be tagged with the version number."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Base commit of PR is tagged. Check passed."
|
||||||
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
name: Ensure Version Consistency on PR to Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check_version_and_tag:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: true # Terminate the job immediately if any step fails
|
|
||||||
steps:
|
|
||||||
- name: Check out code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Necessary to fetch all tags for comparison
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install toml
|
|
||||||
|
|
||||||
- name: Extract version from pyproject.toml
|
|
||||||
run: |
|
|
||||||
echo "Extracting version from pyproject.toml"
|
|
||||||
VERSION=$(python -c 'import toml; print(toml.load("pyproject.toml")["project"]["version"])')
|
|
||||||
echo "Version in pyproject.toml is $VERSION"
|
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Get tag for the PR's head commit
|
|
||||||
run: |
|
|
||||||
PR_HEAD_SHA=$(jq -r .pull_request.head.sha < "$GITHUB_EVENT_PATH")
|
|
||||||
TAG=$(git tag --contains $PR_HEAD_SHA)
|
|
||||||
echo "Tag on PR's head commit is $TAG"
|
|
||||||
echo "TAG=$TAG" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Compare version and tag
|
|
||||||
run: |
|
|
||||||
if [ -z "$TAG" ]; then
|
|
||||||
echo "Head commit of PR is not tagged. Ensure the head commit of PRs onto release is tagged with the version number."
|
|
||||||
exit 1
|
|
||||||
elif [ "$VERSION" != "$TAG" ]; then
|
|
||||||
echo "Version in pyproject.toml ($VERSION) does not match the git tag ($TAG)."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Version and git tag match. Check passed."
|
|
||||||
fi
|
|
||||||
@@ -8,8 +8,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
name: Publish to PyPI
|
name: Publish to PyPI
|
||||||
strategy:
|
|
||||||
fail-fast: true # Terminate the job immediately if any step fails
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
@@ -17,24 +15,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # This fetches all history for all branches and tags
|
fetch-depth: 0 # This fetches all history for all branches and tags
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Check if commit is tagged
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.x"
|
|
||||||
|
|
||||||
- name: Validate version against tag
|
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(python -c 'import toml; print(toml.load("pyproject.toml")["project"]["version"])')
|
|
||||||
TAG=$(git tag --contains HEAD)
|
TAG=$(git tag --contains HEAD)
|
||||||
if [ -z "$TAG" ]; then
|
if [ -z "$TAG" ]; then
|
||||||
echo "Commit is not tagged. Failing the workflow."
|
echo "Commit is not tagged. Failing the workflow."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "$VERSION" != "$TAG" ]; then
|
echo "Commit is tagged. Proceeding with the workflow."
|
||||||
echo "Version in pyproject.toml ($VERSION) does not match the git tag ($TAG). Failing the workflow."
|
|
||||||
exit 1
|
- name: Set up Python
|
||||||
fi
|
uses: actions/setup-python@v4
|
||||||
echo "Version and commit tag match. Proceeding with the workflow."
|
with:
|
||||||
|
python-version: "3.x"
|
||||||
|
|
||||||
- name: Install pypa/build/setuptools/twine
|
- name: Install pypa/build/setuptools/twine
|
||||||
run: >-
|
run: >-
|
||||||
@@ -43,6 +36,9 @@ jobs:
|
|||||||
build setuptools twine
|
build setuptools twine
|
||||||
--user
|
--user
|
||||||
|
|
||||||
|
- name: Prevent fallback onto setup.py
|
||||||
|
run: rm setup.py
|
||||||
|
|
||||||
- name: Build a binary wheel and a source tarball
|
- name: Build a binary wheel and a source tarball
|
||||||
run: python3 -m build
|
run: python3 -m build
|
||||||
|
|
||||||
|
|||||||
@@ -10,25 +10,25 @@ Built upon the foundation of [Gymnasium](https://gymnasium.farama.org) (a mainta
|
|||||||
|
|
||||||
**Key Features**:
|
**Key Features**:
|
||||||
|
|
||||||
- **New Challenging Environments**: `fancy_gym` includes several new environments ([Panda Box Pushing](https://dominik-roth.eu/fancy/envs/fancy/mujoco.html#box-pushing), [Table Tennis](https://dominik-roth.eu/fancy/envs/fancy/mujoco.html#table-tennis), [etc.](https://dominik-roth.eu/fancy/envs/fancy/index.html)) that present a higher degree of difficulty, pushing the boundaries of reinforcement learning research.
|
- **New Challenging Environments**: `fancy_gym` includes several new environments ([Panda Box Pushing](https://alrhub.github.io/fancy_gym/envs/fancy/mujoco.html#box-pushing), [Table Tennis](https://alrhub.github.io/fancy_gym/envs/fancy/mujoco.html#table-tennis), [etc.](https://alrhub.github.io/fancy_gym/envs/fancy/index.html)) that present a higher degree of difficulty, pushing the boundaries of reinforcement learning research.
|
||||||
- **Support for Movement Primitives**: `fancy_gym` supports a range of movement primitives (MPs), including Dynamic Movement Primitives (DMPs), Probabilistic Movement Primitives (ProMP), and Probabilistic Dynamic Movement Primitives (ProDMP).
|
- **Support for Movement Primitives**: `fancy_gym` supports a range of movement primitives (MPs), including Dynamic Movement Primitives (DMPs), Probabilistic Movement Primitives (ProMP), and Probabilistic Dynamic Movement Primitives (ProDMP).
|
||||||
- **Upgrade to Movement Primitives**: With our framework, it’s straightforward to transform standard Gymnasium environments into environments that support movement primitives.
|
- **Upgrade to Movement Primitives**: With our framework, it’s straightforward to transform standard Gymnasium environments into environments that support movement primitives.
|
||||||
- **Benchmark Suite Compatibility**: `fancy_gym` makes it easy to access renowned benchmark suites such as [DeepMind Control](dominik-roth.eu/fancy/envs/dmc.html)
|
- **Benchmark Suite Compatibility**: `fancy_gym` makes it easy to access renowned benchmark suites such as [DeepMind Control](https://alrhub.github.io/fancy_gym/envs/dmc.html)
|
||||||
and [Metaworld](https://dominik-roth.eu/fancy/envs/meta.html), whether you want to use them in the regular step-based setting or using MPs.
|
and [Metaworld](https://alrhub.github.io/fancy_gym/envs/meta.html), whether you want to use them in the regular step-based setting or using MPs.
|
||||||
- **Contribute Your Own Environments**: If you’re inspired to create custom gym environments, both step-based and with movement primitives, this [guide](https://dominik-roth.eu/fancy/guide/upgrading_envs.html) will assist you. We encourage and highly appreciate submissions via PRs to integrate these environments into `fancy_gym`.
|
- **Contribute Your Own Environments**: If you’re inspired to create custom gym environments, both step-based and with movement primitives, this [guide](https://alrhub.github.io/fancy_gym/guide/upgrading_envs.html) will assist you. We encourage and highly appreciate submissions via PRs to integrate these environments into `fancy_gym`.
|
||||||
|
|
||||||
## Quickstart Guide
|
## Quickstart Guide
|
||||||
|
|
||||||
| ⚠ We recommend installing `fancy_gym` into a virtual environment as provided by [venv](https://docs.python.org/3/library/venv.html), [Poetry](https://python-poetry.org/) or [Conda](https://docs.conda.io/en/latest/). |
|
| ⚠ We recommend installing `fancy_gym` into a virtual environment as provided by [venv](https://docs.python.org/3/library/venv.html), [Poetry](https://python-poetry.org/) or [Conda](https://docs.conda.io/en/latest/). |
|
||||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
|
||||||
Install via pip [or use an alternative installation method](https://dominik-roth.eu/fancy/guide/installation.html)
|
Install via pip [or use an alternative installation method](https://alrhub.github.io/fancy_gym/guide/installation.html)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install 'fancy_gym[all]'
|
pip install 'fancy_gym[all]'
|
||||||
```
|
```
|
||||||
|
|
||||||
Try out one of our step-based environments [or explore our other envs](https://dominik-roth.eu/fancy/envs/fancy/index.html)
|
Try out one of our step-based environments [or explore our other envs](https://alrhub.github.io/fancy_gym/envs/fancy/index.html)
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import gymnasium as gym
|
import gymnasium as gym
|
||||||
@@ -48,7 +48,7 @@ Try out one of our step-based environments [or explore our other envs](https://d
|
|||||||
observation, info = env.reset()
|
observation, info = env.reset()
|
||||||
```
|
```
|
||||||
|
|
||||||
Explore the MP-based variant [or learn more about Movement Primitives (MPs)](https://dominik-roth.eu/fancy/guide/episodic_rl.html)
|
Explore the MP-based variant [or learn more about Movement Primitives (MPs)](https://alrhub.github.io/fancy_gym/guide/episodic_rl.html)
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import gymnasium as gym
|
import gymnasium as gym
|
||||||
@@ -66,7 +66,7 @@ Explore the MP-based variant [or learn more about Movement Primitives (MPs)](htt
|
|||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Documentation for `fancy_gym` can be found [here](https://dominik-roth.eu/fancy); Usage Examples can be found [here](https://dominik-roth.eu/fancy/examples/general.html).
|
Documentation for `fancy_gym` can be found [here](https://alrhub.github.io/fancy_gym/); Usage Examples can be found [here](https://alrhub.github.io/fancy_gym/examples/general.html).
|
||||||
|
|
||||||
## Citing the Project
|
## Citing the Project
|
||||||
|
|
||||||
|
|||||||
+2
-6
@@ -1,17 +1,13 @@
|
|||||||
# This conf.py is in large parts inspired by the oen used by stable-baselines 3
|
# This conf.py is in large parts inspired by the oen used by stable-baselines 3
|
||||||
|
|
||||||
import toml
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
project = 'Fancy Gym'
|
project = 'Fancy Gym'
|
||||||
author = 'Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou'
|
author = 'Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou'
|
||||||
copyright = f'2020-{datetime.date.today().year}, {author}'
|
copyright = f'2020-{datetime.date.today().year}, {author}'
|
||||||
|
|
||||||
pyproject_content = toml.load("../../pyproject.toml")
|
release = '0.2' # The full version, including alpha/beta/rc tags
|
||||||
proj_version = pyproject_content["project"]["version"]
|
version = '0.2' # The short X.Y version
|
||||||
|
|
||||||
release = proj_version # The full version, including alpha/beta/rc tags
|
|
||||||
version = proj_version # The short X.Y version
|
|
||||||
|
|
||||||
extensions = [
|
extensions = [
|
||||||
'myst_parser',
|
'myst_parser',
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "fancy_gym"
|
name = "fancy_gym"
|
||||||
version = "0.3.0"
|
version = "0.1.4"
|
||||||
description = "Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches."
|
description = "Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [
|
authors = [
|
||||||
@@ -26,7 +26,6 @@ classifiers = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"toml",
|
|
||||||
"mp_pytorch<=0.1.3",
|
"mp_pytorch<=0.1.3",
|
||||||
"mujoco==2.3.3",
|
"mujoco==2.3.3",
|
||||||
"gymnasium[mujoco]>=0.26.0"
|
"gymnasium[mujoco]>=0.26.0"
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# We still provide a setup.py for backwards compatability.
|
# We still provide a setup.py for backwards compatability.
|
||||||
# But the pyproject.toml should be prefered.
|
# But the pyproject.toml should be prefered.
|
||||||
import toml
|
|
||||||
import itertools
|
import itertools
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List
|
from typing import List
|
||||||
@@ -9,9 +8,6 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
print('[!] You are currently installing/building fancy_gym via setup.py. This is only provided for backwards-compatability. Please use the pyproject.toml instead.')
|
print('[!] You are currently installing/building fancy_gym via setup.py. This is only provided for backwards-compatability. Please use the pyproject.toml instead.')
|
||||||
|
|
||||||
pyproject_content = toml.load("pyproject.toml")
|
|
||||||
project_version = pyproject_content["project"]["version"]
|
|
||||||
|
|
||||||
# Environment-specific dependencies for dmc and metaworld
|
# Environment-specific dependencies for dmc and metaworld
|
||||||
extras = {
|
extras = {
|
||||||
'dmc': ['shimmy[dm-control]', 'Shimmy==1.0.0'],
|
'dmc': ['shimmy[dm-control]', 'Shimmy==1.0.0'],
|
||||||
@@ -42,7 +38,7 @@ def find_package_data(extensions_to_include: List[str]) -> List[str]:
|
|||||||
setup(
|
setup(
|
||||||
author='Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou',
|
author='Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou',
|
||||||
name='fancy_gym',
|
name='fancy_gym',
|
||||||
version=project_version,
|
version='0.1.0',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
'Intended Audience :: Science/Research',
|
'Intended Audience :: Science/Research',
|
||||||
@@ -59,7 +55,6 @@ setup(
|
|||||||
],
|
],
|
||||||
extras_require=extras,
|
extras_require=extras,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'toml',
|
|
||||||
'mp_pytorch<=0.1.3',
|
'mp_pytorch<=0.1.3',
|
||||||
'mujoco==2.3.3',
|
'mujoco==2.3.3',
|
||||||
'gymnasium[mujoco]>=0.26.0'
|
'gymnasium[mujoco]>=0.26.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user