my-PV 0.0.1.dev3__tar.gz → 0.0.1.dev5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- my_pv-0.0.1.dev5/.github/dependabot.yml +15 -0
- my_pv-0.0.1.dev5/.github/workflows/check-format.yml +11 -0
- my_pv-0.0.1.dev5/.github/workflows/pypi-publish.yml +30 -0
- {my_pv-0.0.1.dev3 → my_pv-0.0.1.dev5}/PKG-INFO +1 -1
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/__init__.py +7 -7
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/_version.py +2 -2
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/__init__.py +1 -1
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/connection.py +1 -1
- {my_pv-0.0.1.dev3 → my_pv-0.0.1.dev5}/pyproject.toml +4 -7
- {my_pv-0.0.1.dev3 → my_pv-0.0.1.dev5}/.gitignore +0 -0
- {my_pv-0.0.1.dev3 → my_pv-0.0.1.dev5}/LICENSE +0 -0
- {my_pv-0.0.1.dev3 → my_pv-0.0.1.dev5}/README.md +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/000000.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/140100.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/160150.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/160151.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/160152.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/200100.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/200103.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/200110.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/200113.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/200300.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/200310.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/210300.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/configs/210900.json +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/exceptions.py +0 -0
- {my_pv-0.0.1.dev3/mypv → my_pv-0.0.1.dev5/my_pv}/py.typed +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "pip" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
- package-ecosystem: "github-actions"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
deploy:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
environment: pypi
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write # required for OIDC
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v6
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.x'
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
pip install build
|
|
25
|
+
- name: Build package
|
|
26
|
+
run: python -m build
|
|
27
|
+
- name: Publish package
|
|
28
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
29
|
+
with:
|
|
30
|
+
print-hash: true
|
|
@@ -20,7 +20,7 @@ import logging
|
|
|
20
20
|
import re
|
|
21
21
|
from abc import ABC, abstractmethod
|
|
22
22
|
|
|
23
|
-
from
|
|
23
|
+
from my_pv.exceptions import MyPVConnectionError
|
|
24
24
|
|
|
25
25
|
from .configs import read_config
|
|
26
26
|
from .connection import (
|
|
@@ -258,7 +258,7 @@ class MyPVDevice(ABC):
|
|
|
258
258
|
|
|
259
259
|
return False
|
|
260
260
|
|
|
261
|
-
def get_setup_configurations(self) -> dict:
|
|
261
|
+
def get_setup_configurations(self) -> dict[str, [str, Any]]:
|
|
262
262
|
"""Gets the configuration of the available setup parameters."""
|
|
263
263
|
setup_keys = self._setup_values.keys()
|
|
264
264
|
return {
|
|
@@ -275,7 +275,7 @@ class MyPVDevice(ABC):
|
|
|
275
275
|
and val.get("advanced", False) in [False, self.advanced]
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
def get_setup_configuration(self, key: str) -> dict | None:
|
|
278
|
+
def get_setup_configuration(self, key: str) -> dict[str, Any] | None:
|
|
279
279
|
return self.get_setup_configurations().get(key)
|
|
280
280
|
|
|
281
281
|
def get_setup_value(self, key: str) -> bool | float | int | str | None:
|
|
@@ -337,7 +337,7 @@ class MyPVDevice(ABC):
|
|
|
337
337
|
|
|
338
338
|
return False
|
|
339
339
|
|
|
340
|
-
def get_data_configurations(self) -> dict:
|
|
340
|
+
def get_data_configurations(self) -> dict[str, [str, Any]]:
|
|
341
341
|
"""Gets the configuration of the available device data."""
|
|
342
342
|
data_keys = self._data_values.keys()
|
|
343
343
|
data_configurations = {
|
|
@@ -360,7 +360,7 @@ class MyPVDevice(ABC):
|
|
|
360
360
|
|
|
361
361
|
return data_configurations
|
|
362
362
|
|
|
363
|
-
def get_data_configuration(self, key: str) -> dict | None:
|
|
363
|
+
def get_data_configuration(self, key: str) -> dict[str, Any] | None:
|
|
364
364
|
return self.get_data_configurations().get(key)
|
|
365
365
|
|
|
366
366
|
def get_data_value(self, key: str) -> bool | float | int | str | None:
|
|
@@ -440,7 +440,7 @@ class MyPVDevice(ABC):
|
|
|
440
440
|
"commands"
|
|
441
441
|
][command].get("advanced", False) in [False, self.advanced]
|
|
442
442
|
|
|
443
|
-
def get_command_configurations(self) -> dict:
|
|
443
|
+
def get_command_configurations(self) -> dict[str, [str, Any]]:
|
|
444
444
|
"""Gets the configuration of the available commands supported by the device."""
|
|
445
445
|
return {
|
|
446
446
|
key: val
|
|
@@ -448,7 +448,7 @@ class MyPVDevice(ABC):
|
|
|
448
448
|
if val.get("advanced", False) in [False, self.advanced]
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
def get_command_configuration(self, command: str) -> dict | None:
|
|
451
|
+
def get_command_configuration(self, command: str) -> dict[str, Any] | None:
|
|
452
452
|
return self.get_command_configurations().get(command)
|
|
453
453
|
|
|
454
454
|
async def send_command(
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.0.1.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 0, 1, '
|
|
21
|
+
__version__ = version = '0.0.1.dev5'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 0, 1, 'dev5')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -68,7 +68,7 @@ async def read_config(serial_number: str) -> dict | None:
|
|
|
68
68
|
for config_file in config_files:
|
|
69
69
|
try:
|
|
70
70
|
text = await asyncio.get_running_loop().run_in_executor(
|
|
71
|
-
None, importlib.resources.read_text, "
|
|
71
|
+
None, importlib.resources.read_text, "my_pv.configs", config_file
|
|
72
72
|
)
|
|
73
73
|
|
|
74
74
|
if text is not None and len(text) > 0:
|
|
@@ -27,7 +27,7 @@ from urllib.parse import urlencode, urlunsplit
|
|
|
27
27
|
from aiohttp import ClientSession
|
|
28
28
|
from aiohttp.client_exceptions import ClientConnectionError, ConnectionTimeoutError
|
|
29
29
|
|
|
30
|
-
from
|
|
30
|
+
from my_pv.exceptions import MyPVAuthenticationError, MyPVConnectionError
|
|
31
31
|
|
|
32
32
|
logger = logging.getLogger(__name__)
|
|
33
33
|
|
|
@@ -3,10 +3,7 @@ requires = ["hatchling>=1.29", "hatch-vcs"]
|
|
|
3
3
|
build-backend = "hatchling.build"
|
|
4
4
|
|
|
5
5
|
[tool.hatch.build.hooks.vcs]
|
|
6
|
-
version-file = "
|
|
7
|
-
|
|
8
|
-
[tool.hatch.build.targets.sdist]
|
|
9
|
-
packages = [ "mypv" ]
|
|
6
|
+
version-file = "my_pv/_version.py"
|
|
10
7
|
|
|
11
8
|
[tool.hatch.version]
|
|
12
9
|
source = "vcs"
|
|
@@ -41,10 +38,10 @@ Issues = "https://github.com/my-PV/py-mypv/issues"
|
|
|
41
38
|
[tool.isort]
|
|
42
39
|
# https://github.com/PyCQA/isort/wiki/isort-Settings
|
|
43
40
|
profile = "black"
|
|
44
|
-
skip = "
|
|
41
|
+
skip = "my_pv/_version.py"
|
|
45
42
|
|
|
46
43
|
[tool.black]
|
|
47
|
-
exclude = '
|
|
44
|
+
exclude = 'my_pv/_version.py'
|
|
48
45
|
|
|
49
46
|
[tool.pylint]
|
|
50
47
|
ignore = "_version.py"
|
|
@@ -52,7 +49,7 @@ recursive = "y"
|
|
|
52
49
|
|
|
53
50
|
[tool.mypy]
|
|
54
51
|
python_version = "3.14"
|
|
55
|
-
mypy_path = "
|
|
52
|
+
mypy_path = "my_pv"
|
|
56
53
|
|
|
57
54
|
[[tool.mypy.overrides]]
|
|
58
55
|
module = ["*._version"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|