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

オープン 初心者向け
#74 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
77/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

pyproject.tomlとCONTRIBUTING.mdの「Internal IBM Usage」セクションを読み、プライベートな依存関係ritsがどのように宣言、文書化されているか確認してください。次に、既存のスキップパターンを調べるため、tests/test_models.pyのTestDefaults::test_default_resolves_for_every_self_hosted_backendとTestRitsOverlay::test_auto_matched_granite_small、およびtest_rits_returns_rits_identifierを確認してください。外部のコントリビューターがロックファイルを再解決でき、mellea_ibmがなくても2つのテストが問題なくスキップされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
45
フォーク
14
平均マージ
5時間 1分
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

IBM/FactReasoner のほかの issue

IBM/FactReasoner の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。