Skip to content

feat: date sanity - #131

Open
g-pechorin wants to merge 8 commits into
mainfrom
feat.date-sanity
Open

g-pechorin wants to merge 8 commits into
mainfrom
feat.date-sanity

Conversation

@g-pechorin

Copy link
Copy Markdown
Contributor
✨ Feature

PR Description

Tests and checks to be sure dates aren't outside of a sensible range.

... so when people type 19/12/1008 instead of 19/11/2008 we can catch it ...

Related Issues or other material

Related #
Closes #117

Screenshots, example outputs/behaviour etc.

✅ Added/updated tests?

  • This PR contains relevant tests / Or doesn't need to per the below explanation

[optional] What gif best describes this PR or how it makes you feel?

alt_text

@g-pechorin
g-pechorin requested a review from AndyRae as a code owner September 1, 2026 15:56
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissBranchBrPartCoverMissing
nuh_helper/date_shift
   __init__.py304211222088%163->172, 181, 269->267, 271->265, 390->404, 414->429, 416, 503->505, 505->508, 511->514, 582, 608, 631, 644, 652–659, 695, 717–721, 731, 735, 741
   _excel.py942256771%27->26, 34, 124–137, 174, 207->213, 220–231
   _parse.py30516285%31–40
nuh_helper/profile
   __init__.py178254298%180->183, 255–256
TOTAL626502523188% 

Tests Skipped Failures Errors Time
96 0 💤 0 ❌ 0 🔥 7.332s ⏱️

seed: Optional random seed for generating shifts.
patient_header_row: Zero-based header row index for the patient sheet (default: 0).
patient_skip_rows: Optional zero-based row indices to exclude from patient data.
sanity_date_latest, sanity_date_earliest: latest and earliest dates allowed in the data. used as a sanity check

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also needs adding to the readme

@g-pechorin g-pechorin changed the title Feat.date sanity feat: date sanity Sep 4, 2026
Comment thread nuh_helper/date_shift/__init__.py Fixed
@g-pechorin
g-pechorin marked this pull request as draft September 4, 2026 12:37
@g-pechorin
g-pechorin marked this pull request as ready for review September 16, 2026 13:32
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.

date limits and "sanity" checks

3 participants