Skip to content

Follow-up work for Sensor data upload #138

@nhoening

Description

@nhoening

PR #135 was merged with some items remaining:

  • Update the Readme (which still uses the old function name post_measurements)
  • Update/expand the test: There is a unit test called test_post_measurements(). That should directly test the new function (and rename it, as well). Actually test both new functionalities (two different API calls). It's rather simple, the code is just testing if the right all to the API would have been made (the call is just mocked, which the m variable is doing).
  • Expand with a boolean parameter. The FM file upload API endpoint has a parameter called belief_time_measured_instantly, which we should also support (you can find it in the SensorDataFileSchema in FlexMeasures). Here is our help text from the UI, should you want to explain it here: "If True, each data point will be recorded as if it had been measured immediately after the event. Otherwise, FlexMeasures will assume the data was not known prior to the time of upload." Not required, defaults to False.
  • Reduce code amount when keeping the old function name (post_measurements) around: save a few lines by not typing out all parameters (use *args and *kwargs in lines 487ff and in lines 507ff)
  • I don't understand this comment in line 445 about "boundary" - can you improve it a bit?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions