Adds more bill status visibility to the dashboard
This commit is contained in:
1 parent
a104685daf
commit
1919d43bf0
6 files changed
+360
-10
No files matched your search
@@ -12,6 +12,7 @@ from typing import Any, Dict, List, Optional, Tuple
|
||||
from . import data as _data
|
||||
from . import ranking
|
||||
from . import resolve as _resolve
|
||||
from . import bill_status
|
||||
from .data import (load_tag_cloud, list_events,
|
||||
load_legislators, committee_roster_for)
|
||||
from .ranking import hearing_sort, full_queue, personal_band
|
||||
@@ -164,6 +165,14 @@ def _client_bill(ev):
|
||||
out = {k: ev.get(k) for k in _data._EVENT_FIELDS}
|
||||
out["hearing_sort"] = hearing_sort(ev.get("hearing_time"))
|
||||
out["tags"] = ev.get("tags")
|
||||
# API_CONTRACT §5 "upcoming" item 2: label the bill's current state (a
|
||||
# past/terminal floor action shouldn't read as a vague "pending"), and
|
||||
# flag possibly_closed when the source can't disambiguate.
|
||||
st = bill_status.derive_status(ev.get("description"),
|
||||
ev.get("bill_number"))
|
||||
out["status"] = st["status"]
|
||||
out["reason"] = st["reason"]
|
||||
out["possibly_closed"] = st["possibly_closed"]
|
||||
if "relevance" in ev:
|
||||
out["relevance"] = ev["relevance"]
|
||||
return out
|
||||
|
||||
Reference in new issue
Block a user