Add GET /_debug/modules listing all modules with their elections and demographic columns - #758
Merged
Conversation
…aphic columns Debug/monitoring endpoint next to /_debug/cache: every DistrictrMap row (visible or not) with a curated field set — name, visible, map_type, num_districts, num_districts_modifiable — plus the elections and demographic columns derived live from the module's gerrydb table, using the same column-name conventions as EvaluationContext. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ntext elections_from_columns and demographic_columns_from_columns now live in app/evaluation/context.py, used by both EvaluationContext and the /_debug/modules endpoint, so the column-name convention has one definition. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
It is the sort key for the listing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
New debug/monitoring endpoint alongside
/_debug/cache. It returns every module — invisible ones included — with a curated field set:districtr_map_slug,name,visible,map_type,num_districts,num_districts_modifiable, plus theelectionsanddemographic_columnsavailable on the module's gerrydb table, read live from the database catalog.Like the rest of
/_debug/*, the ALB serves it inside the VPC only (internet requests get a 403). On production and dev, need to use AWS's ECS to open a shell session on backend to print this information.Tested
localhost:8000/_debug/modules