docs: `read_gifts` docstring names 5 of the 7 `GIFT_SOURCES`, and two registry comments point at CLI code that is going away

Chiusa Adatta ai principianti
#360 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #373 di @shivamlalakiya — integrata

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
documentation

Direzione di ricerca

Leggi philanthropy/ingest/_read_gifts.py, in particolare le righe da 40 a 80, e aggiorna la docstring di read_gifts e i commenti sopra GIFT_SOURCES e _REGISTRY. Aggiungi un punto sotto [Unreleased] e ### Documentation nel changelog. Esegui il comando doctest specificato e make ci; il lavoro è terminato quando entrambi hanno esito positivo e le descrizioni non dipendono più dai dettagli della CLI né ripetono i nomi delle fonti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

beginner documentation good first issue roadmap
Goal

The read_gifts docstring and the comments next to GIFT_SOURCES and _REGISTRY describe the registry as it is, so a reader of help(read_gifts) sees every CRM it accepts.

What is wrong today

In philanthropy/ingest/_read_gifts.py:

  • The read_gifts docstring says the registry maps "each of civicrm, raisers_edge, npsp, nonprofit_cloud, and blackbaud_crm". That is 5 of the 7 names in GIFT_SOURCES: bloomerang and donorperfect are missing.
  • The comment above GIFT_SOURCES says the names are listed "in the order the CLI's --source choices already list them". The CLI lists only four (_FEATURE_SOURCES in philanthropy/cli.py), and once #338 lands it reads GIFT_SOURCES directly, so the sentence is backwards either way.
  • The comment above _REGISTRY says it has "the same shape as the preset dispatch in cli.py's _cmd_features". #338 removes that dispatch.
Acceptance criteria
  • The docstring points at GIFT_SOURCES instead of naming sources, so the next reader cannot make it stale again (the same rule #339 applies to the README row).
  • The two comments say what the objects are without referring to the CLI.
  • python -m pytest --doctest-modules philanthropy/ingest/_read_gifts.py and make ci pass.
  • One CHANGELOG bullet under [Unreleased], ### Documentation.
Scope

Docstring and comments in one file. No behaviour change.

Where to start
  • philanthropy/ingest/_read_gifts.py, lines 40 to 80
Dependencies
  • None. If #338's PR (#354) is still open, rebase after it merges; the comment edits touch nearby lines only.

Comment on this issue before you start so two people don't build the same thing.

Lingua principale
Python
Stelle
11
Fork
23
Merge medio
1g 6h
PR unite (30g)
35

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PhilanthroPy-Project/PhilanthroPy

Tutte le issue di PhilanthroPy-Project/PhilanthroPy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.