Skip to content

fix: sample age dates across the column - #456

Merged
yakew7 merged 2 commits into
yakew7:mainfrom
be-student:codex/432-representative-date-sample
Sep 6, 2026
Merged

fix: sample age dates across the column#456
yakew7 merged 2 commits into
yakew7:mainfrom
be-student:codex/432-representative-date-sample

Conversation

@be-student

Copy link
Copy Markdown
Contributor

Summary

  • sample up to 200 non-null values deterministically across the whole age column
  • keep columns categorical when at least half of the sample is date-shaped
  • preserve identical Python and browser behavior when dates appear after numeric ages

Type

  • Bug fix

Linked issue

Closes #432

Testing

  • python -m pytest -q (219 passed, 34 skipped)
  • focused profiler/parity suite (54 passed, 1 skipped)
  • em dash and internal-link checks
  • Ruff on changed Python files

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

@be-student is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

@yakew7 @Shreyash0712 @ahmdkaml - new PR touching a path you own, please review.

@yakew7
yakew7 merged commit fba3da0 into yakew7:main Sep 6, 2026
12 of 13 checks passed
yakew7 added a commit that referenced this pull request Sep 6, 2026
PR #455 and #456 both added a new test function at the exact same
insertion point in tests/test_js_parity.py, and the merge that landed
both spliced their bodies together wrong:
test_python_js_profiler_parity_detects_dates_appended_after_numeric_ages
lost its entire body (profile() call, node subprocess, comparison) after
its setup lines, silently passing with zero assertions ever executed -
while test_python_js_profiler_parity_rejects_negative_age_sentinels
picked up an extra, contradictory assertion
(`all(dim["name"] != "age" ...)`) that belongs to the other test and
directly conflicts with its own next line, making it fail outright.

Verified against each PR's original individual commit (f071a2b, 6ed1369)
to reconstruct the correct, complete body for both functions rather than
guessing. Both now pass, restoring real coverage for the date-sampling
fix (#432) that this exact splice had been silently not testing at all.
yakew7 added a commit that referenced this pull request Sep 6, 2026
First appearance - a full-backlog sweep of issues found in review, in one
day (#448-#456). Snapshot bumped to PR #456; added to the Contributions-
by-area table and Git identity map (eunwoo song); README/METRICS
contributor counts synced 27 -> 28.
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.

profiler.py's date-vs-age detection only samples the first 50 rows, missing dates mixed in later

2 participants