flexmeasures.data.schemas.reporting.pandas_reporter
Classes
- class flexmeasures.data.schemas.reporting.pandas_reporter.PandasMethodCall(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool | None = None, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet | None = None, unknown: str | None = None)
- validate_method_call(data, **kwargs)
Validates the method name and its arguments against a set of base classes.
This validation ensures that the provided method exists in one of the specified base classes (BeliefsSeries, BeliefsDataFrame, Resampler, Grouper) and that the provided arguments (args and kwargs) are valid for the method’s signature.
- Args:
- data (dict): A dictionary containing the method name (method) and optionally
the method arguments (args as a list and kwargs as a dictionary).
**kwargs: Additional keyword arguments passed by the validation framework.
- Raises:
- ValidationError: If the method is not callable in any of the base classes or
if the provided arguments do not match the method signature.
- class flexmeasures.data.schemas.reporting.pandas_reporter.PandasReporterConfigSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool | None = None, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet | None = None, unknown: str | None = None)
This schema lists fields that can be used to describe sensors in the optimised portfolio
Example:
- {
- “required_input”[
{“name” : “df1”, “unit” : “MWh”}
], “required_output” : [
{“name” : “df2”, “unit” : “kWh”}
], “transformations” : [
- {
“df_input” : “df1”, “df_output” : “df2”, “method” : “copy”
}, {
“df_input” : “df2”, “df_output” : “df2”, “method” : “sum”
}, {
“method” : “sum”, “kwargs” : {“axis” : 0}
}
],
}
- validate_chaining(data, **kwargs)
This validator ensures that we are always given an input and that the final_df_output is computed.
- class flexmeasures.data.schemas.reporting.pandas_reporter.PandasReporterParametersSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool | None = None, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet | None = None, unknown: str | None = None)
- validate_time_parameters(data, **kwargs)
This method validates that all input sensors have start and end parameters available.