petercorke / petercorke/machinevision-toolbox-python

roslibpy (ros extra) never installed in CI, so TestRosTopicValidation is entirely skipped

Open Beginner friendly
#80 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tech-debt
Dominant language
Python
Stars
219
Forks
30
Avg merge
12d 23h
Merged PRs (30d)
5

Description

Found 2026-08-14 while wiring open3d test coverage into CI for #46.

`pyproject.toml`'s `ros` extra (`rosbags`, `roslibpy`, `websockets`) is never installed
anywhere in `.github/workflows/ci.yml` — only `pip install .[dev,tool]` runs. As a result,
the entire `TestRosTopicValidation` class in `tests/test_ros.py` (class-level
`@pytest.mark.skipif(not _roslibpy_importable, reason="roslibpy not installed")`) is silently
skipped on every CI run, including the three open3d-gated pointcloud-publish tests inside it
(`test_publish_pointcloud_uncoloured`, `test_publish_pointcloud_coloured`,
`test_publish_pointcloud_uses_explicit_timestamp`) — installing open3d alone does not unlock
these, since the class-level roslibpy gate short-circuits first.

Verified locally: with `roslibpy` not installed, `pytest tests/test_ros.py -k pointcloud -rs`
reports `SKIPPED ... roslibpy not installed` for all three, regardless of open3d's install
state.

Other `_rosbags_importable`-gated tests in the same file (`TestRosBagsIO` etc.) are presumably
similarly always-skipped, since `rosbags` isn't installed either — not independently verified
here, worth checking as part of the fix.

Fix

Add a CI leg (or a conditional install step, similar to the open3d pattern from #46/#78) that
installs `.[ros]` on at least one matrix leg, so the `ros`-extra-gated tests actually run
somewhere rather than being permanently invisible to CI.

Contributor guide

No contributing guide indexed for this repository

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 .github/workflows/ci.yml and pyproject.toml to see how existing extras and matrix legs are installed. Run pytest tests/test_ros.py -k pointcloud -rs, then verify the ROS-extra leg runs the roslibpy- and rosbags-gated tests instead of skipping them; the CI job should complete successfully with the extra installed.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.