s2-python 0.1.0__py3-none-any.whl → 0.1.3__py3-none-any.whl

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.
Files changed (48) hide show
  1. {s2_python-0.1.0.dist-info → s2_python-0.1.3.dist-info}/METADATA +20 -19
  2. s2_python-0.1.3.dist-info/RECORD +51 -0
  3. {s2_python-0.1.0.dist-info → s2_python-0.1.3.dist-info}/WHEEL +1 -1
  4. s2python/common/__init__.py +17 -16
  5. s2python/common/duration.py +2 -5
  6. s2python/common/handshake.py +5 -6
  7. s2python/common/handshake_response.py +5 -6
  8. s2python/common/instruction_status_update.py +7 -9
  9. s2python/common/number_range.py +1 -4
  10. s2python/common/power_forecast.py +5 -7
  11. s2python/common/power_forecast_element.py +2 -5
  12. s2python/common/power_forecast_value.py +1 -4
  13. s2python/common/power_measurement.py +5 -7
  14. s2python/common/power_range.py +1 -4
  15. s2python/common/power_value.py +1 -4
  16. s2python/common/reception_status.py +5 -8
  17. s2python/common/resource_manager_details.py +8 -8
  18. s2python/common/revoke_object.py +5 -7
  19. s2python/common/role.py +1 -4
  20. s2python/common/select_control_type.py +5 -6
  21. s2python/common/session_request.py +5 -6
  22. s2python/common/support.py +1 -1
  23. s2python/common/timer.py +1 -7
  24. s2python/common/transition.py +2 -13
  25. s2python/frbc/__init__.py +7 -7
  26. s2python/frbc/frbc_actuator_description.py +4 -10
  27. s2python/frbc/frbc_actuator_status.py +5 -14
  28. s2python/frbc/frbc_fill_level_target_profile.py +7 -9
  29. s2python/frbc/frbc_fill_level_target_profile_element.py +1 -5
  30. s2python/frbc/frbc_instruction.py +5 -9
  31. s2python/frbc/frbc_leakage_behaviour.py +7 -7
  32. s2python/frbc/frbc_leakage_behaviour_element.py +1 -4
  33. s2python/frbc/frbc_operation_mode.py +2 -7
  34. s2python/frbc/frbc_operation_mode_element.py +2 -5
  35. s2python/frbc/frbc_storage_description.py +1 -4
  36. s2python/frbc/frbc_storage_status.py +5 -6
  37. s2python/frbc/frbc_system_description.py +8 -8
  38. s2python/frbc/frbc_timer_status.py +5 -8
  39. s2python/frbc/frbc_usage_forecast.py +6 -8
  40. s2python/frbc/frbc_usage_forecast_element.py +1 -5
  41. s2python/generated/gen_s2.py +848 -833
  42. s2python/message.py +47 -0
  43. s2python/s2_parser.py +2 -3
  44. s2python/utils.py +1 -1
  45. s2python/validate_values_mixin.py +11 -14
  46. s2_python-0.1.0.dist-info/RECORD +0 -50
  47. {s2_python-0.1.0.dist-info → s2_python-0.1.3.dist-info}/entry_points.txt +0 -0
  48. {s2_python-0.1.0.dist-info → s2_python-0.1.3.dist-info}/top_level.txt +0 -0
s2python/message.py ADDED
@@ -0,0 +1,47 @@
1
+ from typing import Union
2
+
3
+ from pydantic import BaseModel # pylint: disable=no-name-in-module, unused-import; ignore E0611 and W0611
4
+
5
+ from s2python.common import (
6
+ Handshake,
7
+ HandshakeResponse,
8
+ InstructionStatusUpdate,
9
+ PowerForecast,
10
+ PowerMeasurement,
11
+ ReceptionStatus,
12
+ ResourceManagerDetails,
13
+ RevokeObject,
14
+ SelectControlType,
15
+ SessionRequest,
16
+ )
17
+ from s2python.frbc import (
18
+ FRBCActuatorStatus,
19
+ FRBCFillLevelTargetProfile,
20
+ FRBCInstruction,
21
+ FRBCLeakageBehaviour,
22
+ FRBCStorageStatus,
23
+ FRBCSystemDescription,
24
+ FRBCTimerStatus,
25
+ FRBCUsageForecast,
26
+ )
27
+
28
+ S2Message = Union[
29
+ FRBCActuatorStatus,
30
+ FRBCFillLevelTargetProfile,
31
+ FRBCInstruction,
32
+ FRBCLeakageBehaviour,
33
+ FRBCStorageStatus,
34
+ FRBCSystemDescription,
35
+ FRBCTimerStatus,
36
+ FRBCUsageForecast,
37
+ Handshake,
38
+ HandshakeResponse,
39
+ InstructionStatusUpdate,
40
+ PowerForecast,
41
+ PowerMeasurement,
42
+ ReceptionStatus,
43
+ ResourceManagerDetails,
44
+ RevokeObject,
45
+ SelectControlType,
46
+ SessionRequest,
47
+ ]
s2python/s2_parser.py CHANGED
@@ -1,6 +1,6 @@
1
1
  import json
2
2
  import logging
3
- from typing import Optional, TypeVar, Union, Type, Dict
3
+ from typing import Dict, Optional, Type, TypeVar, Union
4
4
 
5
5
  from s2python.common import (
6
6
  Handshake,
@@ -24,9 +24,8 @@ from s2python.frbc import (
24
24
  FRBCTimerStatus,
25
25
  FRBCUsageForecast,
26
26
  )
27
- from s2python.validate_values_mixin import S2Message
28
27
  from s2python.s2_validation_error import S2ValidationError
29
-
28
+ from s2python.validate_values_mixin import S2Message
30
29
 
31
30
  LOGGER = logging.getLogger(__name__)
32
31
  S2MessageType = str
s2python/utils.py CHANGED
@@ -1,4 +1,4 @@
1
- from typing import Generator, Tuple, List, TypeVar
1
+ from typing import Generator, List, Tuple, TypeVar
2
2
 
3
3
  P = TypeVar("P")
4
4
 
@@ -1,24 +1,21 @@
1
1
  from typing import (
2
- TypeVar,
2
+ AbstractSet,
3
+ Any,
4
+ Callable,
5
+ Dict,
3
6
  Generic,
7
+ List,
8
+ Mapping,
9
+ Optional,
4
10
  Protocol,
5
11
  Type,
6
- Optional,
7
- Callable,
8
- Any,
12
+ TypeVar,
9
13
  Union,
10
- AbstractSet,
11
- Mapping,
12
- List,
13
- Dict,
14
14
  )
15
15
 
16
- from pydantic import ( # pylint: disable=no-name-in-module
17
- BaseModel,
18
- StrBytes,
19
- Protocol as PydanticProtocol,
20
- ValidationError,
21
- )
16
+ from pydantic import BaseModel # pylint: disable=no-name-in-module; ignore E0611
17
+ from pydantic import Protocol as PydanticProtocol # pylint: disable=no-name-in-module
18
+ from pydantic import StrBytes, ValidationError # pylint: disable=no-name-in-module; ignore E0611
22
19
  from pydantic.error_wrappers import display_errors # pylint: disable=no-name-in-module
23
20
 
24
21
  from s2python.s2_validation_error import S2ValidationError
@@ -1,50 +0,0 @@
1
- s2python/__init__.py,sha256=e5lwvqsPl-z7IfEd0hRQhLBRKBYcuw2eqrecXnMfLdg,384
2
- s2python/s2_parser.py,sha256=4oN4qBeW7RVNcXQ8GVib_oodK1_gszCrcXMQjPqRGUI,4088
3
- s2python/s2_validation_error.py,sha256=fdV2tdRhYslDStTw8Cvb3mly7PpLiCbXbrkfOe3n2_w,295
4
- s2python/utils.py,sha256=QX9b-mi-H_YUGTmGmJsrAbaWWM3dgaoaRLRXHHlaZDE,212
5
- s2python/validate_values_mixin.py,sha256=RbhxqqhfhsNoTSeRxb7msQ6nEZWwAoUH6EQKkZkzH4k,4109
6
- s2python/version.py,sha256=w9Iw7QVvd8lme2wKwEbCo5IgetVjSfFBOOYAcA_Q0Ns,18
7
- s2python/common/__init__.py,sha256=fVJ0n13kRzzAtJcOxZHz3CEDexWXnyueJMcEXGdq_88,1345
8
- s2python/common/duration.py,sha256=fMuftby-8wLeqpLKXd7VQqcmgTUUhTmWSW53R2b2vHM,661
9
- s2python/common/handshake.py,sha256=IsbA41wBN4n0jopHn-vNDf2y1HP47p2kahM3NSwxAfc,440
10
- s2python/common/handshake_response.py,sha256=Pa7kwRUFiecvPU84-z3D9_woxGqM4-_G9XtLgVmzMKA,496
11
- s2python/common/instruction_status_update.py,sha256=w3bbVZ8jF3VBLKe3Q3fhWK9WhldxkkNgSzXuXyPzklA,694
12
- s2python/common/number_range.py,sha256=NRND5K1-_U_6S4lVxfszI4A9o8hFYCrFQieska_ELgU,1163
13
- s2python/common/power_forecast.py,sha256=-i1Z4JMGpmoo4N2DfmzMYiEh7o25xxsesKkUxhSWjAw,700
14
- s2python/common/power_forecast_element.py,sha256=nQopGR0-uuE9jGyg2L-zusvkVACWqMJNxOyjm3PJYI4,787
15
- s2python/common/power_forecast_value.py,sha256=UHiP8Go64RW6VzszzmAZ3JIyaGf2WOMGyx_PTmdmBoY,375
16
- s2python/common/power_measurement.py,sha256=l_Na6Yw6twQveLw6j6FsX6BQh0fbmveHdHdsmnDzegs,675
17
- s2python/common/power_range.py,sha256=Pazitj5zPzH2rz0gnKAzinwEhM28Dftglf3z6sHjIqA,796
18
- s2python/common/power_value.py,sha256=xpu-MV_lkFYksfVDRRFbWiha8fA7KAF_p3CBoNNoyyg,327
19
- s2python/common/reception_status.py,sha256=yd3tzG8UNMCjPy3WXpgMHjYnuFW3wyCv82tnq2kgEME,512
20
- s2python/common/resource_manager_details.py,sha256=YOKnw7wMAX5JIt3LAnxfCvG0kTZjshHF8Yotfzyqbew,1050
21
- s2python/common/revoke_object.py,sha256=EWuTqHoVyaPO-eIcFSCE7zROJXyR6RWkajX60IL8aM8,567
22
- s2python/common/role.py,sha256=PV0noDy3D30dIodJgIWfGWcz-4hwZyBnpsWkyjc8c7g,291
23
- s2python/common/select_control_type.py,sha256=y6yXcuCGPsm-QKSg6jJTzfUzAbZqvMkWepMhXERVQlM,496
24
- s2python/common/session_request.py,sha256=bCnyAjSdeLShAC513x7ifaNRKZLAdzoJF2rU_zXxZEI,475
25
- s2python/common/support.py,sha256=Kbrf_KGB45Wfr8j2pqDe1lLde6CIr3nl_LYkWnilmV0,1015
26
- s2python/common/timer.py,sha256=-KhxxyJwK0pfVrpLBg9thYzOb2-LB5FgRBznwKCu76Y,538
27
- s2python/common/transition.py,sha256=pYfo4sfWdnBR2Tvn3cW34zVT53d4PZSc3Ee3mubAYAg,1096
28
- s2python/frbc/__init__.py,sha256=ROV3qZoldPkdgVFfMQr5Mf3GDfBzXaMfhNNCuXY6T0s,1104
29
- s2python/frbc/frbc_actuator_description.py,sha256=9Zzzjhii3vABsLPOIN6qGavs0YyWthNV7whjcJadyGY,6801
30
- s2python/frbc/frbc_actuator_status.py,sha256=xnTqGyh_h03BsBWRQfV7SMHn1yZV2KLV02FpIgojzr4,973
31
- s2python/frbc/frbc_fill_level_target_profile.py,sha256=0kGB-uD0mqOZPdRBn_EJ8rMrA6DfTHMk7_nsSm7icRA,896
32
- s2python/frbc/frbc_fill_level_target_profile_element.py,sha256=fqYwvbfEAM-e_hbUB6MN9NjGoCCdBcd-VGtmB9UyLbc,832
33
- s2python/frbc/frbc_instruction.py,sha256=y8hZqh1jDKWVwehweWHQnbkFiSHlY87T4Al5kxEH9rQ,809
34
- s2python/frbc/frbc_leakage_behaviour.py,sha256=CAuIAgaBDv82rPHmjJYchuVQilKLLjIOfI71UDnKXYk,776
35
- s2python/frbc/frbc_leakage_behaviour_element.py,sha256=Bvw_4zuS5PgoZu_Pwy9kFCst75JbQyGKSvxOU7owYCA,636
36
- s2python/frbc/frbc_operation_mode.py,sha256=bkMxQMP1pxF4rb0plUzBnFv7IG261lDq3FDf0HId0uE,2030
37
- s2python/frbc/frbc_operation_mode_element.py,sha256=Bc5pJDwd83SbJiFYT2GA6sTzeLtsa8ohAM8LuY3uRc4,1079
38
- s2python/frbc/frbc_storage_description.py,sha256=bxFVxYPhNCejMjBJtIiGjCCS7fyoOXHc3TUeWho7CYM,601
39
- s2python/frbc/frbc_storage_status.py,sha256=PZCs-fh43in7LlYjalygW57iRQWwBp51tVEoZemS9-Y,496
40
- s2python/frbc/frbc_system_description.py,sha256=RefubMI735vDV-cp6FEAEDe4bfcEYwY_EhCu5rC1oSs,991
41
- s2python/frbc/frbc_timer_status.py,sha256=tyhjNia_I2j6rSggFiXp8i6QcZRiqhcOkMtn_TkXQ0Q,702
42
- s2python/frbc/frbc_usage_forecast.py,sha256=8zWLBYpRfjiPKRz5x0QiZ2IF8HDGA8qlUgbOofAsQPA,743
43
- s2python/frbc/frbc_usage_forecast_element.py,sha256=OuwrN4KarVe4tq6R4qkNz5j-sQstQDzLWP4g5B6L-iw,580
44
- s2python/generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- s2python/generated/gen_s2.py,sha256=DXLCNE1gUS7XnRTgWlBpy73szr5HrHcrN0TZXvq8N_g,61928
46
- s2_python-0.1.0.dist-info/METADATA,sha256=-V9F_j0oh6IkAVzrcX5oFFyY7bON8FwRwc7NUsLjIM4,3257
47
- s2_python-0.1.0.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
48
- s2_python-0.1.0.dist-info/entry_points.txt,sha256=feX-xmgJZgSe5-jxMgFKPKCJz4Ys3eQcGrsXsirNZyM,61
49
- s2_python-0.1.0.dist-info/top_level.txt,sha256=OLFq0oDhr77Mp-EYLEcWk5P3jvooOt4IHkTI5KYJMc8,9
50
- s2_python-0.1.0.dist-info/RECORD,,