Issue #217: Autogenerate sample data from sample manifests#362
Open
Francis220 wants to merge 1 commit intoElection-Tech-Initiative:mainfrom
Open
Issue #217: Autogenerate sample data from sample manifests#362Francis220 wants to merge 1 commit intoElection-Tech-Initiative:mainfrom
Francis220 wants to merge 1 commit intoElection-Tech-Initiative:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #217
Description
Adds the first slice of generated sample data support.
The repo stores generated sample election JSON files directly in
data/. Those files can get stale when the Python SDK changes. The issue asks to keep the sample manifests as the source of truth, then generate sample data during release instead of manually storing/updating it all.This PR:
data/sample/manifestsscripts/generate_sample_data.pyto generate sample data usingelectionguard-pythonelectionguard==1.4.0targets Python 3.9, while the existing docs workflow continues using its current Python versionsample-data.zipandsample-data.tar.gzThis intentionally does not remove the existing checked-in generated sample data yet. That cleanup would remove ~200 generated JSON files, so I kept it separate to make this generation path easier to review first. To be addressed in a separate PR :)
Testing
Validated locally with:
PYTHONPYCACHEPREFIX=/private/tmp/codex_pycache python3 -m py_compile scripts/generate_sample_data.pygit diff --checkelectionguard==1.4.0 dacite==1.6.0 hypothesisminimal,small,full, andhamilton-general/private/tmp/electionguard-docs-venv/bin/mkdocs buildsuccessfully