solarforecastarbiter.datamodel.RawReport¶
-
class
solarforecastarbiter.datamodel.
RawReport
(generated_at: pandas._libs.tslibs.timestamps.Timestamp, timezone: str, versions: Tuple[Tuple[str, str], ...], plots: solarforecastarbiter.datamodel.RawReportPlots, metrics: Tuple[solarforecastarbiter.datamodel.MetricResult, ...], processed_forecasts_observations: Tuple[solarforecastarbiter.datamodel.ProcessedForecastObservation, ...], messages: Tuple[solarforecastarbiter.datamodel.ReportMessage, ...] = (), data_checksum: Optional[str] = None, outages: Tuple[solarforecastarbiter.datamodel.TimePeriod, ...] = ())[source]¶ Class for holding the result of processing a report request including some metadata, the calculated metrics, plots, the processed forecast/observation data, and messages from report generation. This is called a “raw” report because this object, along with the report parameters, can be processed into a HTML or PDF report.
Parameters: - generated_at (pandas.Timestamp) – The time at report computation.
- timezone (str) – The IANA timezone of the report.
- versions (dict) – Dictionary of version information to ensure the correct version of the core library is used when rendering or recomputing the report.
- plots (
solarforecastarbiter.datamodel.RawReportPlots
) – - metrics (tuple of
solarforecastarbiter.datamodel.MetricResult
) – - processed_forecasts_observations (tuple of
solarforecastarbiter.datamodel.ProcessedForecastObservation
) – - messages (tuple of
solarforecastarbiter.datamodel.ReportMessage
) – - data_checksum (str or None) – SHA-256 checksum of the raw data used in the report.
- outages (Tuple[TimePeriod, ..], optional) – List of report outage periods used when this raw report was generated.
-
__init__
(generated_at: pandas._libs.tslibs.timestamps.Timestamp, timezone: str, versions: Tuple[Tuple[str, str], ...], plots: solarforecastarbiter.datamodel.RawReportPlots, metrics: Tuple[solarforecastarbiter.datamodel.MetricResult, ...], processed_forecasts_observations: Tuple[solarforecastarbiter.datamodel.ProcessedForecastObservation, ...], messages: Tuple[solarforecastarbiter.datamodel.ReportMessage, ...] = (), data_checksum: Optional[str] = None, outages: Tuple[solarforecastarbiter.datamodel.TimePeriod, ...] = ()) → None¶
Methods
__init__
(generated_at, timezone, versions, …)from_dict
(input_dict[, raise_on_extra])Construct a dataclass from the given dict, matching keys with the class fields. replace
(**kwargs)Convience wrapper for dataclasses.replace()
to create a new dataclasses from the old with the given keys replaced.to_dict
()Convert the dataclass into a dictionary suitable for uploading to the API. Attributes
data_checksum
messages
outages