Make the private mellea-ibm (rits) source optional so external contributors can re-lock

Aperta Adatta ai principianti
#74 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
77/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Leggi pyproject.toml e la sezione « Internal IBM Usage » di CONTRIBUTING.md per verificare come viene dichiarata e documentata la dipendenza privata rits. Poi esamina tests/test_models.py in corrispondenza di TestDefaults::test_default_resolves_for_every_self_hosted_backend e TestRitsOverlay::test_auto_matched_granite_small, insieme a test_rits_returns_rits_identifier, per individuare il modello di skip esistente. Il lavoro è completato quando i collaboratori esterni possono risolvere nuovamente il lockfile e i due test vengono saltati correttamente senza mellea_ibm.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

pyproject.toml declares the rits extra (mellea-ibm) with a [tool.uv.sources] entry pointing at ssh://[email protected]/generative-computing/mellea-ibm.git. uv lock resolves every extra, so anyone without access to github.ibm.com can't re-resolve the lockfile, even if they never install rits.

The existing uv.lock is fine as long as nothing changes (uv lock --check passes, and uv sync --extra dev works). But any change that needs a re-resolve fails, e.g. bumping a dependency or uv lock --upgrade-package <pkg>:

$ uv lock --upgrade-package langsmith
  ...
  ssh: connect to host github.ibm.com port 22: Operation timed out
  fatal: Could not read from remote repository.

So external contributors can't open a PR that touches dependencies. Our fork (NASA-IMPACT/FactReasoner, used for NASA's AKD project) has had to comment out the rits extra to keep a working lockfile, and that's currently the main reason we carry a fork.

Separately, two tests fail whenever mellea_ibm isn't installed, rather than skipping like test_rits_returns_rits_identifier does:

  • tests/test_models.py::TestDefaults::test_default_resolves_for_every_self_hosted_backend
  • tests/test_models.py::TestRitsOverlay::test_auto_matched_granite_small

(resolve(...).rits is None without mellea_ibm, so the assertions fail.)

Suggested fix

  1. Drop the rits extra and its [tool.uv.sources] entry from pyproject.toml, and keep the existing documented install path for IBM users (pip install "git+ssh://[email protected]/generative-computing/mellea-ibm.git", already in CONTRIBUTING.md under "Internal IBM Usage"). That way uv.lock never references the private source. RITS code already imports mellea_ibm lazily, so nothing else should need to change.
  2. Add pytest.importorskip("mellea_ibm") (or an equivalent skipif) to the two tests above.

Happy to open a PR for this if the approach works for you.

Lingua principale
Python
Stelle
45
Fork
14
Merge medio
5h 1m
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IBM/FactReasoner

Tutte le issue di IBM/FactReasoner

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.