bug: CLI `--source` accepts only 4 of the 7 `read_gifts` presets
Maintainer thường phản hồi trong vòng 1 ngày
@ShahadatTest đang làm issue này rồi.
Từ ngày 3/11/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 11
- Fork
- 23
- Merge trung bình
- 2 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PhilanthroPy-Project/PhilanthroPy
-
bug roadmap
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
PhilanthroPy-Project/PhilanthroPy#366 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue roadmap
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
PhilanthroPy-Project/PhilanthroPy#361 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
beginner documentation good first issue roadmap
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
PhilanthroPy-Project/PhilanthroPy#360 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement help wanted roadmap
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PhilanthroPy-Project/PhilanthroPy#345 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
beginner documentation good first issue roadmap
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 68/100
PhilanthroPy-Project/PhilanthroPy#342 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PhilanthroPy-Project/PhilanthroPy
Issue tương tự
-
bug severity:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
curriculum documentation quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
githubnext/gh-aw-workshop#5367 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
OAuth documentation for GET /api/v2/users/me/ appears inconsistent with required global read scopeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Create Noise Latents ignores randomize_seed and produces the same noise every runCó thể đã có người làm @griptapeops đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
griptape-ai/griptape-nodes-library-diffusers#127 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Jenkins capacity report: metrics history is lost when archiving a month failsCó thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
adoptium/infrastructure#4568 ·
Maintainer thường phản hồi trong vòng 1 ngày