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

Better date handling #49

Merged
merged 6 commits into from
May 6, 2024
Merged

Better date handling #49

merged 6 commits into from
May 6, 2024

Conversation

cmutel
Copy link
Member

@cmutel cmutel commented May 6, 2024

The current handling of start and end dates was... very creative. This is better:

  • It doesn't assume that endDate is present just because startDate is.
  • It can handle inputs and outputs of dates >= day 10 in the month
  • It has tests for most (all?) possible combinations
  • It uses builtin functionality for date handling
  • It doesn't default to January 1st for end dates, but correctly finds the last day and month as needed
  • It checks that start < end
  • It puts tests fixtures in the tests directory

Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.92%. Comparing base (5182564) to head (7d9be29).
Report is 8 commits behind head on main.

❗ Current head 7d9be29 differs from pull request most recent head ec1bb79. Consider uploading reports for the commit ec1bb79 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   99.53%   99.92%   +0.38%     
==========================================
  Files           7        7              
  Lines        1280     1269      -11     
==========================================
- Hits         1274     1268       -6     
+ Misses          6        1       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmutel
Copy link
Member Author

cmutel commented May 6, 2024

The readthedocs error doesn't have anything to do with this PR, and it looks like the docs build has been broken for a while.

@sami-m-g sami-m-g merged commit 1dea133 into brightway-lca:main May 6, 2024
1 check failed
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