Ejemplo n.º 1
0
    def setUp(self):
        # set up expected values from base client
        bc = BaseClient()
        self.MARKET_CHOICES = bc.MARKET_CHOICES
        self.FREQUENCY_CHOICES = bc.FREQUENCY_CHOICES

        # set up other expected values
        self.BA_CHOICES = BALANCING_AUTHORITIES.keys()
Ejemplo n.º 2
0
    def setUp(self):
        # set up expected values from base client
        bc = BaseClient()
        self.MARKET_CHOICES = bc.MARKET_CHOICES
        self.FREQUENCY_CHOICES = bc.FREQUENCY_CHOICES

        # set up other expected values
        self.BA_CHOICES = BALANCING_AUTHORITIES.keys()
Ejemplo n.º 3
0
 def setUp(self):
     super(TestSVERIGenMix, self).setUp()
     self.bas = [
         k for k, v in BALANCING_AUTHORITIES.items()
         if v['module'] == 'sveri'
     ]
Ejemplo n.º 4
0
 def setUp(self):
     super(TestSVERILoad, self).setUp()
     self.bas = [k for k, v in BALANCING_AUTHORITIES.items() if v['module'] == 'sveri']
Ejemplo n.º 5
0
    'coal': 'coal',
    'hydro': 'hydro',
    'natgas': 'gas',
    'nuclear': 'nuclear',
    'oil': 'oil',
    'refuse': 'biomass',
    'solar': 'solar',
    'wind': 'wind',
    'other': 'unknown'
}

# Note: the list of ISOs is taken from https://github.com/WattTime/pyiso/blob/master/pyiso/__init__.py#L20
# in order to instantiate every possible client
ISO_LIST = {}
# Get a unique list of balancing authorities such that each (module, client) pair is unique
for k, v in BALANCING_AUTHORITIES.iteritems():
    # We obivously exclude the EU
    if k == 'EU': continue
    # Those clients are not working:
    if v['class'] in ['NVEnergyClient', 'SPPClient']: continue
    ISO_LIST[v['class'] + v['module']] = k
ISO_LIST = ISO_LIST.values()

def fetch_production(country_code='US', session=None):
    obj = {
        'countryCode': country_code,
        'production': {},
        'source': 'github.com/WattTime/pyiso'
    }
    for iso in ISO_LIST:
        cli = client_factory(iso)
Ejemplo n.º 6
0
 def setUp(self):
     super(TestSVERIGenMix, self).setUp()
     self.bas = [k for k, v in BALANCING_AUTHORITIES.items() if v["module"] == "sveri"]
Ejemplo n.º 7
0
def get_authorities() -> typing.List[Authority]:
    """Get a list of the balancing authorities."""
    return [Authority(code=code) for code in BALANCING_AUTHORITIES.keys()]