-
Notifications
You must be signed in to change notification settings - Fork 7
/
__init__.py
65 lines (55 loc) · 1.69 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"""Sup3r utilities"""
import sys
import pandas as pd
import numpy as np
import tensorflow as tf
import sklearn
import dask
import xarray
import netCDF4
from enum import Enum
import phygnn
import rex
from sup3r import __version__
VERSION_RECORD = {'sup3r': __version__,
'tensorflow': tf.__version__,
'sklearn': sklearn.__version__,
'pandas': pd.__version__,
'numpy': np.__version__,
'nrel-phygnn': phygnn.__version__,
'nrel-rex': rex.__version__,
'python': sys.version,
'xarray': xarray.__version__,
'netCDF4': netCDF4.__version__,
'dask': dask.__version__,
}
class ModuleName(str, Enum):
"""A collection of the module names available in sup3r.
Each module name should match the name of the click command
that will be used to invoke its respective cli. As of 5/26/2022,
this means that all commands are lowercase with underscores
replaced by dashes.
"""
FORWARD_PASS = 'forward-pass'
DATA_EXTRACT = 'data-extract'
DATA_COLLECT = 'data-collect'
QA = 'qa'
SOLAR = 'solar'
STATS = 'stats'
BIAS_CALC = 'bias-calc'
VISUAL_QA = 'visual-qa'
REGRID = 'regrid'
def __str__(self):
return self.value
def __format__(self, format_spec):
return str.__format__(self.value, format_spec)
@classmethod
def all_names(cls):
"""All module names.
Returns
-------
set
The set of all module name strings.
"""
# pylint: disable=no-member
return {v.value for v in cls.__members__.values()}