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
Reporting backend infrastructure #509
Comments
After refactoring scheduling functionality into
|
Should this become a project with sub-tickets? (then we can also link it on the roadmap) |
Yes. I opened https://github.com/FlexMeasures/flexmeasures/projects/19. |
Closing in favour of project 19. |
We want to be able to automatically produce data derived from existing data, for reporting.
An example are KPIs, but often it's data which is used to better explain to users what happened in the past.
These reports should be triggerable by a CLI command, so we can periodically create and persist reporting data.
Work on this issue will add the CLI command and four generic report functions will be added, which can build many straightforward formulas.
Furthermore, we can lay the foundation for a function store for FlexMeausures and plugins to use.
Outcomes:
flexmeasures add report --name <str> [--input-sensors <Union[List[int], Dict[str, int]]] --output-sensor <int> [--preferred-unit <str>] [--last-hour <bool>] [--yesterday <bool>] [last-week <bool>] [last-month <bool>]
Note: Many arguments are optional, because (a) only one time range identifier is needed and (b) custom reports will often decide sensor and units themselves.app.config["func_store"]["reports"]
. Functions are loaded with the util logic we've just developed for Using custom scheduling algorithms #9. Also provide a utility functionregister_function_in_store(app: Flask, name: str, func: Callable, store: str)
.add_andor_multiply
(from E-mission), the othersadd_andor_divide
,subtract_andor_multiply
andsubtract_andor_divide
.__functions__.py
) underREPORTS
, a list (we could also enable to useSCHEDULERS
, actually, a dict).Potentially we can keep the function store out of this, but it might be necessary in #9 anyways.
The text was updated successfully, but these errors were encountered: