petercorke / petercorke/machinevision-toolbox-python

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

Offen Anfängerfreundlich
#80 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

tech-debt
Vorherrschende Sprache
Python
Sterne
219
Forks
30
Ø Merge
12 T. 23 Std.
Gemergte PRs (30 T.)
5

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit .github/workflows/ci.yml und pyproject.toml, um zu sehen, wie vorhandene Extras und Matrix-Legs installiert werden. Führe pytest tests/test_ros.py -k pointcloud -rs aus und überprüfe anschließend, dass der ROS-extra-Leg die durch roslibpy und rosbags geschützten Tests ausführt, anstatt sie zu überspringen; der CI-Job sollte mit installiertem Extra erfolgreich abgeschlossen werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github-actions, python
Bereich
ci-cd, testing-qa
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Ruhig
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
78/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.