energy_analysis_toolbox.errors package#

Defines all custom errors used in energy_analysis_toolbox.

This package contains all the specific exceptions used and raised by energy_analysis_toolbox library.

Base class for all custom errors#

All exceptions in energy_analysis_toolbox derive from the class below. Catching this class will catch any exception specific to energy_analysis_toolbox library, whatever its type.

Defines basic custom errors.

exception energy_analysis_toolbox.errors.base.EATEmptyDataError[source]#

Bases: EATError

An empty data container is passed, but this case cannot be managed.

exception energy_analysis_toolbox.errors.base.EATError[source]#

Bases: Exception

The base class for all except in energy_analysis_toolbox.

All exceptions of energy_analysis_toolbox library should inherit this class, such that exceptions specific to this lib can easily be caught/identified.

Errors related to timeseries consistency#

Defines custom errors for time-series.

exception energy_analysis_toolbox.errors.invalid_timeseries.EATInvalidTimeseriesError[source]#

Bases: EATError

A timeseries is inconsistent.

This exception is used to notify a problem regarding the consistency of a timeseries definition.

Derived classes may be inherited in order to deal with more specific problems.

exception energy_analysis_toolbox.errors.invalid_timeseries.EATInvalidTimestepDurationError[source]#

Bases: EATInvalidTimeseriesError

An invalid timestep duration has been passed for a timeseries.

This exception is used when a timestep duration is encountered which does not comply with implicit or explicit assumptions about the possible timestep durations in a timeseries. Such assumptions could be :

  • durations are >=0,

  • durations have a specific value,

  • etc.

exception energy_analysis_toolbox.errors.invalid_timeseries.EATUndefinedTimestepError[source]#

Bases: EATInvalidTimeseriesError

A timestep is undefined in an interval-sampled timeseries.

A timestep duration is undefined, either explicitly or implicitly in a timeseries which contain values defined “over overconsumption” (VS at instantaneous timestamps).

Errors related to resampling#

Defines custom errors about resampling.

exception energy_analysis_toolbox.errors.resampling.EATEmptySourceError[source]#

Bases: EATResamplingError, EATEmptyDataError

Resampling an empty timeseries to specific instants is impossible.

This exception is used when :

  • a resampling operation is undefined/meaningless when the source data is empty,

  • empty data is passed as source.

exception energy_analysis_toolbox.errors.resampling.EATEmptyTargetsError[source]#

Bases: EATResamplingError, EATEmptyDataError

Resampling a timeseries to empty targets is meaningless in this situation.

This exception is used when :

  • a resampling operation is undefined/meaningless when the target instants set is empty,

  • empty data is passed as targets.

exception energy_analysis_toolbox.errors.resampling.EATResamplingError[source]#

Bases: EATError

A resampling operation is impossible.

This base class is used when an invalid resampling operation is attempted in energy_analysis_toolbox. Derived classed may be used for more specific resampling errors.