-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match date formats to concept model #218
Conversation
for date_column in [COLUMNS.dob.name, COLUMNS.ssa_event_date.name]: | ||
# Format both the actual column, and the shadow version that will be used | ||
# to copy from a household member | ||
for column in [date_column, COPY_HOUSEHOLD_MEMBER_COLS.get(date_column)]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes an unrelated bug I ran into: when a copy-within-household was performed, the column would become partially strings (original values) and partially true datetimes (copied values). This was silently failing in the swap month and day noise function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this Zeb! It looks like you need to lint it to get it through the automatic tests, and it might be timing out, too, which is addressed in a recent PR by Steve to mark some tests as slow.
Match date formats to concept model
Description
As documented in the concept model, the date formats should be:
This PR brings pseudopeople into alignment with this. Previously, WIC incorrectly used the default, and SSA incorrectly used the default in the date of birth column.
This turned out to be a much more involved change than I realized: previously, date format was incorrectly modeled as an attribute of the column when it is really an attribute of the dataset. Please let me know if I've done this wrong.
Testing
Ran all tests, including with
--runslow
. Manually stepped through the swap month and day noise function to ensure it was handling the new date format correctly.