unitedstates / congress

Public domain data collectors for the work of Congress, including legislation, amendments, and votes.
https://github.com/unitedstates/congress/wiki
Creative Commons Zero v1.0 Universal
930 stars 202 forks source link

Pickled confusion #98

Closed JoshData closed 11 years ago

JoshData commented 11 years ago

@GPHemsley : Can you change the new pickling functions so that they use the same data structure for the pickled object as in https://github.com/unitedstates/congress-legislators/blob/master/scripts/utils.py#L307? If a file is read by both repos, the pickled file causes one or the other repo to get confused.

Better might be to remove the pickling code here and reuse the code in congress-legislators, at least to the extent we're already assuming the congress-legislators files are present.

GPHemsley commented 11 years ago

I've implemented the congress-legislators format for congress in #99. I believe this new code is cleaner (and more modular) than the existing code in congress-legislators, so I would want to avoid a direct replacement.

However, I do think it's high time we split out all these utility functions into a more organized place, perhaps even in, say, unitedstates/congress-utils. That way we could make it a truly importable Python module that could be reused in both (and elsewhere) without having to reinvent the wheel each time.

GPHemsley commented 11 years ago

Apparently #95 was recently opened for precisely this proposal, but I missed it because my e-mail filter was wrong. I'll move that discussion over there, and you can just leave this closed once the PR is merged.