From b8239703c18344ac908ccf385030bff941bcef79 Mon Sep 17 00:00:00 2001 From: UpstreamData <75442874+UpstreamData@users.noreply.github.com> Date: Wed, 10 Aug 2022 11:14:06 -0600 Subject: [PATCH] move M32 to separate file. --- pyasic/miners/_types/whatsminer/M3X/M32.py | 24 +++++++++++++++++++ pyasic/miners/_types/whatsminer/M3X/M32S.py | 9 ------- .../miners/_types/whatsminer/M3X/__init__.py | 3 ++- pyasic/miners/whatsminer/btminer/M3X/M32.py | 24 +++++++++++++++++++ pyasic/miners/whatsminer/btminer/M3X/M32S.py | 7 ------ .../miners/whatsminer/btminer/M3X/__init__.py | 3 ++- 6 files changed, 52 insertions(+), 18 deletions(-) create mode 100644 pyasic/miners/_types/whatsminer/M3X/M32.py create mode 100644 pyasic/miners/whatsminer/btminer/M3X/M32.py diff --git a/pyasic/miners/_types/whatsminer/M3X/M32.py b/pyasic/miners/_types/whatsminer/M3X/M32.py new file mode 100644 index 00000000..1c783a5f --- /dev/null +++ b/pyasic/miners/_types/whatsminer/M3X/M32.py @@ -0,0 +1,24 @@ +# Copyright 2022 Upstream Data Inc +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from pyasic.miners import BaseMiner + + +class M32(BaseMiner): + def __init__(self, ip: str): + super().__init__() + self.ip = ip + self.model = "M32" + self.nominal_chips = 74 + self.fan_count = 2 diff --git a/pyasic/miners/_types/whatsminer/M3X/M32S.py b/pyasic/miners/_types/whatsminer/M3X/M32S.py index 6b1d3b48..3c05a68d 100644 --- a/pyasic/miners/_types/whatsminer/M3X/M32S.py +++ b/pyasic/miners/_types/whatsminer/M3X/M32S.py @@ -22,12 +22,3 @@ class M32S(BaseMiner): self.model = "M32S" self.nominal_chips = 78 self.fan_count = 2 - - -class M32(BaseMiner): - def __init__(self, ip: str): - super().__init__() - self.ip = ip - self.model = "M32" - self.nominal_chips = 74 - self.fan_count = 2 diff --git a/pyasic/miners/_types/whatsminer/M3X/__init__.py b/pyasic/miners/_types/whatsminer/M3X/__init__.py index e9ef7abc..594d213d 100644 --- a/pyasic/miners/_types/whatsminer/M3X/__init__.py +++ b/pyasic/miners/_types/whatsminer/M3X/__init__.py @@ -19,4 +19,5 @@ from .M30S_Plus_Plus import M30SPlusPlus, M30SPlusPlusVG30, M30SPlusPlusVG40 from .M31S import M31S from .M31S_Plus import M31SPlus, M31SPlusVE20 -from .M32S import M32S, M32 +from .M32 import M32 +from .M32S import M32S diff --git a/pyasic/miners/whatsminer/btminer/M3X/M32.py b/pyasic/miners/whatsminer/btminer/M3X/M32.py new file mode 100644 index 00000000..b688998c --- /dev/null +++ b/pyasic/miners/whatsminer/btminer/M3X/M32.py @@ -0,0 +1,24 @@ +# Copyright 2022 Upstream Data Inc +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from pyasic.miners._backends import BTMiner # noqa - Ignore access to _module +from pyasic.miners._types import ( + M32, +) # noqa - Ignore access to _module + + +class BTMinerM32(BTMiner, M32): + def __init__(self, ip: str) -> None: + super().__init__(ip) + self.ip = ip diff --git a/pyasic/miners/whatsminer/btminer/M3X/M32S.py b/pyasic/miners/whatsminer/btminer/M3X/M32S.py index 2f4d769d..8f19a9a4 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M32S.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M32S.py @@ -15,7 +15,6 @@ from pyasic.miners._backends import BTMiner # noqa - Ignore access to _module from pyasic.miners._types import ( M32S, - M32, ) # noqa - Ignore access to _module @@ -23,9 +22,3 @@ class BTMinerM32S(BTMiner, M32S): def __init__(self, ip: str) -> None: super().__init__(ip) self.ip = ip - - -class BTMinerM32(BTMiner, M32): - def __init__(self, ip: str) -> None: - super().__init__(ip) - self.ip = ip diff --git a/pyasic/miners/whatsminer/btminer/M3X/__init__.py b/pyasic/miners/whatsminer/btminer/M3X/__init__.py index f42ecd33..977a6045 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/__init__.py +++ b/pyasic/miners/whatsminer/btminer/M3X/__init__.py @@ -34,4 +34,5 @@ from .M30S_Plus_Plus import ( from .M31S import BTMinerM31S from .M31S_Plus import BTMinerM31SPlus, BTMinerM31SPlusVE20 -from .M32S import BTMinerM32S, BTMinerM32 +from .M32 import BTMinerM32 +from .M32S import BTMinerM32S