feature: swap from @dataclass to pydantic BaseModel (#238)

* feature: switch almost everything to pydantic BaseModel

* feature: swap more dataclasses over to pydantic models

* feature: use more model serializers to make data handle better

* bug: fix some serialization issues with `None` values

* bug: fix some initialization problems with miner mode config

* bug: fix new BOS+ pool parsing

* bug: fix new BOS+ board temperature parsing serialization error

* bug: more misc fixes with serialization, extra methods, and hashrate types

* bug: add explicit type conversions to hashrate types

* bug: fix epic pool URL parsing

* bug: fix positional args in hashboards

* bug: fix epic missing url scheme

* convert board temp to int

---------

Co-authored-by: Upstream Data <brett@upstreamdata.ca>
Co-authored-by: John-Paul Compagnone <jpcompagnone@epicblockchain.io>
This commit is contained in:
Brett Rowan
2024-11-20 13:42:41 -07:00
committed by GitHub
parent 65ed565220
commit d66739e2c9
46 changed files with 597 additions and 485 deletions

View File

@@ -17,6 +17,7 @@ tomli = { version = ">=2.0.1", python = "<3.11" }
tomli-w = "^1.0.0"
aiofiles = ">=23.2.1"
betterproto = "2.0.0b7"
pydantic = "^2.9.2"
[tool.poetry.group.dev]
optional = true