Skip to content

Adopt py-canon and typed runtime assets - #35

Merged
soodoku merged 8 commits into
masterfrom
agent/hf-model-assets
Aug 17, 2026
Merged

Adopt py-canon and typed runtime assets#35
soodoku merged 8 commits into
masterfrom
agent/hf-model-assets

Conversation

@soodoku

@soodoku soodoku commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

  • move the checkpoint out of the wheel to a pinned Hugging Face revision
  • restore the current py-canon standard: src layout, uv_build, reusable workflows, and flat Sphinx docs without notebook tooling
  • convert Dataverse CSV.gz transports into validated atomic Parquet runtime caches with an explicit Arrow schema
  • preserve input indices and output-column contracts, reject invalid state/year filters, and avoid data downloads for empty input
  • prepare version 0.10.0 with reproducible changelog and documentation

Local verification

  • 42 passed, 27 skipped, 1 live test deselected
  • Ruff lint and format clean
  • Pyright: 0 errors
  • pydoclint: 0 violations
  • Sphinx HTML and doctest builds clean
  • preen: all checks passed
  • full 10,226,249-row v2_1k CSV-to-Parquet conversion and source-count equivalence passed
  • wheel/sdist build and Twine metadata checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/naampy/in_rolls_fn.py
# 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@soodoku

soodoku commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/naampy/in_rolls_fn.py
"n_third_gender",
],
)
if state is not None and state not in set(adf["state"]):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@soodoku

soodoku commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@codex review

@soodoku

soodoku commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/naampy/in_rolls_fn.py
"n_third_gender",
],
)
if state is not None and state not in set(adf["state"]):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@soodoku

soodoku commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 4e43044145

ℹ️ 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".

@soodoku

soodoku commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@codex review exact commit 4e43044

@soodoku
soodoku merged commit c75d251 into master Aug 17, 2026
12 checks passed
@soodoku
soodoku deleted the agent/hf-model-assets branch August 17, 2026 08:32
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 4e43044145

ℹ️ 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".

Sign up for free to 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