Making reporters/data generators easier to configure, rerun, and schedule from FlexMeasures #2203
BelhsanHmida
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As a starting point for discussion, I would like to explore how reporters and other data generators could become easier to use operationally, especially without having to maintain YAML files, shell scripts, and external cron entries for recurring reports.
Context
This came up while working on a building-consumption reporter. The actual business logic is simple:
But running it in practice currently means managing several pieces outside the UI:
That works, but it feels like the kind of workflow FlexMeasures could eventually make more user-friendly.
Related context:
PandasReporter/TimelyBeliefsReporterdirectionDataSourceshould be createdAfter discussion, I see three related problems.
1. Data Generator Templates
Similar to how we have structured ways of defining assets, it could be useful to have templates or recipes for data generators.
For reporters, this could mean named templates such as:
These templates could hide most of the raw
PandasReportermachinery from normal users, while still keeping the generic reporter infrastructure available for advanced use cases.2. Creating and Rerunning Data Generators
Reporter config is already saved on
DataSourceattributes when using--save-config, so we already have part of the mechanism needed to rerun a reporter from a stored source.The open question is whether
DataSourceshould remain mainly a provenance object, or whether we need a separate user-facing concept such as aReportDefinition/DataGeneratorDefinition.A possible model could be:
ReportDefinition: editable recipe/template chosen by the userReportRun: one execution with resolved start/end/resolution and job statusReportSchedule: optional recurrence ruleDataSource: immutable-ish provenance for the data that was producedThis would avoid mutating historical provenance when a user edits a report definition.
3. Scheduling from FlexMeasures Instead of External Cron
Once a user can create a data generator definition, the next step is scheduling it.
Today, one analogy is:
plus an external cron line.
A more integrated version could be a CLI command that is run once, for example conceptually:
Or a UI flow from the sensor or asset page:
The sensor page already has a useful precedent with the "Trigger forecast" UI: configure a small set of fields, queue a job, poll status, and show feedback. Reports could reuse that interaction pattern, although some reporters are multi-input or asset-level, so a dedicated Reports page may also be needed.
Design Questions
PandasReporterconfigs, or only curated templates?DataSource: reporter class, config, input sensors, input sources, output sensors, resolution?DataSourcealone, or do we need a separate editable definition?rq-scheduler, or a DB-backed recurrence table that enqueues RQ jobs?Beta Was this translation helpful? Give feedback.
All reactions