bug: CLI `--source` accepts only 4 of the 7 `read_gifts` presets
メンテナーはふだん 1 日以内に返信
@ShahadatTest がすでに取り組んでいます。
2026年11月3日 から。
評価
調査の方向性
The hardcoded four-source tuple is _FEATURE_SOURCES in philanthropy/cli.py near line 47, and the if/elif reader chain is in _cmd_features near line 358. Read read_gifts and GIFT_SOURCES in the ingest module first, then check tests/test_cli.py for the existing features tests. Done means features --source accepts every name in GIFT_SOURCES and dispatches through read_gifts. Pull request #354 is already open against this issue, so check with the maintainers before starting.
索引モデルが issue の本文から書いたものです。
説明
What happens
read_gifts and GIFT_SOURCES know seven presets: civicrm, raisers_edge, npsp, nonprofit_cloud, bloomerang, donorperfect, blackbaud_crm. The CLI still hardcodes four:
# philanthropy/cli.py:47
_FEATURE_SOURCES = ("civicrm", "raisers_edge", "npsp", "nonprofit_cloud")
So philanthropy features --source bloomerang --data gifts.csv fails with an argparse "invalid choice" error even though read_gifts(path, source="bloomerang") works. The same tuple gates train --source and check --source.
_cmd_features (philanthropy/cli.py:358) also re-implements the registry with an if/elif chain over the same four sources instead of calling read_gifts, which is how it fell behind each time a new reader landed.
Suggested fix
For features, replace the if/elif chain with ingest.read_gifts(args.data, source=args.source) and use ingest.GIFT_SOURCES as the choices. Keep the existing FileNotFoundError and KeyError handling around the call. Add a test in tests/test_cli.py that features accepts every name in GIFT_SOURCES, so the next reader is picked up automatically.
train --task leadership and check go through _read_raw_gifts, which needs each source's header canonicaliser and has its own bug (#337). Leave their choices on the four supported sources until that is fixed, so this issue stays a one-file change to _cmd_features plus its test.
- 主要言語
- Python
- スター
- 11
- フォーク
- 23
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 31
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PhilanthroPy-Project/PhilanthroPy のほかの issue
-
bug roadmap
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
PhilanthroPy-Project/PhilanthroPy#366 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue roadmap
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
PhilanthroPy-Project/PhilanthroPy#361 ·
メンテナーはふだん 1 日以内に返信
-
beginner documentation good first issue roadmap
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
PhilanthroPy-Project/PhilanthroPy#360 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted roadmap
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PhilanthroPy-Project/PhilanthroPy#345 ·
メンテナーはふだん 1 日以内に返信
-
beginner documentation good first issue roadmap
難易度 2/5 半日 初心者へのやさしさ 68/100
PhilanthroPy-Project/PhilanthroPy#342 ·
メンテナーはふだん 1 日以内に返信
PhilanthroPy-Project/PhilanthroPy の issue をすべて見る
似ている issue
-
flow-measurement measurement
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
MichaelYcJo/SpecSeal#1366 ·
-
bug c/evals c/ui size:L
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Arize-ai/phoenix#17633 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
TransformerLensOrg/TransformerLens#1980 ·
メンテナーはふだん 1 日以内に返信
-
Module: Solr Needs: Lead Needs: Triage Theme: Search Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
internetarchive/openlibrary#14284 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 69/100
SpaceCowMedia/commander-spellbook-backend#1292 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信