s2-python 0.7.0__tar.gz → 0.7.1__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.7.0/src/s2_python.egg-info → s2_python-0.7.1}/PKG-INFO +1 -1
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/generate_s2.sh +1 -1
- {s2_python-0.7.0 → s2_python-0.7.1}/pyproject.toml +3 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/pyrightconfig.json +4 -0
- {s2_python-0.7.0 → s2_python-0.7.1/src/s2_python.egg-info}/PKG-INFO +1 -1
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/generated/gen_s2.py +35 -68
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ombc/__init__.py +8 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/s2_parser.py +5 -5
- {s2_python-0.7.0 → s2_python-0.7.1}/.github/workflows/ci.yml +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/.gitignore +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/.pre-commit-config.yaml +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/.pylintrc +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/LICENSE +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/README.rst +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/clean.sh +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/distribute.sh +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/install_dependencies.sh +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/lint.sh +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/setup_dev_environment.sh +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/test_unit.sh +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/typecheck.sh +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/ci/update_dependencies.sh +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/dev-requirements.txt +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/development_utilities/gen_templates.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/development_utilities/gen_unit_test_template.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/development_utilities/generate_s2_message_type_to_class.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/development_utilities/get_all_messages.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/examples/example_frbc_rm.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/mypy.ini +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/pytest.ini +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/setup.cfg +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/setup.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/specification/openapi.yml +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2_python.egg-info/SOURCES.txt +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2_python.egg-info/dependency_links.txt +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2_python.egg-info/entry_points.txt +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2_python.egg-info/not-zip-safe +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2_python.egg-info/requires.txt +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2_python.egg-info/top_level.txt +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/duration.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/handshake.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/handshake_response.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/instruction_status_update.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/number_range.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/power_forecast.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/power_forecast_element.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/power_forecast_value.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/power_measurement.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/power_range.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/power_value.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/reception_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/resource_manager_details.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/revoke_object.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/role.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/select_control_type.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/session_request.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/support.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/timer.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/common/transition.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_actuator_description.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_actuator_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_average_demand_rate_forecast.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_average_demand_rate_forecast_element.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_instruction.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_operation_mode.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_system_description.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_timer_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_actuator_description.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_actuator_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_fill_level_target_profile.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_fill_level_target_profile_element.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_instruction.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_leakage_behaviour.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_leakage_behaviour_element.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_operation_mode.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_operation_mode_element.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_storage_description.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_storage_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_system_description.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_timer_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_usage_forecast.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_usage_forecast_element.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/rm.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/generated/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/message.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ombc/ombc_instruction.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ombc/ombc_operation_mode.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ombc/ombc_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ombc/ombc_system_description.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ombc/ombc_timer_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/pebc/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/pebc/pebc_allowed_limit_range.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/pebc/pebc_energy_constraint.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/pebc/pebc_instruction.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/pebc/pebc_power_constraints.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/pebc/pebc_power_envelope.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/pebc/pebc_power_envelope_element.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_end_interruption_instruction.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_power_profile_definition.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_power_profile_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_power_sequence.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_power_sequence_container.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_power_sequence_container_status.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_power_sequence_element.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_schedule_instruction.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_start_interruption_instruction.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/py.typed +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/reception_status_awaiter.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/s2_connection.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/s2_control_type.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/s2_validation_error.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/utils.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/validate_values_mixin.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/version.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/__init__.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/duration_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/handshake_response_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/handshake_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/instruction_status_update_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/number_range_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/power_forecast_element_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/power_forecast_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/power_forecast_value_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/power_measurement_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/power_range_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/power_value_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/reception_status_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/resource_manager_details_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/revoke_object_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/role_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/select_control_type_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/session_request_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/timer_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/common/transition_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_actuator_description_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_actuator_status_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_fill_level_target_profile_element_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_fill_level_target_profile_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_instruction_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_leakage_behaviour_element_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_leakage_behaviour_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_operation_mode_element_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_operation_mode_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_storage_description_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_storage_status_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_system_description_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_timer_status_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_usage_forecast_element_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_usage_forecast_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/inheritance_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/message_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/pebc/pebc_allowed_limit_range_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/pebc/pebc_power_constraints_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/reception_status_awaiter_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/s2_connection_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/s2_parser_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/utils_test.py +0 -0
- {s2_python-0.7.0 → s2_python-0.7.1}/tox.ini +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
. .venv/bin/activate
|
|
5
|
-
datamodel-codegen --input specification/openapi.yml --input-file-type openapi --output-model-type pydantic_v2.BaseModel --output src/s2python/generated/gen_s2.py --use-one-literal-as-default
|
|
5
|
+
datamodel-codegen --input specification/openapi.yml --input-file-type openapi --output-model-type pydantic_v2.BaseModel --output src/s2python/generated/gen_s2.py --use-one-literal-as-default --use-subclass-enum --output-datetime-class AwareDatetime --use-double-quotes
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
# generated by datamodel-codegen:
|
|
2
2
|
# filename: openapi.yml
|
|
3
|
-
# timestamp:
|
|
3
|
+
# timestamp: 2025-07-29T10:12:16+00:00
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
7
|
from enum import Enum
|
|
8
|
-
from typing import List, Optional
|
|
8
|
+
from typing import List, Literal, Optional
|
|
9
9
|
|
|
10
|
-
from pydantic import
|
|
11
|
-
AwareDatetime,
|
|
12
|
-
BaseModel,
|
|
13
|
-
ConfigDict,
|
|
14
|
-
Field,
|
|
15
|
-
RootModel,
|
|
16
|
-
conint,
|
|
17
|
-
constr,
|
|
18
|
-
)
|
|
19
|
-
from typing_extensions import Literal
|
|
10
|
+
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, RootModel, conint, constr
|
|
20
11
|
|
|
21
12
|
|
|
22
13
|
class Duration(RootModel[conint(ge=0)]):
|
|
23
|
-
root: conint(ge=0) = Field(
|
|
24
|
-
..., description="Duration in milliseconds"
|
|
25
|
-
)
|
|
14
|
+
root: conint(ge=0) = Field(..., description="Duration in milliseconds")
|
|
26
15
|
|
|
27
16
|
|
|
28
17
|
class ID(RootModel[constr(pattern=r"[a-zA-Z0-9\-_:]{2,64}")]):
|
|
29
|
-
root: constr(pattern=r"[a-zA-Z0-9\-_:]{2,64}") = (
|
|
30
|
-
Field(..., description="UUID")
|
|
31
|
-
)
|
|
18
|
+
root: constr(pattern=r"[a-zA-Z0-9\-_:]{2,64}") = Field(..., description="UUID")
|
|
32
19
|
|
|
33
20
|
|
|
34
21
|
class Currency(Enum):
|
|
@@ -134,12 +121,12 @@ class Currency(Enum):
|
|
|
134
121
|
ZWL = "ZWL"
|
|
135
122
|
|
|
136
123
|
|
|
137
|
-
class SessionRequestType(Enum):
|
|
124
|
+
class SessionRequestType(str, Enum):
|
|
138
125
|
RECONNECT = "RECONNECT"
|
|
139
126
|
TERMINATE = "TERMINATE"
|
|
140
127
|
|
|
141
128
|
|
|
142
|
-
class RevokableObjects(Enum):
|
|
129
|
+
class RevokableObjects(str, Enum):
|
|
143
130
|
PEBC_PowerConstraints = "PEBC.PowerConstraints"
|
|
144
131
|
PEBC_EnergyConstraint = "PEBC.EnergyConstraint"
|
|
145
132
|
PEBC_Instruction = "PEBC.Instruction"
|
|
@@ -155,12 +142,12 @@ class RevokableObjects(Enum):
|
|
|
155
142
|
DDBC_Instruction = "DDBC.Instruction"
|
|
156
143
|
|
|
157
144
|
|
|
158
|
-
class EnergyManagementRole(Enum):
|
|
145
|
+
class EnergyManagementRole(str, Enum):
|
|
159
146
|
CEM = "CEM"
|
|
160
147
|
RM = "RM"
|
|
161
148
|
|
|
162
149
|
|
|
163
|
-
class ReceptionStatusValues(Enum):
|
|
150
|
+
class ReceptionStatusValues(str, Enum):
|
|
164
151
|
INVALID_DATA = "INVALID_DATA"
|
|
165
152
|
INVALID_MESSAGE = "INVALID_MESSAGE"
|
|
166
153
|
INVALID_CONTENT = "INVALID_CONTENT"
|
|
@@ -234,8 +221,7 @@ class Timer(BaseModel):
|
|
|
234
221
|
description="Human readable name/description of the Timer. This element is only intended for diagnostic purposes and not for HMI applications.",
|
|
235
222
|
)
|
|
236
223
|
duration: Duration = Field(
|
|
237
|
-
...,
|
|
238
|
-
description="The time it takes for the Timer to finish after it has been started",
|
|
224
|
+
..., description="The time it takes for the Timer to finish after it has been started"
|
|
239
225
|
)
|
|
240
226
|
|
|
241
227
|
|
|
@@ -381,20 +367,20 @@ class DDBCAverageDemandRateForecastElement(BaseModel):
|
|
|
381
367
|
)
|
|
382
368
|
|
|
383
369
|
|
|
384
|
-
class RoleType(Enum):
|
|
370
|
+
class RoleType(str, Enum):
|
|
385
371
|
ENERGY_PRODUCER = "ENERGY_PRODUCER"
|
|
386
372
|
ENERGY_CONSUMER = "ENERGY_CONSUMER"
|
|
387
373
|
ENERGY_STORAGE = "ENERGY_STORAGE"
|
|
388
374
|
|
|
389
375
|
|
|
390
|
-
class Commodity(Enum):
|
|
376
|
+
class Commodity(str, Enum):
|
|
391
377
|
GAS = "GAS"
|
|
392
378
|
HEAT = "HEAT"
|
|
393
379
|
ELECTRICITY = "ELECTRICITY"
|
|
394
380
|
OIL = "OIL"
|
|
395
381
|
|
|
396
382
|
|
|
397
|
-
class CommodityQuantity(Enum):
|
|
383
|
+
class CommodityQuantity(str, Enum):
|
|
398
384
|
ELECTRIC_POWER_L1 = "ELECTRIC.POWER.L1"
|
|
399
385
|
ELECTRIC_POWER_L2 = "ELECTRIC.POWER.L2"
|
|
400
386
|
ELECTRIC_POWER_L3 = "ELECTRIC.POWER.L3"
|
|
@@ -407,7 +393,7 @@ class CommodityQuantity(Enum):
|
|
|
407
393
|
OIL_FLOW_RATE = "OIL.FLOW_RATE"
|
|
408
394
|
|
|
409
395
|
|
|
410
|
-
class InstructionStatus(Enum):
|
|
396
|
+
class InstructionStatus(str, Enum):
|
|
411
397
|
NEW = "NEW"
|
|
412
398
|
ACCEPTED = "ACCEPTED"
|
|
413
399
|
REJECTED = "REJECTED"
|
|
@@ -417,7 +403,7 @@ class InstructionStatus(Enum):
|
|
|
417
403
|
ABORTED = "ABORTED"
|
|
418
404
|
|
|
419
405
|
|
|
420
|
-
class ControlType(Enum):
|
|
406
|
+
class ControlType(str, Enum):
|
|
421
407
|
POWER_ENVELOPE_BASED_CONTROL = "POWER_ENVELOPE_BASED_CONTROL"
|
|
422
408
|
POWER_PROFILE_BASED_CONTROL = "POWER_PROFILE_BASED_CONTROL"
|
|
423
409
|
OPERATION_MODE_BASED_CONTROL = "OPERATION_MODE_BASED_CONTROL"
|
|
@@ -427,17 +413,17 @@ class ControlType(Enum):
|
|
|
427
413
|
NO_SELECTION = "NO_SELECTION"
|
|
428
414
|
|
|
429
415
|
|
|
430
|
-
class PEBCPowerEnvelopeLimitType(Enum):
|
|
416
|
+
class PEBCPowerEnvelopeLimitType(str, Enum):
|
|
431
417
|
UPPER_LIMIT = "UPPER_LIMIT"
|
|
432
418
|
LOWER_LIMIT = "LOWER_LIMIT"
|
|
433
419
|
|
|
434
420
|
|
|
435
|
-
class PEBCPowerEnvelopeConsequenceType(Enum):
|
|
421
|
+
class PEBCPowerEnvelopeConsequenceType(str, Enum):
|
|
436
422
|
VANISH = "VANISH"
|
|
437
423
|
DEFER = "DEFER"
|
|
438
424
|
|
|
439
425
|
|
|
440
|
-
class PPBCPowerSequenceStatus(Enum):
|
|
426
|
+
class PPBCPowerSequenceStatus(str, Enum):
|
|
441
427
|
NOT_SCHEDULED = "NOT_SCHEDULED"
|
|
442
428
|
SCHEDULED = "SCHEDULED"
|
|
443
429
|
EXECUTING = "EXECUTING"
|
|
@@ -507,8 +493,7 @@ class SessionRequest(BaseModel):
|
|
|
507
493
|
message_id: ID
|
|
508
494
|
request: SessionRequestType = Field(..., description="The type of request")
|
|
509
495
|
diagnostic_label: Optional[str] = Field(
|
|
510
|
-
None,
|
|
511
|
-
description="Optional field for a human readible descirption for debugging purposes",
|
|
496
|
+
None, description="Optional field for a human readible descirption for debugging purposes"
|
|
512
497
|
)
|
|
513
498
|
|
|
514
499
|
|
|
@@ -586,12 +571,10 @@ class PEBCEnergyConstraint(BaseModel):
|
|
|
586
571
|
description="Identifier of this PEBC.EnergyConstraints. Must be unique in the scope of the Resource Manager, for at least the duration of the session between Resource Manager and CEM.",
|
|
587
572
|
)
|
|
588
573
|
valid_from: AwareDatetime = Field(
|
|
589
|
-
...,
|
|
590
|
-
description="Moment this PEBC.EnergyConstraints information starts to be valid",
|
|
574
|
+
..., description="Moment this PEBC.EnergyConstraints information starts to be valid"
|
|
591
575
|
)
|
|
592
576
|
valid_until: AwareDatetime = Field(
|
|
593
|
-
...,
|
|
594
|
-
description="Moment until this PEBC.EnergyConstraints information is valid.",
|
|
577
|
+
..., description="Moment until this PEBC.EnergyConstraints information is valid."
|
|
595
578
|
)
|
|
596
579
|
upper_average_power: float = Field(
|
|
597
580
|
...,
|
|
@@ -634,8 +617,7 @@ class PPBCScheduleInstruction(BaseModel):
|
|
|
634
617
|
description="Indicates the moment the PPBC.PowerSequence shall start. When the specified execution time is in the past, execution must start as soon as possible.",
|
|
635
618
|
)
|
|
636
619
|
abnormal_condition: bool = Field(
|
|
637
|
-
...,
|
|
638
|
-
description="Indicates if this is an instruction during an abnormal condition",
|
|
620
|
+
..., description="Indicates if this is an instruction during an abnormal condition"
|
|
639
621
|
)
|
|
640
622
|
|
|
641
623
|
|
|
@@ -665,8 +647,7 @@ class PPBCStartInterruptionInstruction(BaseModel):
|
|
|
665
647
|
description="Indicates the moment the PPBC.PowerSequence shall be interrupted. When the specified execution time is in the past, execution must start as soon as possible.",
|
|
666
648
|
)
|
|
667
649
|
abnormal_condition: bool = Field(
|
|
668
|
-
...,
|
|
669
|
-
description="Indicates if this is an instruction during an abnormal condition",
|
|
650
|
+
..., description="Indicates if this is an instruction during an abnormal condition"
|
|
670
651
|
)
|
|
671
652
|
|
|
672
653
|
|
|
@@ -697,8 +678,7 @@ class PPBCEndInterruptionInstruction(BaseModel):
|
|
|
697
678
|
description="Indicates the moment PPBC.PowerSequence interruption shall end. When the specified execution time is in the past, execution must start as soon as possible.",
|
|
698
679
|
)
|
|
699
680
|
abnormal_condition: bool = Field(
|
|
700
|
-
...,
|
|
701
|
-
description="Indicates if this is an instruction during an abnormal condition",
|
|
681
|
+
..., description="Indicates if this is an instruction during an abnormal condition"
|
|
702
682
|
)
|
|
703
683
|
|
|
704
684
|
|
|
@@ -745,8 +725,7 @@ class OMBCInstruction(BaseModel):
|
|
|
745
725
|
description="The number indicates the factor with which the OMBC.OperationMode should be configured. The factor should be greater than or equal than 0 and less or equal to 1.",
|
|
746
726
|
)
|
|
747
727
|
abnormal_condition: bool = Field(
|
|
748
|
-
...,
|
|
749
|
-
description="Indicates if this is an instruction during an abnormal condition",
|
|
728
|
+
..., description="Indicates if this is an instruction during an abnormal condition"
|
|
750
729
|
)
|
|
751
730
|
|
|
752
731
|
|
|
@@ -824,8 +803,7 @@ class FRBCInstruction(BaseModel):
|
|
|
824
803
|
description="Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.",
|
|
825
804
|
)
|
|
826
805
|
abnormal_condition: bool = Field(
|
|
827
|
-
...,
|
|
828
|
-
description="Indicates if this is an instruction during an abnormal condition.",
|
|
806
|
+
..., description="Indicates if this is an instruction during an abnormal condition."
|
|
829
807
|
)
|
|
830
808
|
|
|
831
809
|
|
|
@@ -871,8 +849,7 @@ class DDBCActuatorStatus(BaseModel):
|
|
|
871
849
|
message_id: ID
|
|
872
850
|
actuator_id: ID = Field(..., description="ID of the actuator this messages refers to")
|
|
873
851
|
active_operation_mode_id: ID = Field(
|
|
874
|
-
...,
|
|
875
|
-
description="The operation mode that is presently active for this actuator.",
|
|
852
|
+
..., description="The operation mode that is presently active for this actuator."
|
|
876
853
|
)
|
|
877
854
|
operation_mode_factor: float = Field(
|
|
878
855
|
...,
|
|
@@ -903,8 +880,7 @@ class DDBCInstruction(BaseModel):
|
|
|
903
880
|
description="Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.",
|
|
904
881
|
)
|
|
905
882
|
abnormal_condition: bool = Field(
|
|
906
|
-
...,
|
|
907
|
-
description="Indicates if this is an instruction during an abnormal condition",
|
|
883
|
+
..., description="Indicates if this is an instruction during an abnormal condition"
|
|
908
884
|
)
|
|
909
885
|
actuator_id: ID = Field(..., description="ID of the actuator this Instruction belongs to.")
|
|
910
886
|
operation_mode_id: ID = Field(..., description="ID of the DDBC.OperationMode")
|
|
@@ -937,8 +913,7 @@ class PowerValue(BaseModel):
|
|
|
937
913
|
..., description="The power quantity the value refers to"
|
|
938
914
|
)
|
|
939
915
|
value: float = Field(
|
|
940
|
-
...,
|
|
941
|
-
description="Power value expressed in the unit associated with the CommodityQuantity",
|
|
916
|
+
..., description="Power value expressed in the unit associated with the CommodityQuantity"
|
|
942
917
|
)
|
|
943
918
|
|
|
944
919
|
|
|
@@ -1020,8 +995,7 @@ class PEBCAllowedLimitRange(BaseModel):
|
|
|
1020
995
|
..., description="Type of power quantity this PEBC.AllowedLimitRange applies to"
|
|
1021
996
|
)
|
|
1022
997
|
limit_type: PEBCPowerEnvelopeLimitType = Field(
|
|
1023
|
-
...,
|
|
1024
|
-
description="Indicates if this ranges applies to the upper limit or the lower limit",
|
|
998
|
+
..., description="Indicates if this ranges applies to the upper limit or the lower limit"
|
|
1025
999
|
)
|
|
1026
1000
|
range_boundary: NumberRange = Field(
|
|
1027
1001
|
...,
|
|
@@ -1193,8 +1167,7 @@ class ResourceManagerDetails(BaseModel):
|
|
|
1193
1167
|
)
|
|
1194
1168
|
manufacturer: Optional[str] = Field(None, description="Name of Manufacturer")
|
|
1195
1169
|
model: Optional[str] = Field(
|
|
1196
|
-
None,
|
|
1197
|
-
description="Name of the model of the device (provided by the manufacturer)",
|
|
1170
|
+
None, description="Name of the model of the device (provided by the manufacturer)"
|
|
1198
1171
|
)
|
|
1199
1172
|
serial_number: Optional[str] = Field(
|
|
1200
1173
|
None, description="Serial number of the device (provided by the manufacturer)"
|
|
@@ -1218,8 +1191,7 @@ class ResourceManagerDetails(BaseModel):
|
|
|
1218
1191
|
description="Currency to be used for all information regarding costs. Mandatory if cost information is published.",
|
|
1219
1192
|
)
|
|
1220
1193
|
provides_forecast: bool = Field(
|
|
1221
|
-
...,
|
|
1222
|
-
description="Indicates whether the ResourceManager is able to provide PowerForecasts",
|
|
1194
|
+
..., description="Indicates whether the ResourceManager is able to provide PowerForecasts"
|
|
1223
1195
|
)
|
|
1224
1196
|
provides_power_measurement_types: List[CommodityQuantity] = Field(
|
|
1225
1197
|
...,
|
|
@@ -1306,8 +1278,7 @@ class PEBCInstruction(BaseModel):
|
|
|
1306
1278
|
description="Indicates the moment the execution of the instruction shall start. When the specified execution time is in the past, execution must start as soon as possible.",
|
|
1307
1279
|
)
|
|
1308
1280
|
abnormal_condition: bool = Field(
|
|
1309
|
-
...,
|
|
1310
|
-
description="Indicates if this is an instruction during an abnormal condition.",
|
|
1281
|
+
..., description="Indicates if this is an instruction during an abnormal condition."
|
|
1311
1282
|
)
|
|
1312
1283
|
power_constraints_id: ID = Field(
|
|
1313
1284
|
...,
|
|
@@ -1380,8 +1351,7 @@ class PPBCPowerSequence(BaseModel):
|
|
|
1380
1351
|
min_length=1,
|
|
1381
1352
|
)
|
|
1382
1353
|
is_interruptible: bool = Field(
|
|
1383
|
-
...,
|
|
1384
|
-
description="Indicates whether the option of pausing a sequence is available.",
|
|
1354
|
+
..., description="Indicates whether the option of pausing a sequence is available."
|
|
1385
1355
|
)
|
|
1386
1356
|
max_pause_before: Optional[Duration] = Field(
|
|
1387
1357
|
None,
|
|
@@ -1509,10 +1479,7 @@ class FRBCActuatorDescription(BaseModel):
|
|
|
1509
1479
|
description="Human readable name/description for the actuator. This element is only intended for diagnostic purposes and not for HMI applications.",
|
|
1510
1480
|
)
|
|
1511
1481
|
supported_commodities: List[Commodity] = Field(
|
|
1512
|
-
...,
|
|
1513
|
-
description="List of all supported Commodities.",
|
|
1514
|
-
max_length=4,
|
|
1515
|
-
min_length=1,
|
|
1482
|
+
..., description="List of all supported Commodities.", max_length=4, min_length=1
|
|
1516
1483
|
)
|
|
1517
1484
|
operation_modes: List[FRBCOperationMode] = Field(
|
|
1518
1485
|
...,
|
|
@@ -3,3 +3,11 @@ from s2python.ombc.ombc_operation_mode import OMBCOperationMode
|
|
|
3
3
|
from s2python.ombc.ombc_status import OMBCStatus
|
|
4
4
|
from s2python.ombc.ombc_system_description import OMBCSystemDescription
|
|
5
5
|
from s2python.ombc.ombc_timer_status import OMBCTimerStatus
|
|
6
|
+
|
|
7
|
+
__all__ = [
|
|
8
|
+
"OMBCInstruction",
|
|
9
|
+
"OMBCOperationMode",
|
|
10
|
+
"OMBCStatus",
|
|
11
|
+
"OMBCSystemDescription",
|
|
12
|
+
"OMBCTimerStatus",
|
|
13
|
+
]
|
|
@@ -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 Optional, TypeVar, Union, Type, Dict, Any
|
|
4
4
|
|
|
5
5
|
from s2python.common import (
|
|
6
6
|
Handshake,
|
|
@@ -67,13 +67,13 @@ TYPE_TO_MESSAGE_CLASS: Dict[str, Type[S2Message]] = {
|
|
|
67
67
|
|
|
68
68
|
class S2Parser:
|
|
69
69
|
@staticmethod
|
|
70
|
-
def _parse_json_if_required(unparsed_message: Union[dict, str, bytes]) -> dict:
|
|
70
|
+
def _parse_json_if_required(unparsed_message: Union[dict[Any, Any], str, bytes]) -> dict:
|
|
71
71
|
if isinstance(unparsed_message, (str, bytes)):
|
|
72
72
|
return json.loads(unparsed_message)
|
|
73
73
|
return unparsed_message
|
|
74
74
|
|
|
75
75
|
@staticmethod
|
|
76
|
-
def parse_as_any_message(unparsed_message: Union[dict, str, bytes]) -> S2Message:
|
|
76
|
+
def parse_as_any_message(unparsed_message: Union[dict[Any, Any], str, bytes]) -> S2Message:
|
|
77
77
|
"""Parse the message as any S2 python message regardless of message type.
|
|
78
78
|
|
|
79
79
|
:param unparsed_message: The message as a JSON-formatted string or as a json-parsed dictionary.
|
|
@@ -94,7 +94,7 @@ class S2Parser:
|
|
|
94
94
|
|
|
95
95
|
@staticmethod
|
|
96
96
|
def parse_as_message(
|
|
97
|
-
unparsed_message: Union[dict, str, bytes], as_message: Type[M]
|
|
97
|
+
unparsed_message: Union[dict[Any, Any], str, bytes], as_message: Type[M]
|
|
98
98
|
) -> M:
|
|
99
99
|
"""Parse the message to a specific S2 python message.
|
|
100
100
|
|
|
@@ -108,7 +108,7 @@ class S2Parser:
|
|
|
108
108
|
|
|
109
109
|
@staticmethod
|
|
110
110
|
def parse_message_type(
|
|
111
|
-
unparsed_message: Union[dict, str, bytes],
|
|
111
|
+
unparsed_message: Union[dict[Any, Any], str, bytes],
|
|
112
112
|
) -> Optional[S2MessageType]:
|
|
113
113
|
"""Parse only the message type from the unparsed message.
|
|
114
114
|
|
|
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
|
{s2_python-0.7.0 → s2_python-0.7.1}/development_utilities/generate_s2_message_type_to_class.py
RENAMED
|
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
|
{s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ddbc/ddbc_average_demand_rate_forecast_element.py
RENAMED
|
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
|
{s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/frbc/frbc_fill_level_target_profile_element.py
RENAMED
|
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
|
{s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_power_sequence_container_status.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{s2_python-0.7.0 → s2_python-0.7.1}/src/s2python/ppbc/ppbc_start_interruption_instruction.py
RENAMED
|
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
|
{s2_python-0.7.0 → s2_python-0.7.1}/tests/unit/frbc/frbc_fill_level_target_profile_element_test.py
RENAMED
|
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
|