-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
78 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI Checks | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
unit-tests: | ||
name: Unit Tests | ||
runs-on: "ubuntu-20.04" | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
activate-environment: rcareworld | ||
python-version: "3.10" | ||
- run: | | ||
cd pyrcareworld | ||
pip install -r requirements.txt | ||
pip install -e . | ||
pip uninstall -y numpy | ||
conda install numpy | ||
cd ../ | ||
pytest tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Bathing environment for the PhyRC competition.""" | ||
|
||
from pyrcareworld.envs.base_env import RCareWorld | ||
from pathlib import Path | ||
|
||
|
||
_TEMPLATE_PATH = Path(__file__).parents[3] / "template" | ||
_DEFAULT_EXECUTABLE_PATH = _TEMPLATE_PATH / "Bathing" / "BathingPlayer.x86_64" | ||
|
||
|
||
class BathingEnv(RCareWorld): | ||
"""Bathing environment for the PhyRC competition.""" | ||
|
||
def __init__(self, executable_file=str(_DEFAULT_EXECUTABLE_PATH), *args, **kwargs): | ||
super().__init__(executable_file=executable_file, *args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Dressing environment for the PhyRC competition.""" | ||
|
||
from pyrcareworld.envs.base_env import RCareWorld | ||
from pathlib import Path | ||
|
||
|
||
_TEMPLATE_PATH = Path(__file__).parents[3] / "template" | ||
_DEFAULT_EXECUTABLE_PATH = _TEMPLATE_PATH / "Dressing" / "DressingPlayer.x86_64" | ||
|
||
|
||
class DressingEnv(RCareWorld): | ||
"""Dressing environment for the PhyRC competition.""" | ||
|
||
def __init__(self, executable_file=str(_DEFAULT_EXECUTABLE_PATH), *args, **kwargs): | ||
super().__init__(executable_file=executable_file, *args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ opencv-contrib-python | |
requests | ||
open3d | ||
pandas | ||
pytest>=7.2.2 | ||
|
||
# gym==0.21.0 | ||
# cloudpickle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""Tests that the main environments initialize without crashing.""" | ||
|
||
from pyrcareworld.envs.bathing_env import BathingEnv | ||
from pyrcareworld.envs.dressing_env import DressingEnv | ||
|
||
|
||
def test_bathing_env_initialization(): | ||
"""Tests that the bathing environment initializes without crashing.""" | ||
env = BathingEnv(graphics=False) | ||
assert isinstance(env, BathingEnv) | ||
|
||
|
||
def test_dressing_env_initialization(): | ||
"""Tests that the dressing environment initializes without crashing.""" | ||
env = DressingEnv(graphics=False) | ||
assert isinstance(env, DressingEnv) |