electorama / abiftool

Convertion of ABIF to/from other formats
GNU General Public License v3.0
4 stars 2 forks source link

jabmod class vs raw JSON manipulations? #3

Open nealmcb opened 11 months ago

nealmcb commented 11 months ago

Thanks for the maturation of this cool tool and format!

Forgive this mostly-drive-by comment, but would it be clearer and easier to debug and extend, if the code used a python Jabmod class, rather than dictionaries and arrays, converted to json in multiple places?

robla commented 11 months ago

Hi @nealmcb -- thanks for the input! I think the answer to your question (like the answer to many questions) is "it depends". As of 2023, "jabmod" is really just an unstable internal data structure that's available as an unstable API. If someone wanted to stabilize a Python API to "jabmod" (writing the code and proposing an API), there's a 30% chance I'd quickly accept the pull request (no questions asked), and another 40% chance that I'd engage in serious conversation about the pull request that would result in the pull request being accepted within 3 months. I'm not yet ready to build a jabmod API myself, since I don't entirely consider even the jabmod JSON format as stable yet (and arguably, the jabmod JSON format is an API). I don't yet have a known customer for jabmod, so I haven't worried about stabilizing it. If you want to be the first public customer of jabmod, and are willing to share the problem you're trying to solve, I'm really interested in learning what would be most useful to you. So: what problem are you trying to solve?

nealmcb commented 11 months ago

I want to leverage abiftool for yet another raw ranked-ballot file format (i.e. yet another bastardized creation born between Dominion and local election officials who don't understand Dominion's json CVR format, can't redact it, and thus generate their own). See the Cast Vote Record (CVR) at https://bouldercounty.gov/elections/results/

I want a clean class to work with, rather than twiddling json strings.

sassinyourclass commented 11 months ago

Hey Neal, I believe Arend Castelein already did this. He found a repository hosted by FairVote and Harvard with all the CVRs, I believe in a consistent format. You can reach him at arendpeter@equal.vote