nrel.hive.config.hive_config
Module Contents
Classes
Typed version of namedtuple. |
Attributes
- class nrel.hive.config.hive_config.HiveConfig[source]
Bases:
NamedTupleTyped version of namedtuple.
Usage in Python versions >= 3.6:
class Employee(NamedTuple): name: str id: int
This is equivalent to:
Employee = collections.namedtuple('Employee', ['name', 'id'])
The resulting class has an extra __annotations__ attribute, giving a dict that maps field names to types. (The field names are also in the _fields attribute, which is part of the namedtuple API.) Alternative equivalent keyword syntax is also accepted:
Employee = NamedTuple('Employee', name=str, id=int)
In Python versions <= 3.5 use:
Employee = NamedTuple('Employee', [('name', str), ('id', int)])
- global_config: nrel.hive.config.global_config.GlobalConfig
- input_config: nrel.hive.config.input.Input
- network: nrel.hive.config.network.Network
- scenario_output_directory: pathlib.Path
- classmethod build(scenario_file_path: pathlib.Path, config: Dict | None = None, output_suffix: str | None = None) Exception | HiveConfig[source]
builds a hive config by reading from a scenario file. optionally append additional key/value pairs and modify the datetime convention for naming output directories. :param scenario_file_path: path to the file to load as a HiveConfig :param config: optional overrides to the default config values (Default: None) :param output_suffix: directory name suffix to append to sim_name (by default, timestamp) :return: a hive config or an error
- classmethod from_dict(d: Dict, scenario_file_path: pathlib.Path, output_suffix: str | None) HiveConfig[source]
- set_scenario_output_directory(output_directory: pathlib.Path) HiveConfig[source]
- suppress_logging() HiveConfig[source]