Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the project’s debug mode to support running a single module for a single year by re-using a pre-existing complete run_id, while avoiding writes to the production database and saving outputs locally instead.
Changes:
- Add a
debugflag to runtime configuration/parsing and propagate it through module entrypoints frommain.py. - When
debugis enabled, skip database inserts/updates in modules and write inputs/outputs to a localdebug_output/folder. - Simplify debug configuration to
{run_id, year, module}and validate that the referenced run is complete.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
python/utils.py |
Exposes DEBUG from parser, adds debug_output/ folder creation, expands runtime logging. |
python/parsers.py |
Reworks debug config to single {run_id, year, module}, validates run completeness, adds module list constant. |
main.py |
Threads debug=utils.DEBUG into all module orchestrators. |
python/startup.py |
Adds debug parameter and skips DB insertion in debug mode. |
python/staging.py |
Adds debug parameter and skips metadata update in debug mode. |
python/hs_hh.py |
Adds debug parameter; writes CSVs instead of DB inserts in debug mode. |
python/pop_type.py |
Adds debug parameter; writes CSVs instead of DB inserts in debug mode. |
python/ase.py |
Adds debug parameter; writes CSVs instead of DB inserts in debug mode (including BULK INSERT bypass). |
python/hh_characteristics.py |
Adds debug parameter; writes CSVs instead of DB inserts in debug mode. |
python/employment.py |
Adds debug parameter; writes CSVs instead of DB inserts in debug mode. |
config.toml |
Updates debug configuration shape to {run_id, year, module} with new comments. |
README.md |
Minor TOML example quoting change for sql.staging. |
.gitignore |
Adds debug_output/ and replaces with a more complete Python .gitignore template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Describe this pull request. What changes are being made?
Upgrades to
debugmode to make it not completely uselessWhat issues does this pull request address?
Additional context
N/A