OpenBudget / open-budget-frontend

Israeli budget web apps
19 stars 32 forks source link

Highlight known dictionary in transfer requests #327

Open mushon opened 8 years ago

mushon commented 8 years ago

To quickly understand the reasons or type for transfer highlight certain keywords:

mushon commented 8 years ago

@azk

azk commented 8 years ago

I'm leveraging this issue to start learning the openbudget codebase(s), so I apologize if this is a little long for a comment...

As far as I could find, there are a number of places in the various repos where transfer "explanations" can be manipulated as required, and I'm not sure where it would make the most sense to add the term highlighting.

Namely:

  1. Data upload phase:

    [ rss.py processor (not sure where it's being used) makes use of the ChangeExplanation model API to get the explanation ]

  2. API:
  3. Views:

As you can tell I still have some holes regarding how things work together...

My thought is to modify the explanation field in the ChangeExplApi get_query method, as it would immediately reflect any changes to the term dictionary or highlighting method to all data.

And an unrelated question: how do you test the backend with Google App Engine?

Thank you!

mushon commented 8 years ago

@akariv please review and resond to @azk's questions either before the meetup tonight or at it.

akariv commented 8 years ago

@azk Some of the data already exists (e.g. the kind of the change "עודפים" etc. is a per-change parameter). This data needs to be aggregated from the Change level into the ChangeGroup level. This happens in processors/extract_change_groups.py (only code that runs is in processors/). Other than that, I would put the other known-phrase highlighting in the client side. A cool first project would be to just find gov decisions ("החלטת ממשלה מספר") and get their actual content using this API: https://ceci.yit.co.il/help

Adam