Add config attribute to data and refactor data naming (#81)

* feature: add config to MinerData.  Remove related attributes.

* feature: rename ideal and nominal to expected to make data naming consistent across files.

* refactor: run isort on all files.

* docs: update docstrings.
This commit is contained in:
UpstreamData
2023-12-21 15:20:50 -07:00
committed by GitHub
parent 3d31179562
commit 0e5b811fb9
106 changed files with 439 additions and 506 deletions

View File

@@ -40,26 +40,29 @@ class MinersTest(unittest.TestCase):
)
def test_miner_data_map_keys(self):
keys = [
"api_ver",
"env_temp",
"errors",
"fan_psu",
"fans",
"fault_light",
"fw_ver",
"hashboards",
"hashrate",
"hostname",
"is_mining",
"mac",
"model",
"nominal_hashrate",
"pools",
"uptime",
"wattage",
"wattage_limit",
]
keys = sorted(
[
"api_ver",
"config",
"env_temp",
"errors",
"fan_psu",
"fans",
"fault_light",
"fw_ver",
"hashboards",
"hashrate",
"hostname",
"is_mining",
"mac",
"model",
"expected_hashrate",
"pools",
"uptime",
"wattage",
"wattage_limit",
]
)
warnings.filterwarnings("ignore")
for miner_model in MINER_CLASSES.keys():
for miner_api in MINER_CLASSES[miner_model].keys():