Skip to content
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

Change usages of datetime.date to tlo.Date in lifestyle module #944

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

matt-graham
Copy link
Collaborator

datetime.date instances are being used in various places in src/tlo/methods/enhanced_lifestyle.py to set start dates of campaigns rather than tlo.Date == pandas.Timestamp instances, which I think is hitting against issue described in #934 and causing differences in population dataframe when simulating with Pandas v1.2.2 and v2.0.0 described in #763 (comment). Will re-run the scale_run.py simulations with this change to see if it removes differences in population dataframes and then report back.

@matt-graham matt-graham marked this pull request as ready for review April 18, 2023 15:30
@matt-graham matt-graham requested a review from tamuri April 18, 2023 15:30
@matt-graham
Copy link
Collaborator Author

Final population dataframes after a 12 month run of scale_run.py script with changes in this PR's branch + fix from #943 are exactly equal when running on Pandas v1.2.2 and v2.0.0 so this does seem to have fixed issue described in #763 (comment).

@tamuri tamuri merged commit a5912b3 into master Apr 18, 2023
@tamuri tamuri deleted the mmg/lifestyle-datetime-fixes branch April 18, 2023 19:37
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.

2 participants