Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icub-models python library: Raise a FileNotFoundError if the model path is not found #241

Merged
merged 8 commits into from
Nov 6, 2024
15 changes: 7 additions & 8 deletions .github/workflows/cxx-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ jobs:
os: [ubuntu-20.04, macos-latest, windows-2019]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
channels: conda-forge

Expand All @@ -34,12 +33,12 @@ jobs:
conda config --remove channels defaults
# Build and test dependencies (ROS packages to test that resouces are find correctly by ROS/ROS2)
# ros-noetic-catkin is required otherwised ROS_PACKAGE_PATH is not defined and rospack list does not return anything
mamba install -c conda-forge -c robostack -c robostack-humble cmake compilers make ninja pkg-config python ros-noetic-rospack ros-noetic-catkin ros-humble-ros2pkg
conda install -c conda-forge -c robostack -c robostack-humble cmake compilers make ninja pkg-config python ros-noetic-rospack ros-noetic-catkin ros-humble-ros2pkg

- name: Print used environment [Conda]
shell: bash -l {0}
run: |
mamba list
conda list
env

- name: Configure [Conda/Linux&macOS]
Expand Down Expand Up @@ -103,8 +102,8 @@ jobs:
image: ${{ matrix.docker_image }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Print environment variables to simplify development and debugging
- name: Environment Variables
shell: bash
Expand All @@ -125,7 +124,7 @@ jobs:
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..

- name: Build
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pip-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
os: [ubuntu-20.04, macos-latest, windows-2019]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pypi-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:

steps:

- uses: actions/checkout@master
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -40,7 +40,7 @@ jobs:
run: python -m build --sdist --wheel --outdir dist/ .

- name: Archive artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Expand All @@ -53,13 +53,13 @@ jobs:
steps:

- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
Expand All @@ -72,12 +72,12 @@ jobs:
steps:

- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/trigger_bru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
repository: robotology/blender-robotics-utils

- name: Repository dispatch to blender-robotics-utils
uses: peter-evans/repository-dispatch@v1
uses: peter-evans/repository-dispatch@v3
if: steps.set_model_list.outputs.models != ''
env:
GITHUB_APPS_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion python/icub_models/icub_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ def get_model_file(robot_name: str) -> pathlib.Path:
if model_file.is_file():
return model_file
else:
return pathlib.Path("...")
raise FileNotFoundError(f"Model file for robot {robot_name} not found.")
Loading