bug: CLI `--source` accepts only 4 of the 7 `read_gifts` presets
Los mantenedores suelen responder en 1 día
@ShahadatTest ya está trabajando en esto.
Desde el 3/11/2026.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 30/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 11
- Forks
- 23
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 34
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PhilanthroPy-Project/PhilanthroPy
-
bug roadmap
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
PhilanthroPy-Project/PhilanthroPy#366 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue roadmap
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
PhilanthroPy-Project/PhilanthroPy#361 ·
Los mantenedores suelen responder en 1 día
-
enhancement help wanted roadmap
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PhilanthroPy-Project/PhilanthroPy#345 ·
Los mantenedores suelen responder en 1 día
-
beginner documentation good first issue roadmap
Dificultad 2/5 Medio día Aptitud para principiantes 68/100
PhilanthroPy-Project/PhilanthroPy#342 ·
Los mantenedores suelen responder en 1 día
-
beginner enhancement good first issue roadmap
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PhilanthroPy-Project/PhilanthroPy#340 ·
Los mantenedores suelen responder en 1 día
Todos los issues de PhilanthroPy-Project/PhilanthroPy
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
pylint-dev/pylint#11791 ·
Los mantenedores suelen responder en 1 día
-
Rasterio granule reads never retry, so one 503 (Service Unavailable) fails the whole requestPosiblemente ocupada @chuckwondo la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
developmentseed/titiler-cmr#305 ·
Los mantenedores suelen responder en 1 día
-
community enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día