Skip to content

Fix download script, add validation config and golden data for NYU TennesseDiabetes - #2150

Open
niveditasing wants to merge 5 commits into
datacommonsorg:masterfrom
niveditasing:nyu_diabetes_tennessee_validation_and_download_fix
Open

Fix download script, add validation config and golden data for NYU TennesseDiabetes#2150
niveditasing wants to merge 5 commits into
datacommonsorg:masterfrom
niveditasing:nyu_diabetes_tennessee_validation_and_download_fix

Conversation

@niveditasing

@niveditasingniveditasing commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This PR includes:

  • Updated download.py to use requests session with browser headers, HTTPAdapter retry policy, and graceful handling of 404 for unreleased years.
  • Added validation_config.json with deleted records threshold and goldens checks for summary report and observations.
  • Added golden_data/ with valid Tennessee state and county golden observations and summary report.
  • Updated manifest.json to include validation_config_file and golden_data source files.

testing results: https://storage.mtls.cloud.google.com/datcom-import-test/statvar_imports/nyu_diabetes/tennessee/NYU_Tennessee_Diabetes/2026_08_10T03_40_57_793708_07_00/input0/validation/validation_output.csv

…nnessee Diabetes import
- Updated download.py to use requests session with browser headers, HTTPAdapter retry policy, and graceful handling of 404 for unreleased years.
- Added validation_config.json with deleted records threshold and goldens checks for summary report and observations.
- Added golden_data/ with valid Tennessee state and county golden observations and summary report.
- Updated manifest.json to include validation_config_file and golden_data source files.

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the download script for Tennessee diabetes mortality data to use a persistent HTTP session with retries, adds golden data files, and introduces a validation configuration. The review feedback suggests improving the retry mechanism by raising HTTP errors inside the decorated fetch function so that retries are properly triggered on failures, and removing the redundant status check in the main download loop.

Comment threadstatvar_imports/nyu_diabetes/tennessee/download.py Outdated
Comment threadstatvar_imports/nyu_diabetes/tennessee/download.py Outdated
@niveditasingniveditasing changed the title Fix download script, add validation config and golden data for NYU Te…Fix download script, add validation config and golden data for NYU TennesseDiabetesAug 11, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@niveditasing