-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: type errors * fix: wrong override * fix(snmp): version type * chore: improve error loggin * fix(pmcc): phase values * fix(zodiac): auth recovery * chore: bump support for pymodbus * fix: sma modbus source * feat: dependency management * fix: dependency print initialized writers * chore: bump version
- Loading branch information
1 parent
4827a8d
commit cf5fa70
Showing
14 changed files
with
330 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from typing import List, Dict | ||
|
||
|
||
class DependencyRequirements: | ||
""" | ||
Holds all dependencies required by each source | ||
to provide the user with a good error message in case of missing dependencies, | ||
as well as additional features such as generating a requirements.txt file | ||
""" | ||
PSUTIL = 'psutil~=6.1' | ||
GEVENT = 'gevent~=24.11' | ||
|
||
def __init__(self): | ||
self.deps: Dict[str, List[str]] = { | ||
'AppStoreConnectSource': ['appstoreconnect==0.10.0'], | ||
'CertificateSource': ['pyOpenSSL~=25.0.0'], | ||
'BindSource': [], | ||
'DiskUsageSource': [], | ||
'DummySource': [], | ||
'EspHomeSource': ['aioesphomeapi~=28.0'], | ||
'EvccSource': ['websocket_client~=1.8'], | ||
'FritzSource': ['fritzconnection~=1.14.0'], | ||
'GdcSource': ['google-cloud-storage~=2.19.0'], | ||
'HomematicIpSource': ['homematicip~=1.1.6'], | ||
'HttpIngressSource': [self.GEVENT], | ||
'HttpSource': [], | ||
'InterfaceSource': [self.PSUTIL], | ||
'IOSource': [self.PSUTIL], | ||
'K8sNamespaceTrafficSource': ['https://github.com/iovisor/bcc/blob/master/INSTALL.md'], | ||
'MemoryUsageSource': [self.PSUTIL], | ||
'MMISource': [], | ||
'OpenhabSource': [], | ||
'PlexSource': [], | ||
'PmccSource': ['websocket_client~=1.8'], | ||
'ProcessSource': [self.PSUTIL], | ||
'SensorsSource': [], | ||
'SmaEnergyMeterSource': [], | ||
'SmaPvModbusSource': ['pymodbus~=3.8.3'], | ||
'SmartCtlSource': [], | ||
'SnmpGetSource': [], | ||
'TcpTimeSource': [], | ||
'TpLinkEapSource': [], | ||
'ViessmannSource': [], | ||
'ZfsSource': [], | ||
'ZodiacPoolSource': [], | ||
|
||
'MqttWriter': ['paho-mqtt~=2.1.0'], | ||
'OtelWriter': ['opentelemetry-sdk~=1.29.0', 'opentelemetry-exporter-otlp~=1.29.0'], | ||
'PrometheusSslWriter': ['prometheus-client~=0.21.1', self.GEVENT], | ||
'PrometheusWriter': ['prometheus-client~=0.21.1'], | ||
} | ||
""" | ||
Source dependencies mapped to their module name | ||
""" | ||
|
||
def get_dependencies_as_text(self, name: str) -> str: | ||
deps = self.deps.get(name) | ||
if deps is None: | ||
return 'Unknown dependency requirements' | ||
msg = 'The following dependencies are required:\n' | ||
for package in deps: | ||
msg += f'- {package}\n' | ||
|
||
return msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '1.2.0' | ||
__version__ = '1.2.2' |
Oops, something went wrong.