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

Create election package and electionWithGridLayout fixtures for all remaining election fixtures #5758

Open
6 tasks
carolinemodic opened this issue Dec 16, 2024 · 0 comments

Comments

@carolinemodic
Copy link
Contributor

carolinemodic commented Dec 16, 2024

In #5721 we implemented a script to generate an election package from a base election. The intention is that electionBase.json does not include pieces of an election that our code generates such as gridLayouts or ballotStrings. Then the election package generator creates a version of the election with these pieces of information and saves it, and a representative election package for that election in libs/fixtures.

electionFamousNames2021 and electionPrimaryWithPrecinctSplits have already been migrated to have election packages in the PRs listed below
#5732
#5743

Migrating an election involves

  • Update election.json in libs/fixtures to electionBase.json with ballotStrings and gridLayouts removed
  • Adding generation commands to lib/fixture-generators/bin/regenerate-election-packages
  • Running the script above to generate new fixtures, and pnpm build:resources in lib/fixtures to propagate
  • Updating the fixtures index.ts file in libs/fixtures to export properly and automatically replace the export of what is now baseElection to export electionGeneratedWithGridLayouts
  • Add the new fixture to the test in libs/fixture-generators for election packages
  • Fix any breakages in tests that result from this
  • Update tests specifically loading an election package to import the election package fixture
  • If the election is re-imported in libs/hmpb for their fixtures don't re-save the generated election.json. For the election that has many different paper sizes generated in libs/hmpb you will probably still need to save new election.json files

Elections to migrate:

  • electionGeneral - this election is a bit odd in structure with not having language specific ballot styles but having mutli language ballotStrings, its used in a multiLanguage fashion when reimported to libs/hmpb to generate their fixtures on a per paper size basis. Probably a more complicated election to migrate.
  • electionGridLayoutNewHampshireHudson - already has grid layouts and not VxLayout , maybe doesn't need to migrate?
  • electionGridLayoutNewHampshireTestBallot - already has grid layouts and not VxLayout , maybe doesn't need to migrate?
  • electionMultiPartyPrimary
  • electionTwoPartyPrimary - generates cvrs as well, will need to update that script
  • electionWithMsEitherNeither - should we just remove this?

You will need to decide if the election should be multi language or english only, ideally we want to move more fixtures over time to be multi language.

Other future improvements we may want to consider

  • Allow different system settings files to be specified, maybe generate multiple election packages for a given fixture with different system settings
  • Dev dock integration to load election package to usb for VxAdmin configuration
  • The election packages currently have all mocked empty strings for audio
  • Move ballot images from libs/hmpb to libs/fixtures and generate them at the same time as the election package generation
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

1 participant