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

Get resampled data #458

Merged
merged 12 commits into from
Jul 12, 2022
Merged

Get resampled data #458

merged 12 commits into from
Jul 12, 2022

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Jul 8, 2022

This PR introduces the "resolution" field to /sensors/data (GET) to obtain data in a given resolution.

Flix6x added 11 commits July 8, 2022 19:50
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>
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>
@Flix6x Flix6x self-assigned this Jul 8, 2022
@coveralls
Copy link
Collaborator

coveralls commented Jul 8, 2022

Pull Request Test Coverage Report for Build 2656017059

  • 2 of 3 (66.67%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.003%) to 68.367%

Changes Missing Coverage Covered Lines Changed/Added Lines %
flexmeasures/api/common/schemas/sensor_data.py 1 2 50.0%
Totals Coverage Status
Change from base Build 2637707449: -0.003%
Covered Lines: 7097
Relevant Lines: 9846

💛 - Coveralls

@Flix6x Flix6x marked this pull request as ready for review July 8, 2022 22:38
@Flix6x Flix6x added this to the 0.11.0 milestone Jul 8, 2022
@Flix6x Flix6x requested a review from nhoening July 8, 2022 22:38
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Looks clean.

I have a general question about testing.

),
],
)
def test_resolution_field_deserialization(
Copy link
Contributor

Choose a reason for hiding this comment

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

So here we're testing that timely beliefs changes the representation of the field.
Is there no need to use some data to test resolution adaptations? Do we already test that someplace else (testing the search function?

I noticed that in the API level we are not testing GETting sensor data, just posting...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not timely-beliefs. This checks whether the given marshmallow schema in FlexMeasures parses these particular ISO durations as python timedeltas. I'd love to extend this with some nominal durations, but unfortunately timely-beliefs only works with absolute durations for now. I'll add this info to the test.

Low level tests for resampling data should happen in timely-beliefs imo.

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x merged commit 6e134bd into main Jul 12, 2022
@Flix6x Flix6x deleted the get-resampled-data branch July 12, 2022 11:10
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