nrel.hive.app.run_batch

Module Contents

Classes

BatchConfig

Typed version of namedtuple.

SimArgs

Typed version of namedtuple.

Functions

safe_sim(→ int)

run(→ int)

entry point for a hive application run

_welcome_to_hive()

Attributes

parser

log

nrel.hive.app.run_batch.parser
nrel.hive.app.run_batch.log[source]
class nrel.hive.app.run_batch.BatchConfig[source]

Bases: NamedTuple

Typed 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)])
scenario_files: List[pathlib.Path]
classmethod from_dict(d: dict) BatchConfig[source]
class nrel.hive.app.run_batch.SimArgs[source]

Bases: NamedTuple

Typed 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)])
scenario_file: pathlib.Path
nrel.hive.app.run_batch.safe_sim(sim_args: SimArgs) int[source]
nrel.hive.app.run_batch.run() int[source]

entry point for a hive application run :return: 0 if success, 1 if error

nrel.hive.app.run_batch._welcome_to_hive()[source]