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

Try to fix weeks gaps #23

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Try to fix weeks gaps #23

merged 2 commits into from
Jan 9, 2025

Conversation

ecarreras
Copy link
Member

@ecarreras ecarreras commented Jan 9, 2025

This pull request introduces several changes to the ooui/graph/timerange.py file and its associated test suite to enhance date handling and add support for weekly time ranges. The most important changes include the addition of a new helper function for date parsing, modifications to existing functions to utilize this helper, and updates to the test suite to cover the new functionality.

Improvements to date handling:

  • ooui/helpers/dates.py: Added a new helper function datetime_from_string to handle various date formats, including weekly dates.
  • ooui/graph/timerange.py: Updated functions get_missing_consecutive_dates, convert_date_to_time_range_adjusted, and check_dates_consecutive to use the new datetime_from_string helper function for parsing dates. [1] [2] [3]

Support for weekly time ranges:

  • ooui/graph/timerange.py: Modified the get_date_format function to return the correct format string for weekly dates.
  • spec/graph/timerange_spec.py: Added new test cases to verify the handling of weekly time ranges in get_missing_consecutive_dates, fill_gaps_in_timerange_data, and process_timerange_data. [1] [2] [3]

Related

@ecarreras ecarreras self-assigned this Jan 9, 2025
@ecarreras ecarreras force-pushed the 68454/fix-gaps-week-timerange branch from 6cf300f to 69d4146 Compare January 9, 2025 11:06
@ecarreras ecarreras requested review from a team and davidmunoznovoa and removed request for a team and davidmunoznovoa January 9, 2025 14:29
@ecarreras ecarreras added the bug Something isn't working label Jan 9, 2025
@ecarreras ecarreras requested review from a team and egarciadiaz and removed request for a team and egarciadiaz January 9, 2025 14:29
@polsala polsala merged commit 3f0295a into main Jan 9, 2025
1 check passed
@polsala polsala deleted the 68454/fix-gaps-week-timerange branch January 9, 2025 14:54
@ecarreras ecarreras added the patch Create a Patch version label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Create a Patch version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants