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

Disregard targets that are too far into the future #569

Merged
merged 7 commits into from Jan 1, 2023

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Jan 1, 2023

This PR stops raising a ValidationError on too-far-into-the-future targets, and disregards them instead.

The two options for me here are, either:

  1. we allow too-far-into-the-future targets, but disregard them. We follow up (new ticket) by using the 'Warning' HTTP header, and add documentation that API users should monitor these (if they aren't already), or
  2. we grandfather too-far-into-the-future targets for now, and will raise in the future. We follow up (new ticket) by using deprecation and sunset headers, and disallow such targets in the future.

With either option, this PR would be the first step imo.

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@coveralls
Copy link
Collaborator

coveralls commented Jan 1, 2023

Pull Request Test Coverage Report for Build 3817481845

  • 1 of 5 (20.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 65.631%

Changes Missing Coverage Covered Lines Changed/Added Lines %
flexmeasures/data/schemas/scheduling/storage.py 1 2 50.0%
flexmeasures/data/services/scheduling.py 0 1 0.0%
flexmeasures/data/models/planning/storage.py 0 2 0.0%
Totals Coverage Status
Change from base Build 3807038243: -0.02%
Covered Lines: 6867
Relevant Lines: 9835

💛 - Coveralls

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x added this to the 0.12.0 milestone Jan 1, 2023
@Flix6x
Copy link
Contributor Author

Flix6x commented Jan 1, 2023

Amends #568.

None,
"Target datetime exceeds",
),
# todo: add back test in case we stop grandfathering ignoring too-far-into-the-future targets, or amend otherwise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it would be correct to say "... in case we stop grandfathering too-far-into-the-future targets". The "ignoring" is the grandfathering.

@Flix6x Flix6x merged commit 1fd7cc0 into main Jan 1, 2023
@Flix6x Flix6x deleted the disregard-targets-that-are-too-far-into-the-future branch January 1, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants