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

Abierto Apto para principiantes
#74 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
77/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Lee pyproject.toml y la sección «Internal IBM Usage» de CONTRIBUTING.md para comprobar cómo se declara y documenta la dependencia privada rits. Luego inspecciona tests/test_models.py en TestDefaults::test_default_resolves_for_every_self_hosted_backend y TestRitsOverlay::test_auto_matched_granite_small, junto con test_rits_returns_rits_identifier, para encontrar el patrón de omisión existente. El trabajo estará terminado cuando los colaboradores externos puedan volver a resolver el archivo de bloqueo y las dos pruebas se omitan correctamente sin mellea_ibm.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
45
Forks
14
Merge medio
5 h 1 min
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de IBM/FactReasoner

Todos los issues de IBM/FactReasoner

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.