s2-python 0.2.1__tar.gz → 0.2.2__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.
- {s2_python-0.2.1 → s2_python-0.2.2}/PKG-INFO +14 -2
- {s2_python-0.2.1 → s2_python-0.2.2}/README.rst +12 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/setup.cfg +2 -2
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2_python.egg-info/PKG-INFO +14 -2
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2_python.egg-info/SOURCES.txt +1 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2_python.egg-info/requires.txt +1 -1
- s2_python-0.2.2/src/s2python/common/number_range.py +22 -0
- s2_python-0.2.2/src/s2python/frbc/frbc_fill_level_target_profile_element.py +34 -0
- s2_python-0.2.2/src/s2python/frbc/frbc_leakage_behaviour_element.py +30 -0
- s2_python-0.2.2/src/s2python/py.typed +0 -0
- s2_python-0.2.1/src/s2python/common/number_range.py +0 -32
- s2_python-0.2.1/src/s2python/frbc/frbc_fill_level_target_profile_element.py +0 -23
- s2_python-0.2.1/src/s2python/frbc/frbc_leakage_behaviour_element.py +0 -18
- {s2_python-0.2.1 → s2_python-0.2.2}/pyproject.toml +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/setup.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2_python.egg-info/dependency_links.txt +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2_python.egg-info/entry_points.txt +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2_python.egg-info/not-zip-safe +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2_python.egg-info/top_level.txt +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/__init__.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/__init__.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/duration.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/handshake.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/handshake_response.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/instruction_status_update.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/power_forecast.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/power_forecast_element.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/power_forecast_value.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/power_measurement.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/power_range.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/power_value.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/reception_status.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/resource_manager_details.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/revoke_object.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/role.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/select_control_type.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/session_request.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/support.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/timer.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/common/transition.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/__init__.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_actuator_description.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_actuator_status.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_fill_level_target_profile.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_instruction.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_leakage_behaviour.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_operation_mode.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_operation_mode_element.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_storage_description.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_storage_status.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_system_description.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_timer_status.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_usage_forecast.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/frbc_usage_forecast_element.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/frbc/rm.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/generated/__init__.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/generated/gen_s2.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/reception_status_awaiter.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/s2_connection.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/s2_control_type.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/s2_parser.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/s2_validation_error.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/utils.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/validate_values_mixin.py +0 -0
- {s2_python-0.2.1 → s2_python-0.2.2}/src/s2python/version.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: s2-python
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.2
|
4
4
|
Summary: S2 Protocol Python Wrapper
|
5
5
|
Home-page: https://github.com/flexiblepower/s2-ws-json-python
|
6
6
|
Author: Flexiblepower
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/x-rst; charset=UTF-8
|
|
17
17
|
Requires-Dist: pydantic~=2.8.2
|
18
18
|
Requires-Dist: pytz
|
19
19
|
Requires-Dist: click
|
20
|
-
Requires-Dist: websockets~=13.
|
20
|
+
Requires-Dist: websockets~=13.1
|
21
21
|
Provides-Extra: testing
|
22
22
|
Requires-Dist: pytest; extra == "testing"
|
23
23
|
Requires-Dist: pytest-coverage; extra == "testing"
|
@@ -62,6 +62,18 @@ You can install this package using pip or any Python dependency manager that col
|
|
62
62
|
|
63
63
|
The packages on Pypi may be found `here <https://pypi.org/project/s2-python/>`_
|
64
64
|
|
65
|
+
Mypy support
|
66
|
+
------------
|
67
|
+
s2-python uses pydantic at its core to define the various S2 messages. As such, the pydantic mypy plugin is required
|
68
|
+
for type checking to succeed.
|
69
|
+
|
70
|
+
Add to your pyproject.toml:
|
71
|
+
|
72
|
+
.. code-block:: toml
|
73
|
+
|
74
|
+
[tool.mypy]
|
75
|
+
plugins = ['pydantic.mypy']
|
76
|
+
|
65
77
|
Example
|
66
78
|
---------
|
67
79
|
|
@@ -22,6 +22,18 @@ You can install this package using pip or any Python dependency manager that col
|
|
22
22
|
|
23
23
|
The packages on Pypi may be found `here <https://pypi.org/project/s2-python/>`_
|
24
24
|
|
25
|
+
Mypy support
|
26
|
+
------------
|
27
|
+
s2-python uses pydantic at its core to define the various S2 messages. As such, the pydantic mypy plugin is required
|
28
|
+
for type checking to succeed.
|
29
|
+
|
30
|
+
Add to your pyproject.toml:
|
31
|
+
|
32
|
+
.. code-block:: toml
|
33
|
+
|
34
|
+
[tool.mypy]
|
35
|
+
plugins = ['pydantic.mypy']
|
36
|
+
|
25
37
|
Example
|
26
38
|
---------
|
27
39
|
|
@@ -8,7 +8,7 @@ license_files = LICENSE.txt
|
|
8
8
|
long_description = file: README.rst
|
9
9
|
long_description_content_type = text/x-rst; charset=UTF-8
|
10
10
|
url = https://github.com/flexiblepower/s2-ws-json-python
|
11
|
-
version = 0.2.
|
11
|
+
version = 0.2.2
|
12
12
|
platforms = Linux
|
13
13
|
classifiers =
|
14
14
|
Development Status :: 4 - Beta
|
@@ -29,7 +29,7 @@ install_requires =
|
|
29
29
|
pydantic~=2.8.2
|
30
30
|
pytz
|
31
31
|
click
|
32
|
-
websockets~=13.
|
32
|
+
websockets~=13.1
|
33
33
|
|
34
34
|
[options.packages.find]
|
35
35
|
where = src
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: s2-python
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.2
|
4
4
|
Summary: S2 Protocol Python Wrapper
|
5
5
|
Home-page: https://github.com/flexiblepower/s2-ws-json-python
|
6
6
|
Author: Flexiblepower
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/x-rst; charset=UTF-8
|
|
17
17
|
Requires-Dist: pydantic~=2.8.2
|
18
18
|
Requires-Dist: pytz
|
19
19
|
Requires-Dist: click
|
20
|
-
Requires-Dist: websockets~=13.
|
20
|
+
Requires-Dist: websockets~=13.1
|
21
21
|
Provides-Extra: testing
|
22
22
|
Requires-Dist: pytest; extra == "testing"
|
23
23
|
Requires-Dist: pytest-coverage; extra == "testing"
|
@@ -62,6 +62,18 @@ You can install this package using pip or any Python dependency manager that col
|
|
62
62
|
|
63
63
|
The packages on Pypi may be found `here <https://pypi.org/project/s2-python/>`_
|
64
64
|
|
65
|
+
Mypy support
|
66
|
+
------------
|
67
|
+
s2-python uses pydantic at its core to define the various S2 messages. As such, the pydantic mypy plugin is required
|
68
|
+
for type checking to succeed.
|
69
|
+
|
70
|
+
Add to your pyproject.toml:
|
71
|
+
|
72
|
+
.. code-block:: toml
|
73
|
+
|
74
|
+
[tool.mypy]
|
75
|
+
plugins = ['pydantic.mypy']
|
76
|
+
|
65
77
|
Example
|
66
78
|
---------
|
67
79
|
|
@@ -10,6 +10,7 @@ src/s2_python.egg-info/not-zip-safe
|
|
10
10
|
src/s2_python.egg-info/requires.txt
|
11
11
|
src/s2_python.egg-info/top_level.txt
|
12
12
|
src/s2python/__init__.py
|
13
|
+
src/s2python/py.typed
|
13
14
|
src/s2python/reception_status_awaiter.py
|
14
15
|
src/s2python/s2_connection.py
|
15
16
|
src/s2python/s2_control_type.py
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from typing import Any
|
2
|
+
|
3
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
4
|
+
from s2python.generated.gen_s2 import NumberRange as GenNumberRange
|
5
|
+
|
6
|
+
|
7
|
+
@catch_and_convert_exceptions
|
8
|
+
class NumberRange(GenNumberRange, S2Message["NumberRange"]):
|
9
|
+
model_config = GenNumberRange.model_config
|
10
|
+
model_config["validate_assignment"] = True
|
11
|
+
|
12
|
+
def __hash__(self) -> int:
|
13
|
+
return hash(f"{self.start_of_range}|{self.end_of_range}")
|
14
|
+
|
15
|
+
def __eq__(self, other: Any) -> bool:
|
16
|
+
if isinstance(other, NumberRange):
|
17
|
+
return (
|
18
|
+
self.start_of_range == other.start_of_range
|
19
|
+
and self.end_of_range == other.end_of_range
|
20
|
+
)
|
21
|
+
|
22
|
+
return False
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# pylint: disable=duplicate-code
|
2
|
+
|
3
|
+
from typing_extensions import Self
|
4
|
+
|
5
|
+
from pydantic import model_validator
|
6
|
+
|
7
|
+
from s2python.common import Duration, NumberRange
|
8
|
+
from s2python.generated.gen_s2 import (
|
9
|
+
FRBCFillLevelTargetProfileElement as GenFRBCFillLevelTargetProfileElement,
|
10
|
+
)
|
11
|
+
from s2python.validate_values_mixin import catch_and_convert_exceptions, S2Message
|
12
|
+
|
13
|
+
|
14
|
+
@catch_and_convert_exceptions
|
15
|
+
class FRBCFillLevelTargetProfileElement(
|
16
|
+
GenFRBCFillLevelTargetProfileElement, S2Message["FRBCFillLevelTargetProfileElement"]
|
17
|
+
):
|
18
|
+
model_config = GenFRBCFillLevelTargetProfileElement.model_config
|
19
|
+
model_config["validate_assignment"] = True
|
20
|
+
|
21
|
+
duration: Duration = GenFRBCFillLevelTargetProfileElement.model_fields["duration"] # type: ignore[assignment]
|
22
|
+
fill_level_range: NumberRange = GenFRBCFillLevelTargetProfileElement.model_fields[
|
23
|
+
"fill_level_range"
|
24
|
+
] # type: ignore[assignment]
|
25
|
+
|
26
|
+
@model_validator(mode="after")
|
27
|
+
def validate_start_end_order(self) -> Self:
|
28
|
+
if self.fill_level_range.start_of_range > self.fill_level_range.end_of_range:
|
29
|
+
raise ValueError(
|
30
|
+
self,
|
31
|
+
"start_of_range should not be higher than end_of_range for the fill_level_range",
|
32
|
+
)
|
33
|
+
|
34
|
+
return self
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# pylint: disable=duplicate-code
|
2
|
+
|
3
|
+
from pydantic import model_validator
|
4
|
+
from typing_extensions import Self
|
5
|
+
|
6
|
+
from s2python.common import NumberRange
|
7
|
+
from s2python.generated.gen_s2 import FRBCLeakageBehaviourElement as GenFRBCLeakageBehaviourElement
|
8
|
+
from s2python.validate_values_mixin import catch_and_convert_exceptions, S2Message
|
9
|
+
|
10
|
+
|
11
|
+
@catch_and_convert_exceptions
|
12
|
+
class FRBCLeakageBehaviourElement(
|
13
|
+
GenFRBCLeakageBehaviourElement, S2Message["FRBCLeakageBehaviourElement"]
|
14
|
+
):
|
15
|
+
model_config = GenFRBCLeakageBehaviourElement.model_config
|
16
|
+
model_config["validate_assignment"] = True
|
17
|
+
|
18
|
+
fill_level_range: NumberRange = GenFRBCLeakageBehaviourElement.model_fields[
|
19
|
+
"fill_level_range"
|
20
|
+
] # type: ignore[assignment]
|
21
|
+
|
22
|
+
@model_validator(mode="after")
|
23
|
+
def validate_start_end_order(self) -> Self:
|
24
|
+
if self.fill_level_range.start_of_range > self.fill_level_range.end_of_range:
|
25
|
+
raise ValueError(
|
26
|
+
self,
|
27
|
+
"start_of_range should not be higher than end_of_range for the fill_level_range",
|
28
|
+
)
|
29
|
+
|
30
|
+
return self
|
File without changes
|
@@ -1,32 +0,0 @@
|
|
1
|
-
from typing import Any
|
2
|
-
from typing_extensions import Self
|
3
|
-
|
4
|
-
from pydantic import model_validator
|
5
|
-
|
6
|
-
from s2python.validate_values_mixin import (
|
7
|
-
S2Message,
|
8
|
-
catch_and_convert_exceptions,
|
9
|
-
)
|
10
|
-
from s2python.generated.gen_s2 import NumberRange as GenNumberRange
|
11
|
-
|
12
|
-
|
13
|
-
@catch_and_convert_exceptions
|
14
|
-
class NumberRange(GenNumberRange, S2Message["NumberRange"]):
|
15
|
-
model_config = GenNumberRange.model_config
|
16
|
-
model_config["validate_assignment"] = True
|
17
|
-
|
18
|
-
@model_validator(mode="after")
|
19
|
-
def validate_start_end_order(self) -> Self: # pylint: disable=duplicate-code
|
20
|
-
if self.start_of_range > self.end_of_range:
|
21
|
-
raise ValueError(self, "start_of_range should not be higher than end_of_range")
|
22
|
-
|
23
|
-
return self
|
24
|
-
|
25
|
-
def __hash__(self) -> int:
|
26
|
-
return hash(f"{self.start_of_range}|{self.end_of_range}")
|
27
|
-
|
28
|
-
def __eq__(self, other: Any) -> bool:
|
29
|
-
if isinstance(other, NumberRange):
|
30
|
-
return self.start_of_range == other.start_of_range and self.end_of_range == other.end_of_range
|
31
|
-
|
32
|
-
return False
|
@@ -1,23 +0,0 @@
|
|
1
|
-
from s2python.common import Duration, NumberRange
|
2
|
-
|
3
|
-
from s2python.generated.gen_s2 import (
|
4
|
-
FRBCFillLevelTargetProfileElement as GenFRBCFillLevelTargetProfileElement,
|
5
|
-
)
|
6
|
-
from s2python.validate_values_mixin import (
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
S2Message,
|
9
|
-
)
|
10
|
-
|
11
|
-
|
12
|
-
@catch_and_convert_exceptions
|
13
|
-
class FRBCFillLevelTargetProfileElement(
|
14
|
-
GenFRBCFillLevelTargetProfileElement,
|
15
|
-
S2Message["FRBCFillLevelTargetProfileElement"],
|
16
|
-
):
|
17
|
-
model_config = GenFRBCFillLevelTargetProfileElement.model_config
|
18
|
-
model_config["validate_assignment"] = True
|
19
|
-
|
20
|
-
duration: Duration = GenFRBCFillLevelTargetProfileElement.model_fields["duration"] # type: ignore[assignment]
|
21
|
-
fill_level_range: NumberRange = GenFRBCFillLevelTargetProfileElement.model_fields[
|
22
|
-
"fill_level_range"
|
23
|
-
] # type: ignore[assignment]
|
@@ -1,18 +0,0 @@
|
|
1
|
-
from s2python.common import NumberRange
|
2
|
-
from s2python.generated.gen_s2 import (
|
3
|
-
FRBCLeakageBehaviourElement as GenFRBCLeakageBehaviourElement,
|
4
|
-
)
|
5
|
-
from s2python.validate_values_mixin import (
|
6
|
-
catch_and_convert_exceptions,
|
7
|
-
S2Message,
|
8
|
-
)
|
9
|
-
|
10
|
-
|
11
|
-
@catch_and_convert_exceptions
|
12
|
-
class FRBCLeakageBehaviourElement(GenFRBCLeakageBehaviourElement, S2Message["FRBCLeakageBehaviourElement"]):
|
13
|
-
model_config = GenFRBCLeakageBehaviourElement.model_config
|
14
|
-
model_config["validate_assignment"] = True
|
15
|
-
|
16
|
-
fill_level_range: NumberRange = GenFRBCLeakageBehaviourElement.model_fields[
|
17
|
-
"fill_level_range"
|
18
|
-
] # type: ignore[assignment]
|
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
|
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
|
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
|