annular.utils

Classes

Sense

Initialize self. See help(type(self)) for accurate signature.

Functions

read_csv_with_utc_timestamps(→ pandas.DataFrame)

Load a CSV file, using column 0 as index, and converting the index to UTC timestamps.

patch_expected_price(→ list[float])

Create a list of expected prices.

negate_supply_bids_for_summarize(bids)

Negate supply bid quantities for correct summarization.

silence_noisy_loggers()

Silence logging of dependencies.

Module Contents

class annular.utils.Sense[source]

Bases: enum.IntEnum

Initialize self. See help(type(self)) for accurate signature.

DEMAND = 1[source]
SUPPLY = -1[source]
annular.utils.read_csv_with_utc_timestamps(path: pathlib.Path | str) pandas.DataFrame[source]

Load a CSV file, using column 0 as index, and converting the index to UTC timestamps.

Parameters:

path – Path to the CSV file.

Returns:

DataFrame of the CSV file with index as UTC timestamps.

annular.utils.patch_expected_price(base_forecast: pandas.DataFrame, horizon: pandas.Index, forecast: pandas.DataFrame) list[float][source]

Create a list of expected prices.

For the specified horizon, replaces the base forecast with the given forecast.

Parameters:
  • base_forecast – The base forecast.

  • horizon – Time horizon to use.

  • forecast – Dataframe with to-be-used forecast.

Returns:

A list of expected prices.

annular.utils.negate_supply_bids_for_summarize(bids: pandas.DataFrame)[source]

Negate supply bid quantities for correct summarization.

Parameters:

bids – bid dataframe with all indexes.

Returns:

Dataframe with supply quantity negated and sense column removed.

annular.utils.silence_noisy_loggers()[source]

Silence logging of dependencies.