opencivicdata / scrapers-us-municipal

Scrapers for US municipal governments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metro: Add indication of minutes status to minutes document or relevant event

hancush opened this issue · comments

Metro has asked that only approved minutes be shown on the event listing page (Metro-Records/la-metro-councilmatic#854). We don't currently store an indication of minutes status in the database. The EventDocument model does not have an extras dictionary, so we have a couple of options:

  • Implement a standard naming convention indicating status for the notes field on the EventDocument model, e.g., ${STATUS - DRAFT OR APPROVED} - Minutes file name
    • I am not sure whether updating the note for existing minutes files will create duplicates in the database. If we go that route, we'll need to take a look at how EventDocuments are resolved in pupa. If resolution includes the note field, existing EventDocuments will be duplicated.
  • Add a Boolean, something like minutes_approved, to the Event extras dictionary

@antidipyramid I'm actually liking the event extras idea, but what do you think?

commented

@hancush I also prefer using a boolean in EventDocument extras. Having to parse the notes field string every time you want to get the approval status seems a bit tedious.

Awesome, @antidipyramid. Want to take a crack at implementing that change in a PR against this repo?

commented

@hancush Sure but the EventDocument model is defined here in opencivicdata/python-opencivicdata. Wouldn't we have to add an extras attribute there?

@antidipyramid Ah, I think we're out of sync. I propose adding the Boolean to the existing extras dict on the related Event, that way we don't have to make any model changes. Make sense?

commented

@hancush OK I think I see where it misunderstood! We'd be adding a boolean to the extras dict like we do here for a GUID.