s2-python 0.1.0__tar.gz → 0.1.3__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.1.0 → s2_python-0.1.3}/PKG-INFO +2 -1
- s2_python-0.1.3/pyproject.toml +6 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/setup.cfg +6 -2
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2_python.egg-info/PKG-INFO +2 -1
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2_python.egg-info/SOURCES.txt +1 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/__init__.py +17 -16
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/duration.py +2 -5
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/handshake.py +5 -6
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/handshake_response.py +5 -6
- s2_python-0.1.3/src/s2python/common/instruction_status_update.py +20 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/number_range.py +1 -4
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/power_forecast.py +5 -7
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/power_forecast_element.py +2 -5
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/power_forecast_value.py +1 -4
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/power_measurement.py +5 -7
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/power_range.py +1 -4
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/power_value.py +1 -4
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/reception_status.py +5 -8
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/resource_manager_details.py +8 -8
- s2_python-0.1.3/src/s2python/common/revoke_object.py +14 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/role.py +1 -4
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/select_control_type.py +5 -6
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/session_request.py +5 -6
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/support.py +1 -1
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/common/timer.py +1 -7
- s2_python-0.1.3/src/s2python/common/transition.py +15 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_actuator_description.py +4 -10
- s2_python-0.1.3/src/s2python/frbc/frbc_actuator_status.py +14 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_fill_level_target_profile.py +7 -9
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_fill_level_target_profile_element.py +1 -5
- s2_python-0.1.3/src/s2python/frbc/frbc_instruction.py +14 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_leakage_behaviour.py +7 -7
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_leakage_behaviour_element.py +1 -4
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_operation_mode.py +2 -7
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_operation_mode_element.py +2 -5
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_storage_description.py +1 -4
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_storage_status.py +5 -6
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_system_description.py +8 -8
- s2_python-0.1.3/src/s2python/frbc/frbc_timer_status.py +14 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_usage_forecast.py +6 -8
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_usage_forecast_element.py +1 -5
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/generated/gen_s2.py +848 -833
- s2_python-0.1.3/src/s2python/message.py +47 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/s2_parser.py +2 -3
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/utils.py +1 -1
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/validate_values_mixin.py +11 -14
- s2-python-0.1.0/pyproject.toml +0 -3
- s2-python-0.1.0/src/s2python/common/instruction_status_update.py +0 -22
- s2-python-0.1.0/src/s2python/common/revoke_object.py +0 -16
- s2-python-0.1.0/src/s2python/common/transition.py +0 -26
- s2-python-0.1.0/src/s2python/frbc/frbc_actuator_status.py +0 -23
- s2-python-0.1.0/src/s2python/frbc/frbc_instruction.py +0 -18
- s2-python-0.1.0/src/s2python/frbc/frbc_timer_status.py +0 -17
- {s2-python-0.1.0 → s2_python-0.1.3}/README.rst +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/setup.py +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2_python.egg-info/dependency_links.txt +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2_python.egg-info/entry_points.txt +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2_python.egg-info/not-zip-safe +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2_python.egg-info/requires.txt +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2_python.egg-info/top_level.txt +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/__init__.py +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/__init__.py +7 -7
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/generated/__init__.py +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/s2_validation_error.py +0 -0
- {s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/version.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: s2-python
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: S2 Protocol Python Wrapper
|
5
5
|
Home-page: https://github.com/flexiblepower/s2-ws-json-python
|
6
6
|
Author: Flexiblepower
|
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.9
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
15
16
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
16
17
|
Requires-Dist: pydantic~=1.10.7
|
17
18
|
Requires-Dist: pytz
|
@@ -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.1.
|
11
|
+
version = 0.1.3
|
12
12
|
platforms = Linux
|
13
13
|
classifiers =
|
14
14
|
Development Status :: 4 - Beta
|
@@ -16,6 +16,7 @@ classifiers =
|
|
16
16
|
Programming Language :: Python :: 3.9
|
17
17
|
Programming Language :: Python :: 3.10
|
18
18
|
Programming Language :: Python :: 3.11
|
19
|
+
Programming Language :: Python :: 3.12
|
19
20
|
|
20
21
|
[options]
|
21
22
|
zip_safe = False
|
@@ -23,7 +24,7 @@ packages = find_namespace:
|
|
23
24
|
include_package_data = True
|
24
25
|
package_dir =
|
25
26
|
=src
|
26
|
-
python_requires > = 3.8, <= 3.
|
27
|
+
python_requires > = 3.8, <= 3.12
|
27
28
|
install_requires =
|
28
29
|
pydantic~=1.10.7
|
29
30
|
pytz
|
@@ -73,6 +74,9 @@ formats = bdist_wheel
|
|
73
74
|
[flake8]
|
74
75
|
max_line_length = 88
|
75
76
|
extend_ignore = E203, W503
|
77
|
+
per-file-ignores =
|
78
|
+
src/s2python/common/__init__.py:F401
|
79
|
+
src/s2python/frbc/__init__.py:F401
|
76
80
|
exclude =
|
77
81
|
.tox
|
78
82
|
build
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: s2-python
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.3
|
4
4
|
Summary: S2 Protocol Python Wrapper
|
5
5
|
Home-page: https://github.com/flexiblepower/s2-ws-json-python
|
6
6
|
Author: Flexiblepower
|
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3.8
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.9
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
15
16
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
16
17
|
Requires-Dist: pydantic~=1.10.7
|
17
18
|
Requires-Dist: pytz
|
@@ -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/message.py
|
13
14
|
src/s2python/s2_parser.py
|
14
15
|
src/s2python/s2_validation_error.py
|
15
16
|
src/s2python/utils.py
|
@@ -1,32 +1,33 @@
|
|
1
|
-
|
2
|
-
RoleType,
|
3
|
-
CommodityQuantity,
|
4
|
-
Commodity,
|
5
|
-
InstructionStatus,
|
6
|
-
ReceptionStatusValues,
|
7
|
-
EnergyManagementRole,
|
8
|
-
SessionRequestType,
|
9
|
-
ControlType,
|
10
|
-
Currency,
|
11
|
-
RevokableObjects,
|
12
|
-
)
|
1
|
+
# noqa
|
13
2
|
|
14
3
|
from s2python.common.duration import Duration
|
15
|
-
from s2python.common.role import Role
|
16
4
|
from s2python.common.handshake import Handshake
|
17
5
|
from s2python.common.handshake_response import HandshakeResponse
|
18
6
|
from s2python.common.instruction_status_update import InstructionStatusUpdate
|
19
7
|
from s2python.common.number_range import NumberRange
|
20
|
-
from s2python.common.power_forecast_value import PowerForecastValue
|
21
|
-
from s2python.common.power_forecast_element import PowerForecastElement
|
22
8
|
from s2python.common.power_forecast import PowerForecast
|
23
|
-
from s2python.common.
|
9
|
+
from s2python.common.power_forecast_element import PowerForecastElement
|
10
|
+
from s2python.common.power_forecast_value import PowerForecastValue
|
24
11
|
from s2python.common.power_measurement import PowerMeasurement
|
25
12
|
from s2python.common.power_range import PowerRange
|
13
|
+
from s2python.common.power_value import PowerValue
|
26
14
|
from s2python.common.reception_status import ReceptionStatus
|
27
15
|
from s2python.common.resource_manager_details import ResourceManagerDetails
|
28
16
|
from s2python.common.revoke_object import RevokeObject
|
17
|
+
from s2python.common.role import Role
|
29
18
|
from s2python.common.select_control_type import SelectControlType
|
30
19
|
from s2python.common.session_request import SessionRequest
|
31
20
|
from s2python.common.timer import Timer
|
32
21
|
from s2python.common.transition import Transition
|
22
|
+
from s2python.generated.gen_s2 import (
|
23
|
+
Commodity,
|
24
|
+
CommodityQuantity,
|
25
|
+
ControlType,
|
26
|
+
Currency, # noqa F401
|
27
|
+
EnergyManagementRole, # noqa F401
|
28
|
+
InstructionStatus, # noqa F401
|
29
|
+
ReceptionStatusValues, # noqa F401
|
30
|
+
RevokableObjects, # noqa F401
|
31
|
+
RoleType, # noqa F401
|
32
|
+
SessionRequestType, # noqa F401
|
33
|
+
)
|
@@ -1,11 +1,8 @@
|
|
1
|
-
from datetime import timedelta
|
2
1
|
import math
|
2
|
+
from datetime import timedelta
|
3
3
|
|
4
4
|
from s2python.generated.gen_s2 import Duration as GenDuration
|
5
|
-
from s2python.validate_values_mixin import
|
6
|
-
catch_and_convert_exceptions,
|
7
|
-
S2Message,
|
8
|
-
)
|
5
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
9
6
|
|
10
7
|
|
11
8
|
@catch_and_convert_exceptions
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
2
4
|
|
3
5
|
from s2python.generated.gen_s2 import Handshake as GenHandshake
|
4
|
-
from s2python.validate_values_mixin import
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
8
7
|
|
9
8
|
|
10
9
|
@catch_and_convert_exceptions
|
@@ -12,4 +11,4 @@ class Handshake(GenHandshake, S2Message["Handshake"]):
|
|
12
11
|
class Config(GenHandshake.Config):
|
13
12
|
validate_assignment = True
|
14
13
|
|
15
|
-
|
14
|
+
message_type: Literal["Handshake"] = Field(default="Handshake")
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
2
4
|
|
3
5
|
from s2python.generated.gen_s2 import HandshakeResponse as GenHandshakeResponse
|
4
|
-
from s2python.validate_values_mixin import
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
8
7
|
|
9
8
|
|
10
9
|
@catch_and_convert_exceptions
|
@@ -12,4 +11,4 @@ class HandshakeResponse(GenHandshakeResponse, S2Message["HandshakeResponse"]):
|
|
12
11
|
class Config(GenHandshakeResponse.Config):
|
13
12
|
validate_assignment = True
|
14
13
|
|
15
|
-
|
14
|
+
message_type: Literal["HandshakeResponse"] = Field(default="HandshakeResponse")
|
@@ -0,0 +1,20 @@
|
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
4
|
+
|
5
|
+
from s2python.generated.gen_s2 import (
|
6
|
+
InstructionStatusUpdate as GenInstructionStatusUpdate,
|
7
|
+
)
|
8
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
9
|
+
|
10
|
+
|
11
|
+
@catch_and_convert_exceptions
|
12
|
+
class InstructionStatusUpdate(
|
13
|
+
GenInstructionStatusUpdate, S2Message["InstructionStatusUpdate"]
|
14
|
+
):
|
15
|
+
class Config(GenInstructionStatusUpdate.Config):
|
16
|
+
validate_assignment = True
|
17
|
+
|
18
|
+
message_type: Literal["InstructionStatusUpdate"] = Field(
|
19
|
+
default="InstructionStatusUpdate"
|
20
|
+
)
|
@@ -2,11 +2,8 @@ from typing import Any, Dict
|
|
2
2
|
|
3
3
|
from pydantic import root_validator
|
4
4
|
|
5
|
-
from s2python.validate_values_mixin import (
|
6
|
-
S2Message,
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
)
|
9
5
|
from s2python.generated.gen_s2 import NumberRange as GenNumberRange
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
7
|
|
11
8
|
|
12
9
|
@catch_and_convert_exceptions
|
@@ -1,12 +1,10 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
5
|
from s2python.common.power_forecast_element import PowerForecastElement
|
5
6
|
from s2python.generated.gen_s2 import PowerForecast as GenPowerForecast
|
6
|
-
from s2python.validate_values_mixin import
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
S2Message,
|
9
|
-
)
|
7
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
8
|
|
11
9
|
|
12
10
|
@catch_and_convert_exceptions
|
@@ -14,7 +12,7 @@ class PowerForecast(GenPowerForecast, S2Message["PowerForecast"]):
|
|
14
12
|
class Config(GenPowerForecast.Config):
|
15
13
|
validate_assignment = True
|
16
14
|
|
17
|
-
message_id: uuid.UUID = GenPowerForecast.__fields__["message_id"].field_info # type: ignore[assignment]
|
18
15
|
elements: List[PowerForecastElement] = GenPowerForecast.__fields__[
|
19
16
|
"elements"
|
20
17
|
].field_info # type: ignore[assignment]
|
18
|
+
message_type: Literal["PowerForecast"] = Field(default="PowerForecast")
|
@@ -1,12 +1,9 @@
|
|
1
1
|
from typing import List
|
2
2
|
|
3
|
-
from s2python.generated.gen_s2 import PowerForecastElement as GenPowerForecastElement
|
4
|
-
from s2python.validate_values_mixin import (
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
8
3
|
from s2python.common.duration import Duration
|
9
4
|
from s2python.common.power_forecast_value import PowerForecastValue
|
5
|
+
from s2python.generated.gen_s2 import PowerForecastElement as GenPowerForecastElement
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
7
|
|
11
8
|
|
12
9
|
@catch_and_convert_exceptions
|
@@ -1,8 +1,5 @@
|
|
1
1
|
from s2python.generated.gen_s2 import PowerForecastValue as GenPowerForecastValue
|
2
|
-
from s2python.validate_values_mixin import
|
3
|
-
catch_and_convert_exceptions,
|
4
|
-
S2Message,
|
5
|
-
)
|
2
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
6
3
|
|
7
4
|
|
8
5
|
@catch_and_convert_exceptions
|
@@ -1,12 +1,10 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
5
|
from s2python.common.power_value import PowerValue
|
5
6
|
from s2python.generated.gen_s2 import PowerMeasurement as GenPowerMeasurement
|
6
|
-
from s2python.validate_values_mixin import
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
S2Message,
|
9
|
-
)
|
7
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
8
|
|
11
9
|
|
12
10
|
@catch_and_convert_exceptions
|
@@ -14,5 +12,5 @@ class PowerMeasurement(GenPowerMeasurement, S2Message["PowerMeasurement"]):
|
|
14
12
|
class Config(GenPowerMeasurement.Config):
|
15
13
|
validate_assignment = True
|
16
14
|
|
17
|
-
message_id: uuid.UUID = GenPowerMeasurement.__fields__["message_id"].field_info # type: ignore[assignment]
|
18
15
|
values: List[PowerValue] = GenPowerMeasurement.__fields__["values"].field_info # type: ignore[assignment]
|
16
|
+
message_type: Literal["PowerMeasurement"] = Field(default="PowerMeasurement")
|
@@ -3,10 +3,7 @@ from typing import Any, Dict
|
|
3
3
|
from pydantic import root_validator
|
4
4
|
|
5
5
|
from s2python.generated.gen_s2 import PowerRange as GenPowerRange
|
6
|
-
from s2python.validate_values_mixin import
|
7
|
-
S2Message,
|
8
|
-
catch_and_convert_exceptions,
|
9
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
7
|
|
11
8
|
|
12
9
|
@catch_and_convert_exceptions
|
@@ -1,8 +1,5 @@
|
|
1
1
|
from s2python.generated.gen_s2 import PowerValue as GenPowerValue
|
2
|
-
from s2python.validate_values_mixin import
|
3
|
-
catch_and_convert_exceptions,
|
4
|
-
S2Message,
|
5
|
-
)
|
2
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
6
3
|
|
7
4
|
|
8
5
|
@catch_and_convert_exceptions
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
2
4
|
|
3
5
|
from s2python.generated.gen_s2 import ReceptionStatus as GenReceptionStatus
|
4
|
-
from s2python.validate_values_mixin import
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
8
7
|
|
9
8
|
|
10
9
|
@catch_and_convert_exceptions
|
@@ -12,6 +11,4 @@ class ReceptionStatus(GenReceptionStatus, S2Message["ReceptionStatus"]):
|
|
12
11
|
class Config(GenReceptionStatus.Config):
|
13
12
|
validate_assignment = True
|
14
13
|
|
15
|
-
|
16
|
-
"subject_message_id"
|
17
|
-
].field_info # type: ignore[assignment]
|
14
|
+
message_type: Literal["ReceptionStatus"] = Field(default="ReceptionStatus")
|
@@ -1,15 +1,13 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
5
|
from s2python.common.duration import Duration
|
5
6
|
from s2python.common.role import Role
|
6
7
|
from s2python.generated.gen_s2 import (
|
7
8
|
ResourceManagerDetails as GenResourceManagerDetails,
|
8
9
|
)
|
9
|
-
from s2python.validate_values_mixin import
|
10
|
-
catch_and_convert_exceptions,
|
11
|
-
S2Message,
|
12
|
-
)
|
10
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
13
11
|
|
14
12
|
|
15
13
|
@catch_and_convert_exceptions
|
@@ -22,6 +20,8 @@ class ResourceManagerDetails(
|
|
22
20
|
instruction_processing_delay: Duration = GenResourceManagerDetails.__fields__[
|
23
21
|
"instruction_processing_delay"
|
24
22
|
].field_info # type: ignore[assignment]
|
25
|
-
|
26
|
-
resource_id: uuid.UUID = GenResourceManagerDetails.__fields__["resource_id"].field_info # type: ignore[assignment]
|
23
|
+
|
27
24
|
roles: List[Role] = GenResourceManagerDetails.__fields__["roles"].field_info # type: ignore[assignment]
|
25
|
+
message_type: Literal["ResourceManagerDetails"] = Field(
|
26
|
+
default="ResourceManagerDetails"
|
27
|
+
)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
4
|
+
|
5
|
+
from s2python.generated.gen_s2 import RevokeObject as GenRevokeObject
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
7
|
+
|
8
|
+
|
9
|
+
@catch_and_convert_exceptions
|
10
|
+
class RevokeObject(GenRevokeObject, S2Message["RevokeObject"]):
|
11
|
+
class Config(GenRevokeObject.Config):
|
12
|
+
validate_assignment = True
|
13
|
+
|
14
|
+
message_type: Literal["RevokeObject"] = Field(default="RevokeObject")
|
@@ -1,8 +1,5 @@
|
|
1
1
|
from s2python.generated.gen_s2 import Role as GenRole
|
2
|
-
from s2python.validate_values_mixin import
|
3
|
-
S2Message,
|
4
|
-
catch_and_convert_exceptions,
|
5
|
-
)
|
2
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
6
3
|
|
7
4
|
|
8
5
|
@catch_and_convert_exceptions
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
2
4
|
|
3
5
|
from s2python.generated.gen_s2 import SelectControlType as GenSelectControlType
|
4
|
-
from s2python.validate_values_mixin import
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
8
7
|
|
9
8
|
|
10
9
|
@catch_and_convert_exceptions
|
@@ -12,4 +11,4 @@ class SelectControlType(GenSelectControlType, S2Message["SelectControlType"]):
|
|
12
11
|
class Config(GenSelectControlType.Config):
|
13
12
|
validate_assignment = True
|
14
13
|
|
15
|
-
|
14
|
+
message_type: Literal["SelectControlType"] = Field(default="SelectControlType")
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
2
4
|
|
3
5
|
from s2python.generated.gen_s2 import SessionRequest as GenSessionRequest
|
4
|
-
from s2python.validate_values_mixin import
|
5
|
-
catch_and_convert_exceptions,
|
6
|
-
S2Message,
|
7
|
-
)
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
8
7
|
|
9
8
|
|
10
9
|
@catch_and_convert_exceptions
|
@@ -12,4 +11,4 @@ class SessionRequest(GenSessionRequest, S2Message["SessionRequest"]):
|
|
12
11
|
class Config(GenSessionRequest.Config):
|
13
12
|
validate_assignment = True
|
14
13
|
|
15
|
-
|
14
|
+
message_type: Literal["SessionRequest"] = Field(default="SessionRequest")
|
@@ -1,11 +1,6 @@
|
|
1
|
-
import uuid
|
2
|
-
|
3
1
|
from s2python.common.duration import Duration
|
4
2
|
from s2python.generated.gen_s2 import Timer as GenTimer
|
5
|
-
from s2python.validate_values_mixin import
|
6
|
-
S2Message,
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
)
|
3
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
9
4
|
|
10
5
|
|
11
6
|
@catch_and_convert_exceptions
|
@@ -13,5 +8,4 @@ class Timer(GenTimer, S2Message["Timer"]):
|
|
13
8
|
class Config(GenTimer.Config):
|
14
9
|
validate_assignment = True
|
15
10
|
|
16
|
-
id: uuid.UUID = GenTimer.__fields__["id"].field_info # type: ignore[assignment]
|
17
11
|
duration: Duration = GenTimer.__fields__["duration"].field_info # type: ignore[assignment]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
3
|
+
from s2python.common.duration import Duration
|
4
|
+
from s2python.generated.gen_s2 import Transition as GenTransition
|
5
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
6
|
+
|
7
|
+
|
8
|
+
@catch_and_convert_exceptions
|
9
|
+
class Transition(GenTransition, S2Message["Transition"]):
|
10
|
+
class Config(GenTransition.Config):
|
11
|
+
validate_assignment = True
|
12
|
+
|
13
|
+
transition_duration: Optional[Duration] = GenTransition.__fields__[
|
14
|
+
"transition_duration"
|
15
|
+
].field_info # type: ignore[assignment]
|
@@ -1,20 +1,15 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
from typing import List, Any, Dict
|
1
|
+
from typing import Any, Dict, List
|
4
2
|
|
5
3
|
from pydantic import root_validator
|
6
4
|
|
7
|
-
from s2python.common import
|
5
|
+
from s2python.common import Commodity, Timer, Transition
|
8
6
|
from s2python.common.support import commodity_has_quantity
|
9
7
|
from s2python.frbc.frbc_operation_mode import FRBCOperationMode
|
8
|
+
from s2python.generated.gen_s2 import CommodityQuantity
|
10
9
|
from s2python.generated.gen_s2 import (
|
11
10
|
FRBCActuatorDescription as GenFRBCActuatorDescription,
|
12
|
-
CommodityQuantity,
|
13
|
-
)
|
14
|
-
from s2python.validate_values_mixin import (
|
15
|
-
S2Message,
|
16
|
-
catch_and_convert_exceptions,
|
17
11
|
)
|
12
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
18
13
|
|
19
14
|
|
20
15
|
@catch_and_convert_exceptions
|
@@ -24,7 +19,6 @@ class FRBCActuatorDescription(
|
|
24
19
|
class Config(GenFRBCActuatorDescription.Config):
|
25
20
|
validate_assignment = True
|
26
21
|
|
27
|
-
id: uuid.UUID = GenFRBCActuatorDescription.__fields__["id"].field_info # type: ignore[assignment]
|
28
22
|
operation_modes: List[FRBCOperationMode] = GenFRBCActuatorDescription.__fields__[
|
29
23
|
"operation_modes"
|
30
24
|
].field_info # type: ignore[assignment]
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
4
|
+
|
5
|
+
from s2python.generated.gen_s2 import FRBCActuatorStatus as GenFRBCActuatorStatus
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
7
|
+
|
8
|
+
|
9
|
+
@catch_and_convert_exceptions
|
10
|
+
class FRBCActuatorStatus(GenFRBCActuatorStatus, S2Message["FRBCActuatorStatus"]):
|
11
|
+
class Config(GenFRBCActuatorStatus.Config):
|
12
|
+
validate_assignment = True
|
13
|
+
|
14
|
+
message_type: Literal["FRBC.ActuatorStatus"] = Field(default="FRBC.ActuatorStatus")
|
@@ -1,5 +1,6 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
5
|
from s2python.frbc.frbc_fill_level_target_profile_element import (
|
5
6
|
FRBCFillLevelTargetProfileElement,
|
@@ -7,10 +8,7 @@ from s2python.frbc.frbc_fill_level_target_profile_element import (
|
|
7
8
|
from s2python.generated.gen_s2 import (
|
8
9
|
FRBCFillLevelTargetProfile as GenFRBCFillLevelTargetProfile,
|
9
10
|
)
|
10
|
-
from s2python.validate_values_mixin import
|
11
|
-
catch_and_convert_exceptions,
|
12
|
-
S2Message,
|
13
|
-
)
|
11
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
14
12
|
|
15
13
|
|
16
14
|
@catch_and_convert_exceptions
|
@@ -25,6 +23,6 @@ class FRBCFillLevelTargetProfile(
|
|
25
23
|
] = GenFRBCFillLevelTargetProfile.__fields__[
|
26
24
|
"elements"
|
27
25
|
].field_info # type: ignore[assignment]
|
28
|
-
|
29
|
-
"
|
30
|
-
|
26
|
+
message_type: Literal["FRBC.FillLevelTargetProfile"] = Field(
|
27
|
+
default="FRBC.FillLevelTargetProfile"
|
28
|
+
)
|
{s2-python-0.1.0 → s2_python-0.1.3}/src/s2python/frbc/frbc_fill_level_target_profile_element.py
RENAMED
@@ -1,12 +1,8 @@
|
|
1
1
|
from s2python.common import Duration, NumberRange
|
2
|
-
|
3
2
|
from s2python.generated.gen_s2 import (
|
4
3
|
FRBCFillLevelTargetProfileElement as GenFRBCFillLevelTargetProfileElement,
|
5
4
|
)
|
6
|
-
from s2python.validate_values_mixin import
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
S2Message,
|
9
|
-
)
|
5
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
6
|
|
11
7
|
|
12
8
|
@catch_and_convert_exceptions
|
@@ -0,0 +1,14 @@
|
|
1
|
+
from typing import Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
4
|
+
|
5
|
+
from s2python.generated.gen_s2 import FRBCInstruction as GenFRBCInstruction
|
6
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
7
|
+
|
8
|
+
|
9
|
+
@catch_and_convert_exceptions
|
10
|
+
class FRBCInstruction(GenFRBCInstruction, S2Message["FRBCInstruction"]):
|
11
|
+
class Config(GenFRBCInstruction.Config):
|
12
|
+
validate_assignment = True
|
13
|
+
|
14
|
+
message_type: Literal["FRBC.Instruction"] = Field(default="FRBC.Instruction")
|
@@ -1,12 +1,10 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
1
|
+
from typing import List, Literal
|
2
|
+
|
3
|
+
from pydantic import Field
|
3
4
|
|
4
5
|
from s2python.frbc.frbc_leakage_behaviour_element import FRBCLeakageBehaviourElement
|
5
6
|
from s2python.generated.gen_s2 import FRBCLeakageBehaviour as GenFRBCLeakageBehaviour
|
6
|
-
from s2python.validate_values_mixin import
|
7
|
-
catch_and_convert_exceptions,
|
8
|
-
S2Message,
|
9
|
-
)
|
7
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
10
8
|
|
11
9
|
|
12
10
|
@catch_and_convert_exceptions
|
@@ -17,4 +15,6 @@ class FRBCLeakageBehaviour(GenFRBCLeakageBehaviour, S2Message["FRBCLeakageBehavi
|
|
17
15
|
elements: List[FRBCLeakageBehaviourElement] = GenFRBCLeakageBehaviour.__fields__[
|
18
16
|
"elements"
|
19
17
|
].field_info # type: ignore[assignment]
|
20
|
-
|
18
|
+
message_type: Literal["FRBC.LeakageBehaviour"] = Field(
|
19
|
+
default="FRBC.LeakageBehaviour"
|
20
|
+
)
|
@@ -2,10 +2,7 @@ from s2python.common import NumberRange
|
|
2
2
|
from s2python.generated.gen_s2 import (
|
3
3
|
FRBCLeakageBehaviourElement as GenFRBCLeakageBehaviourElement,
|
4
4
|
)
|
5
|
-
from s2python.validate_values_mixin import
|
6
|
-
catch_and_convert_exceptions,
|
7
|
-
S2Message,
|
8
|
-
)
|
5
|
+
from s2python.validate_values_mixin import S2Message, catch_and_convert_exceptions
|
9
6
|
|
10
7
|
|
11
8
|
@catch_and_convert_exceptions
|