dwind.config#
Custom configuration data class to allow for dictionary style and dot notation calling of attributes and Enums for validating configuration data.
Classes
Mixin class providing .values() for Enum classes. |
|
|
Convert between integers and "crb_model" data for efficient storage and retrieval. |
|
Enum validator for breakeven cost optimization strategies. |
|
Enum validator for the scenario to run. |
|
Enum validator for sector inputs. |
|
Enum validator for technology inputs. |
|
Enum validator for analysis year. |
Dict-like class that allows for the use of dictionary style attribute calls on class attributes. |
|
|
Configuration class for reading and converting nested dictionaries to allow for both namespace style and dot notation when collecting attributes. |
- class dwind.config.CRBModel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Convert between integers and “crb_model” data for efficient storage and retrieval.
- static int_map()[source]#
Create a dictionary of int: name for each crb model.
- Return type:
dict
[str
,int
]
- class dwind.config.Configuration(config, *, initial=True)[source]#
Configuration class for reading and converting nested dictionaries to allow for both namespace style and dot notation when collecting attributes.
- Customizations of the input data:
All fields containing “DIR” will be converted to a
pathlib.Path
object.All nested data will be able to be called with dot notation and dictionary-style calls.
The rev.turbine_class_dict is converted to float data automatically.
All data in the [sql] section will get converted to proper constructor strings with the associated username and password data autopopulated with the match
{USER}
andPASSWORD
fields in the same configuration section.
- class dwind.config.Mapping[source]#
Dict-like class that allows for the use of dictionary style attribute calls on class attributes.
- pop(*args)[source]#
Removes and returns the desired argments from
__dict__
if they exist.- Parameters:
*args – Variable length argument list.
- Returns:
values of
__dict__
from keys*args
.- Return type:
Any
- class dwind.config.Optimization(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Enum validator for breakeven cost optimization strategies.
- class dwind.config.Scenario(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Enum validator for the scenario to run.
- class dwind.config.Sector(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Enum validator for sector inputs.
- class dwind.config.Technology(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Enum validator for technology inputs.