NVIDIA / NVIDIA/IsaacTeleop

Build fail after using pre-commit hook to prepare the local repo for git pull request

Open
#717 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
385
Forks
88
Avg merge
3d 23h
Merged PRs (30d)
82

Description

According to Contributing.md, ruff and pre-commit should be used to check the code for pull request. But the build would fail after commit with the pre-commit hook.

cmake build --build can be done successfully before committing the changes.
However, If I run build after commit, the build will not pass with errors related to two different environments.
The build was done in the uv environment for IsaacLab. It seems that a conflicting environment was created by the pre-commit hooks for format checking.
How to fix the problem? Thanks!

Error log from build:
Generating Python type stubs...
warning: VIRTUAL_ENV=/home/xin/IsaacLab/env_isaaclab does not match the project environment path stubgen/.venv and will be ignored; use --active to target the active environment instead
Using CPython 3.12.13
Creating virtual environment at: stubgen/.venv
Installed 2 packages in 4ms
Generating stubs for isaacteleop.deviceio_trackers._deviceio_trackers...
Error: stubgen failed for isaacteleop.deviceio_trackers._deviceio_trackers: cannot import name 'FoottrollerOutput' from 'isaacteleop.schema' (/home/xin/IsaacTeleop_fork/build/python_package/Release/isaacteleop/schema/init.py)
Stub generation failed.
gmake[2]: *** [src/core/python/CMakeFiles/python_stubs.dir/build.make:82: python_package/Release/isaacteleop/py.typed] Error 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Contributing.md and reproduce the cmake build --build first in the IsaacLab uv environment, then again after the pre-commit commit. Inspect the stubgen/.venv environment and the python_stubs target; done means the post-commit build completes without the VIRTUAL_ENV mismatch and FoottrollerOutput import failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, python
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.