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

Use demo data to generate PDF for single precinct #77

Closed
stratofax opened this issue Aug 19, 2022 · 0 comments · Fixed by #98
Closed

Use demo data to generate PDF for single precinct #77

stratofax opened this issue Aug 19, 2022 · 0 comments · Fixed by #98
Assignees
Labels
enhancement New feature or request

Comments

@stratofax
Copy link
Collaborator

Implement a new subcommand, ballotmaker demo, that will:

  1. Extract EDF data from JSON file for a single ballot by hand and, wherever possible, by using NISTlib to extract multiple records (for example, Candidates).
  2. Create Python objects (dictionaries) from the extracted data.
  3. Organize the election data into an ElectionData-type object.
  4. Generate the PDF ballot based on the demo ElectionData and write it to the file system.

This is the shortest path to generate a PDF ballot from data that's literally been extracted from a JSON EDF. Since we've demonstrated conclusively that we can extract data using NISTLib (and will, in fact, use NISTLib to extract most of the demo data), we don't need to use NISTLib to extract data at runtime.

Instead, by extracting the data to static dictionary objects, we can:

  • Focus on extracting only the data we need to draw the ballots.
  • Create static classes that can later be used to test the software.
  • Audit our data extraction commands to ensure we're getting the data we expect.
@stratofax stratofax added the enhancement New feature or request label Aug 19, 2022
@stratofax stratofax self-assigned this Aug 19, 2022
@stratofax stratofax linked a pull request Aug 29, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant