Adopt py-canon and typed runtime assets - #35
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51d71da135
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Whitespace-only names strip to "", which is not a name; treat it as missing. | ||
| rdf["__first_name"] = first_name.mask(first_name == "") | ||
|
|
||
| if rdf.empty: |
There was a problem hiding this comment.
Validate the dataset before the empty-frame shortcut
When an empty DataFrame is passed with an invalid dataset (for example, dataset="v2-native"), this early return bypasses load_naampy_data() and therefore never performs the new IN_ROLLS_DATA validation; it silently returns a non-native output schema even though the same configuration raises ValueError as soon as a batch contains a row. Validate the dataset key before this shortcut so empty and nonempty batches enforce the same API contract without requiring a download.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9e437e109
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "n_third_gender", | ||
| ], | ||
| ) | ||
| if state is not None and state not in set(adf["state"]): |
There was a problem hiding this comment.
Normalize the Streamlit all-state sentinel
When the deployed Streamlit app's default all option is used, streamlit/streamlit_app.py rewrites it to "" and passes that value as state; this new validation treats every non-None string as a requested state and raises ValueError because the dataset has no empty-string state. As a result, the app's default electoral-roll lookup cannot complete, so normalize blank state values to None or update the wrapper to pass None.
Useful? React with 👍 / 👎.
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29f934e850
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "n_third_gender", | ||
| ], | ||
| ) | ||
| if state is not None and state not in set(adf["state"]): |
There was a problem hiding this comment.
Align the Streamlit Maharashtra value with the dataset key
In the checked Streamlit flow, selecting Maharashtra still passes state="maharashtra" from streamlit/streamlit_app.py, while the published table uses the maharastra key (also documented by this commit). This new validation therefore raises ValueError for that UI option instead of completing the lookup; update the selector value or normalize the alias before validating.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Local verification