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

Deprecate sensors/data API endpoints to require the entity address #1180

Open
nhoening opened this issue Sep 18, 2024 · 0 comments
Open

Deprecate sensors/data API endpoints to require the entity address #1180

nhoening opened this issue Sep 18, 2024 · 0 comments
Labels
Milestone

Comments

@nhoening
Copy link
Contributor

The sensor ID should be enough, like with all other endpoints. We might be able to retire entity addresses completely after sunsetting this feature.

The whole ¸SensorField part of our schemas, where an entity address is (de)serialized, is only used twice - in the GET and POST endpoint for sensor data.

class SensorField(fields.Str):
    """Field that de-serializes to a Sensor,
    and serializes a Sensor into an entity address (string).
    """

This should not be used anymore. First, we should deprecate the field in both endpoints, and add the SensorIDField as another option to use. We should document only that option in the endpoint docstring.

Remember our strategy for deprecating things: https://flexmeasures.readthedocs.io/en/latest/api/introduction.html#deprecation-and-sunset

@nhoening nhoening added the API label Sep 18, 2024
@nhoening nhoening added this to the 0.24.0 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant