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

Ensure overlaps_with_timerange and intersect_with are consistent #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philipnbbc
Copy link
Contributor

Details

It makes sense to view an overlap occurring if the intersection is not empty.

The same should also happen to the special case of never() and eternity() timeranges. It should return False given that intersect_with returns an empty (never()) timerange.

This also resulted in fixes to the tests for is_contiguous_with_timerange where a timerange is never().

Pivotal Story

Story URL: https://www.pivotaltracker.com/story/show/188190520

Related PRs

Where appropriate. Indicate order to be merged.

Links to external test runs/working deployment

Where appropriate, if separate to default CI run

Submitter PR Checks

(tick as appropriate)

  • PR completes task/fixes bug
  • Tests exercise code appropriately
  • New features and API breaks are flagged in commit messages using magic strings
  • Documentation updated (README, Confluence, Docstrings, API spec, Engineering Guide, etc.)
  • Downstream repos have been checked for potential breaks & fixed as needed
  • APIs/UIs/CLIs updated as required
  • PR added to Pivotal story
  • Follow-up stories added to Pivotal
  • Any temporary code/configuration removed (e.g. test deployment environment, temporary commontooling branch)
  • Any pins against pre-releases have been removed

Reviewer PR Checks

(tick as appropriate)

  • PR completes task/fixes bug
  • Tests exercise code appropriately
  • Design makes sense, and fits with our current code base
  • Code is easy to follow
  • PR size is sensible
  • Commit history is sensible and tidy

Info on Cloudfit PRs

It makes sense to view an overlap occuring if the intersection is not
empty.

The same should also happen to the special case of never() and
eternity() timeranges. It should return False given that intersect_with
returns an empty (never()) timerange.

This also resulted in fixes to the tests for
is_contiguous_with_timerange where a timerange is never().
@philipnbbc philipnbbc requested a review from a team as a code owner November 14, 2024 10:20
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.

1 participant