Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle VoteEvents that affect multiple bills #12

Open
jamesturk opened this issue Apr 3, 2020 · 5 comments
Open

handle VoteEvents that affect multiple bills #12

jamesturk opened this issue Apr 3, 2020 · 5 comments

Comments

@jamesturk
Copy link
Member

per opencivicdata/pupa#308

@jamesturk jamesturk transferred this issue from openstates/openstates-core Jun 20, 2020
@jamesturk
Copy link
Member Author

pulled in openstates/issues#51 which has some good context

@showerst
Copy link
Contributor

What's your current thinking here for addressing this one?

@jamesturk
Copy link
Member Author

jamesturk commented Sep 16, 2020 via email

@showerst
Copy link
Contributor

Any thoughts on your end? Is this something you all care about being able
to represent in scrapes?

I'd like it in the scrapers, as i'm always a fan of making the data better. I think a method the way you laid it out makes sense.

As for importing those though, I have no idea-- maybe if a VoteEvent has
additional_bills set it shouldnt' have the singular bill set too, since
there isn't really one bill that is favored over the rest.

Yeah that's a tough one -- on the other hand i feel like no matter what we put in the docs, end users are going to build in an assumption that the VoteEvent always has that (single) bill field set, since exceptions are so rare. Plus leaving it empty all of a sudden would

  1. force consumers to update their code, or at least error out on those particular votes
  2. prevent graceful upgrades

If we were starting from scratch i'd say of course we just make the bills a list -- but I feel like at this point that's a big assumption to overturn, so I guess I'd vote we add a new field to the vote model for additional bills, that doesn't duplicate or empty the first bill.

That way existing code keeps working, but it's fairly obvious there's an additional feature to add even if you're looking at normal vote, since there's a new empty field.

I don't feel super strongly about all this, just my 2c.

@jamesturk
Copy link
Member Author

Adding this to scrapes is fairly easy, I have a draft going here: https://github.com/openstates/openstates-core/compare/multi-bill-votes?expand=1

The work to make these import in the proper way is going to be more difficult than I'd thought though. It might need to even wait until some of the bigger changes to the import process happen. The existing import process uses the singular bill id to detect and remove duplicate votes-- a vote with multiple associated bills will present a challenge there, especially since I imagine there are cases where that list of bills would change. I'm going to put this aside for now, maybe we could even introduce it into the scrape code and import code separately so that others can use it in the meantime, but support in the core data model will have to wait until I have a few more cycles to dedicate to this since I don't want to introduce a lot of likely errors with a rushed job.

@jamesturk jamesturk transferred this issue from openstates/issues Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants