openstates / issues

Having trouble? Looking to contribute? Issues live here!
15 stars 2 forks source link

Changes to the version/document data model #15

Closed showerst closed 4 years ago

showerst commented 4 years ago

I propose we add an enum to versions and documents to clearly identify some common version/document types --

Versions: amendment, substitute, enrolled, "final one that became law" Documents: fiscal note, committee report, synopsis

jamesturk commented 4 years ago

if this is still of interest & you all have cycles to collaborate on this I'd be glad to pick it up

showerst commented 4 years ago

Sure, what would be most helpful? I may be too busy this week to PR the change but happy to provide some ideas for the types.

jamesturk commented 4 years ago

Yeah, ideas for the types would be great- I'm not in a big rush to get this in but trying to move on a few of these schema-type things that were harder to do before the move to openstates-core

On Tue, Aug 11, 2020 at 11:49 AM showerst notifications@github.com wrote:

Sure, what would be most helpful? I may be too busy this week to PR the change but happy to provide some ideas for the types.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/openstates/issues/issues/15#issuecomment-672029546, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAB6YXSSW4JYMCW7JOJK53SAFR6PANCNFSM4ODD45DA .

showerst commented 4 years ago

I went through all the scrapers and our data and took a look --

For bills --

Versions:

[1] - Maybe this should be filed to match the status.

[2] - I'm thinking of amendment not as 'amended version of the bill' which is most versions, but cases where they only publish amendment instructions.

For my cases the biggies there are:

substitutes, amendments, and became-law -- those fit the common use cases of 'i need to see (or filter out) recent amendments', 'oh was this bill substituted with something totally different' and 'what was the final final text of this'

There's substantial overlap here with action classes, but I figure having the extra metadata on the versions is also pretty useful.

Documents:

If you're in the mood to mess with events too -

Documents

Code wise I was envisioning something simple --

bill.add_version_link(
    name="HB 123 ENR",
    url="https://google.com/enr.pdf",
    media_type='application/pdf'
    classification='enrolled',
)
jamesturk commented 4 years ago

this behavior was added in openstates-core 5.1.0 and is now available