iris-pex-embedded-python 4.0.0b9__tar.gz → 4.0.0b10__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.
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/PKG-INFO +1 -1
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/pyproject.toml +4 -1
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/__init__.py +3 -3
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cli/main.py +3 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cli/parser.py +1 -1
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Utils.cls +78 -2
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/business_host.py +29 -24
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/business_process.py +2 -2
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/__init__.py +2 -2
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/actions.py +15 -6
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/component.py +29 -29
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/declarations.py +22 -17
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/declarative.py +88 -25
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/diff.py +5 -5
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/import_.py +29 -8
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/inspection.py +1 -1
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/model.py +178 -85
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/planning.py +15 -12
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/reconstruction.py +139 -8
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/rendering.py +27 -18
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/runtime.py +22 -7
- iris_pex_embedded_python-4.0.0b10/src/iop/production/source_inference.py +681 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/types.py +225 -11
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iris_pex_embedded_python.egg-info/PKG-INFO +1 -1
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +1 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/LICENSE +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/README.md +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/setup.cfg +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/__main__.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cli/__init__.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cli/formatting.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cli/types.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/BusinessService.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Common.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Director.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Generator/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Generator/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Generator/Message/Start.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Generator/Message/StartPickle.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Generator/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Message.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Projection.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Service/Remote/Handler.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Service/Remote/Rest/v1.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Test.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Wrapper.cls +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/__init__.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/async_request.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/business_operation.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/business_service.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/common.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/debugpy.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/generator_request.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/inbound_adapter.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/log_manager.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/outbound_adapter.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/polling_business_service.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/private_session_duplex.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/private_session_process.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/components/settings.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/messages/__init__.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/messages/base.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/messages/decorators.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/messages/dispatch.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/messages/persistent.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/messages/serialization.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/messages/validation.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/migration/__init__.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/migration/io.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/migration/manifest.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/migration/plans.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/migration/utils.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/common.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/validation.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/__init__.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/director.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/environment.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/iris.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/local.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/protocol.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/remote/__init__.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/remote/client.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/remote/director.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/remote/migration.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/remote/settings.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/runtime/remote/setup.py +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
- {iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
|
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
|
|
|
3
3
|
|
|
4
4
|
[project]
|
|
5
5
|
name = "iris_pex_embedded_python"
|
|
6
|
-
version = "4.0.
|
|
6
|
+
version = "4.0.0b10"
|
|
7
7
|
description = "Iris Interoperability based on Embedded Python"
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
requires-python = ">=3.10"
|
|
@@ -63,6 +63,9 @@ markers = [
|
|
|
63
63
|
"e2e_remote: end-to-end test requiring a remote IRIS instance via REST API",
|
|
64
64
|
]
|
|
65
65
|
|
|
66
|
+
[tool.pyright]
|
|
67
|
+
pythonVersion = "3.10"
|
|
68
|
+
|
|
66
69
|
[tool.ruff]
|
|
67
70
|
target-version = "py310"
|
|
68
71
|
line-length = 88
|
|
@@ -29,7 +29,6 @@ from iop.migration.utils import unregister_component as unregister_component
|
|
|
29
29
|
from iop.production import ComponentItem as ComponentItem
|
|
30
30
|
from iop.production import ComponentRef as ComponentRef
|
|
31
31
|
from iop.production import OperationItem as OperationItem
|
|
32
|
-
from iop.production import Port as Port
|
|
33
32
|
from iop.production import ProcessItem as ProcessItem
|
|
34
33
|
from iop.production import Production as Production
|
|
35
34
|
from iop.production import ProductionApplyResult as ProductionApplyResult
|
|
@@ -38,14 +37,15 @@ from iop.production import ProductionDiff as ProductionDiff
|
|
|
38
37
|
from iop.production import ProductionDiffEntry as ProductionDiffEntry
|
|
39
38
|
from iop.production import ProductionGraph as ProductionGraph
|
|
40
39
|
from iop.production import ProductionPlanOperation as ProductionPlanOperation
|
|
41
|
-
from iop.production import ProductionVerifyResult as ProductionVerifyResult
|
|
42
40
|
from iop.production import ProductionValidationError as ProductionValidationError
|
|
43
41
|
from iop.production import ProductionValidationIssue as ProductionValidationIssue
|
|
44
42
|
from iop.production import ProductionValidationReport as ProductionValidationReport
|
|
45
43
|
from iop.production import ProductionValidationWarning as ProductionValidationWarning
|
|
44
|
+
from iop.production import ProductionVerifyResult as ProductionVerifyResult
|
|
46
45
|
from iop.production import Route as Route
|
|
47
46
|
from iop.production import ServiceItem as ServiceItem
|
|
48
47
|
from iop.production import TargetSetting as TargetSetting
|
|
48
|
+
from iop.production import TargetSettingRef as TargetSettingRef
|
|
49
49
|
from iop.production import target as target
|
|
50
50
|
from iop.runtime.director import _Director
|
|
51
51
|
from iop.runtime.protocol import DirectorProtocol as DirectorProtocol
|
|
@@ -71,7 +71,6 @@ __all__ = [
|
|
|
71
71
|
"PersistentMessage",
|
|
72
72
|
"PickleMessage",
|
|
73
73
|
"PollingBusinessService",
|
|
74
|
-
"Port",
|
|
75
74
|
"ProcessItem",
|
|
76
75
|
"Production",
|
|
77
76
|
"ProductionApplyResult",
|
|
@@ -91,6 +90,7 @@ __all__ = [
|
|
|
91
90
|
"ServiceItem",
|
|
92
91
|
"Setting",
|
|
93
92
|
"TargetSetting",
|
|
93
|
+
"TargetSettingRef",
|
|
94
94
|
"Utils",
|
|
95
95
|
"bind_component",
|
|
96
96
|
"controls",
|
|
@@ -256,6 +256,9 @@ class Command:
|
|
|
256
256
|
if export_format == "graph":
|
|
257
257
|
print(production.graph())
|
|
258
258
|
return
|
|
259
|
+
if export_format == "mermaid":
|
|
260
|
+
print(production.to_mermaid(), end="")
|
|
261
|
+
return
|
|
259
262
|
raise ValueError(f"Unsupported export format: {export_format}")
|
|
260
263
|
|
|
261
264
|
def _handle_migrate(self) -> None:
|
{iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cli/parser.py
RENAMED
|
@@ -116,7 +116,7 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
116
116
|
export.add_argument(
|
|
117
117
|
"--format",
|
|
118
118
|
dest="export_format",
|
|
119
|
-
choices=("json", "python", "class", "graph"),
|
|
119
|
+
choices=("json", "python", "class", "graph", "mermaid"),
|
|
120
120
|
default="json",
|
|
121
121
|
help="export format for -e/--export",
|
|
122
122
|
)
|
{iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/cls/IOP/Utils.cls
RENAMED
|
@@ -798,6 +798,7 @@ ClassMethod ExportProductionConnections(pProductionName As %String) As %String
|
|
|
798
798
|
Set itemResult = {}
|
|
799
799
|
Set itemResult.item = item.Name
|
|
800
800
|
Set itemResult."class_name" = item.ClassName
|
|
801
|
+
Set itemResult.kind = ..ProductionItemKind(item.ClassName)
|
|
801
802
|
Set adapterClass = ""
|
|
802
803
|
Try {
|
|
803
804
|
Set adapterClass = $Parameter(item.ClassName, "ADAPTER")
|
|
@@ -806,6 +807,21 @@ ClassMethod ExportProductionConnections(pProductionName As %String) As %String
|
|
|
806
807
|
If adapterClass '= "" {
|
|
807
808
|
Set itemResult."adapter_class_name" = adapterClass
|
|
808
809
|
}
|
|
810
|
+
If ..ProductionItemIsIOP(item.ClassName) {
|
|
811
|
+
Set itemResult.iop = 1
|
|
812
|
+
Set module = ..ProductionItemSettingOrProxyDefault(item,item.ClassName,"%module")
|
|
813
|
+
Set classname = ..ProductionItemSettingOrProxyDefault(item,item.ClassName,"%classname")
|
|
814
|
+
Set classpaths = ..ProductionItemSettingOrProxyDefault(item,item.ClassName,"%classpaths")
|
|
815
|
+
If module '= "" {
|
|
816
|
+
Set itemResult.module = module
|
|
817
|
+
}
|
|
818
|
+
If classname '= "" {
|
|
819
|
+
Set itemResult.classname = classname
|
|
820
|
+
}
|
|
821
|
+
If classpaths '= "" {
|
|
822
|
+
Set itemResult.classpaths = classpaths
|
|
823
|
+
}
|
|
824
|
+
}
|
|
809
825
|
Set itemResult.connections = []
|
|
810
826
|
Set itemResult.warnings = []
|
|
811
827
|
Try {
|
|
@@ -828,6 +844,66 @@ ClassMethod ExportProductionConnections(pProductionName As %String) As %String
|
|
|
828
844
|
Return result.%ToJSON()
|
|
829
845
|
}
|
|
830
846
|
|
|
847
|
+
ClassMethod ProductionItemKind(pClassName As %String) As %String [ Internal, Private ]
|
|
848
|
+
{
|
|
849
|
+
Try {
|
|
850
|
+
If $ClassMethod(pClassName,"%Extends","Ens.BusinessService") {
|
|
851
|
+
Return "service"
|
|
852
|
+
}
|
|
853
|
+
If $ClassMethod(pClassName,"%Extends","Ens.BusinessProcess") {
|
|
854
|
+
Return "process"
|
|
855
|
+
}
|
|
856
|
+
If $ClassMethod(pClassName,"%Extends","Ens.BusinessOperation") {
|
|
857
|
+
Return "operation"
|
|
858
|
+
}
|
|
859
|
+
} Catch ex {
|
|
860
|
+
}
|
|
861
|
+
Quit "component"
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
ClassMethod ProductionItemIsIOP(pClassName As %String) As %Boolean [ Internal, Private ]
|
|
865
|
+
{
|
|
866
|
+
Try {
|
|
867
|
+
If $ClassMethod(pClassName,"%Extends","IOP.Common") {
|
|
868
|
+
Return 1
|
|
869
|
+
}
|
|
870
|
+
} Catch ex {
|
|
871
|
+
}
|
|
872
|
+
Try {
|
|
873
|
+
Set class = ##class(%Dictionary.ClassDefinition).%OpenId(pClassName)
|
|
874
|
+
If $IsObject(class) {
|
|
875
|
+
If class.GeneratedBy = $CLASSNAME() {
|
|
876
|
+
Return 1
|
|
877
|
+
}
|
|
878
|
+
If class.Super [ "IOP." {
|
|
879
|
+
Return 1
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
} Catch exClass {
|
|
883
|
+
}
|
|
884
|
+
Quit 0
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
ClassMethod ProductionItemSettingOrProxyDefault(
|
|
888
|
+
pItem As Ens.Config.Item,
|
|
889
|
+
pClassName As %String,
|
|
890
|
+
pSettingName As %String) As %String [ Internal, Private ]
|
|
891
|
+
{
|
|
892
|
+
Set value = ""
|
|
893
|
+
Try {
|
|
894
|
+
Do pItem.GetModifiedSetting(pSettingName,.value)
|
|
895
|
+
} Catch exSetting {
|
|
896
|
+
}
|
|
897
|
+
If value '= "" {
|
|
898
|
+
Quit value
|
|
899
|
+
}
|
|
900
|
+
Try {
|
|
901
|
+
Set value = ..ProxyPropertyInitialValue(pClassName,pSettingName)
|
|
902
|
+
} Catch exProxy {
|
|
903
|
+
}
|
|
904
|
+
Quit value
|
|
905
|
+
}
|
|
906
|
+
|
|
831
907
|
/// Export queue counters for production items.
|
|
832
908
|
ClassMethod ExportProductionQueueInfo(pProductionName As %String) As %String
|
|
833
909
|
{
|
|
@@ -963,10 +1039,10 @@ ClassMethod ApplyProductionPlanOperation(
|
|
|
963
1039
|
Return ..RemoveConfigSetting(..FindProductionItem(pProduction,pOperation.%Get("item")),pOperation.%Get("target"),pOperation.%Get("setting"))
|
|
964
1040
|
}
|
|
965
1041
|
If opType = "set_route_setting" {
|
|
966
|
-
Return ..SetConfigSetting(..FindProductionItem(pProduction,pOperation.%Get("source_item")),"Host",pOperation.%Get("
|
|
1042
|
+
Return ..SetConfigSetting(..FindProductionItem(pProduction,pOperation.%Get("source_item")),"Host",pOperation.%Get("source_target_setting"),..DynamicArrayToCSV(pOperation.%Get("after")))
|
|
967
1043
|
}
|
|
968
1044
|
If opType = "remove_route" {
|
|
969
|
-
Return ..RemoveConfigSetting(..FindProductionItem(pProduction,pOperation.%Get("source_item")),"Host",pOperation.%Get("
|
|
1045
|
+
Return ..RemoveConfigSetting(..FindProductionItem(pProduction,pOperation.%Get("source_item")),"Host",pOperation.%Get("source_target_setting"))
|
|
970
1046
|
}
|
|
971
1047
|
Quit $$$ERROR($$$EnsErrGeneral,"Unsupported production plan operation: "_opType)
|
|
972
1048
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ast
|
|
2
2
|
import textwrap
|
|
3
3
|
from inspect import getsource
|
|
4
|
-
from typing import Any
|
|
4
|
+
from typing import Any, cast
|
|
5
5
|
|
|
6
6
|
from ..messages.base import _Message as Message
|
|
7
7
|
from ..messages.decorators import (
|
|
@@ -15,13 +15,18 @@ from ..messages.dispatch import (
|
|
|
15
15
|
dispatch_message,
|
|
16
16
|
dispatch_serializer,
|
|
17
17
|
)
|
|
18
|
-
from ..production import
|
|
18
|
+
from ..production import TargetSettingRef, resolve_target
|
|
19
19
|
from ..runtime import iris as _iris
|
|
20
20
|
from .async_request import AsyncRequest
|
|
21
21
|
from .common import _Common
|
|
22
22
|
from .generator_request import _GeneratorRequest
|
|
23
23
|
|
|
24
|
-
_CONNECTION_METHODS = {
|
|
24
|
+
_CONNECTION_METHODS = {
|
|
25
|
+
"send_request_sync",
|
|
26
|
+
"send_request_async",
|
|
27
|
+
"send_request_async_ng",
|
|
28
|
+
"send_generator_request",
|
|
29
|
+
}
|
|
25
30
|
_UNRESOLVED = object()
|
|
26
31
|
|
|
27
32
|
|
|
@@ -95,7 +100,7 @@ class _BusinessHost(_Common):
|
|
|
95
100
|
@output_deserializer
|
|
96
101
|
def send_request_sync(
|
|
97
102
|
self,
|
|
98
|
-
target: str |
|
|
103
|
+
target: str | TargetSettingRef,
|
|
99
104
|
request: Message | Any,
|
|
100
105
|
timeout: int = -1,
|
|
101
106
|
description: str | None = None,
|
|
@@ -122,7 +127,7 @@ class _BusinessHost(_Common):
|
|
|
122
127
|
@input_serializer_param(1, "request")
|
|
123
128
|
def send_request_async(
|
|
124
129
|
self,
|
|
125
|
-
target: str |
|
|
130
|
+
target: str | TargetSettingRef,
|
|
126
131
|
request: Message | Any,
|
|
127
132
|
description: str | None = None,
|
|
128
133
|
) -> None:
|
|
@@ -141,7 +146,7 @@ class _BusinessHost(_Common):
|
|
|
141
146
|
|
|
142
147
|
async def send_request_async_ng(
|
|
143
148
|
self,
|
|
144
|
-
target: str |
|
|
149
|
+
target: str | TargetSettingRef,
|
|
145
150
|
request: Message | Any,
|
|
146
151
|
timeout: int = -1,
|
|
147
152
|
description: str | None = None,
|
|
@@ -157,12 +162,12 @@ class _BusinessHost(_Common):
|
|
|
157
162
|
Returns:
|
|
158
163
|
Response from target component
|
|
159
164
|
"""
|
|
160
|
-
target = resolve_target(target)
|
|
165
|
+
target = cast(str, resolve_target(target))
|
|
161
166
|
return await AsyncRequest(target, request, timeout, description, self)
|
|
162
167
|
|
|
163
168
|
def send_generator_request(
|
|
164
169
|
self,
|
|
165
|
-
target: str |
|
|
170
|
+
target: str | TargetSettingRef,
|
|
166
171
|
request: Message | Any,
|
|
167
172
|
timeout: int = -1,
|
|
168
173
|
description: str | None = None,
|
|
@@ -178,12 +183,12 @@ class _BusinessHost(_Common):
|
|
|
178
183
|
Raises:
|
|
179
184
|
TypeError: If request is not of type Message
|
|
180
185
|
"""
|
|
181
|
-
target = resolve_target(target)
|
|
186
|
+
target = cast(str, resolve_target(target))
|
|
182
187
|
return _GeneratorRequest(self, target, request, timeout, description)
|
|
183
188
|
|
|
184
189
|
def send_multi_request_sync(
|
|
185
190
|
self,
|
|
186
|
-
target_request: list[tuple[str |
|
|
191
|
+
target_request: list[tuple[str | TargetSettingRef, Message | Any]],
|
|
187
192
|
timeout: int = -1,
|
|
188
193
|
description: str | None = None,
|
|
189
194
|
) -> list[tuple[str, Message | Any, Any, int]]:
|
|
@@ -202,31 +207,31 @@ class _BusinessHost(_Common):
|
|
|
202
207
|
ValueError: If target_request is empty
|
|
203
208
|
"""
|
|
204
209
|
self._validate_target_request(target_request)
|
|
205
|
-
|
|
210
|
+
resolved_target_request: list[tuple[str, Message | Any]] = [
|
|
206
211
|
(resolve_target(target), request) for target, request in target_request
|
|
207
212
|
]
|
|
208
213
|
|
|
209
214
|
call_list = [
|
|
210
215
|
self._create_call_structure(target, request)
|
|
211
|
-
for target, request in
|
|
212
|
-
]
|
|
216
|
+
for target, request in resolved_target_request
|
|
217
|
+
]
|
|
213
218
|
|
|
214
219
|
response_list = self.iris_handle.dispatchSendRequestSyncMultiple(
|
|
215
220
|
call_list, timeout
|
|
216
221
|
)
|
|
217
222
|
|
|
218
|
-
return [
|
|
219
|
-
(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
dispatch_deserializer(response_list[i].Response),
|
|
223
|
-
response_list[i].ResponseCode,
|
|
224
|
-
)
|
|
225
|
-
for i in range(len(
|
|
226
|
-
]
|
|
223
|
+
return [
|
|
224
|
+
(
|
|
225
|
+
resolved_target_request[i][0],
|
|
226
|
+
resolved_target_request[i][1],
|
|
227
|
+
dispatch_deserializer(response_list[i].Response),
|
|
228
|
+
int(response_list[i].ResponseCode),
|
|
229
|
+
)
|
|
230
|
+
for i in range(len(resolved_target_request))
|
|
231
|
+
]
|
|
227
232
|
|
|
228
233
|
def _validate_target_request(
|
|
229
|
-
self, target_request: list[tuple[str |
|
|
234
|
+
self, target_request: list[tuple[str | TargetSettingRef, Message | Any]]
|
|
230
235
|
) -> None:
|
|
231
236
|
"""Validate the target_request parameter structure."""
|
|
232
237
|
if not isinstance(target_request, list):
|
|
@@ -239,7 +244,7 @@ class _BusinessHost(_Common):
|
|
|
239
244
|
raise TypeError("target_request must contain tuples of (target, request)")
|
|
240
245
|
|
|
241
246
|
def _create_call_structure(
|
|
242
|
-
self, target: str |
|
|
247
|
+
self, target: str | TargetSettingRef, request: Message | Any
|
|
243
248
|
) -> Any:
|
|
244
249
|
"""Create an Ens.CallStructure object for the request."""
|
|
245
250
|
iris = _iris.get_iris()
|
|
@@ -6,7 +6,7 @@ from ..messages.decorators import (
|
|
|
6
6
|
output_serializer,
|
|
7
7
|
)
|
|
8
8
|
from ..messages.dispatch import create_dispatch, dispatch_message
|
|
9
|
-
from ..production import
|
|
9
|
+
from ..production import TargetSettingRef, resolve_target
|
|
10
10
|
from .business_host import _BusinessHost
|
|
11
11
|
|
|
12
12
|
|
|
@@ -88,7 +88,7 @@ class _BusinessProcess(_BusinessHost):
|
|
|
88
88
|
@input_serializer_param(1, "request")
|
|
89
89
|
def send_request_async(
|
|
90
90
|
self,
|
|
91
|
-
target: str |
|
|
91
|
+
target: str | TargetSettingRef,
|
|
92
92
|
request: Any,
|
|
93
93
|
description: str | None = None,
|
|
94
94
|
completion_key: str | None = None,
|
|
@@ -15,11 +15,11 @@ from .runtime import resolve_target as resolve_target
|
|
|
15
15
|
from .types import GraphEdge as GraphEdge
|
|
16
16
|
from .types import GraphNode as GraphNode
|
|
17
17
|
from .types import PersistentMessageRegistration as PersistentMessageRegistration
|
|
18
|
-
from .types import Port as Port
|
|
19
18
|
from .types import ProductionDiff as ProductionDiff
|
|
20
19
|
from .types import ProductionDiffEntry as ProductionDiffEntry
|
|
21
20
|
from .types import ProductionGraph as ProductionGraph
|
|
22
21
|
from .types import TargetSetting as TargetSetting
|
|
22
|
+
from .types import TargetSettingRef as TargetSettingRef
|
|
23
23
|
from .types import target as target
|
|
24
24
|
from .validation import ProductionValidationError as ProductionValidationError
|
|
25
25
|
from .validation import ProductionValidationIssue as ProductionValidationIssue
|
|
@@ -33,7 +33,6 @@ __all__ = [
|
|
|
33
33
|
"GraphNode",
|
|
34
34
|
"OperationItem",
|
|
35
35
|
"PersistentMessageRegistration",
|
|
36
|
-
"Port",
|
|
37
36
|
"ProcessItem",
|
|
38
37
|
"Production",
|
|
39
38
|
"ProductionApplyResult",
|
|
@@ -50,6 +49,7 @@ __all__ = [
|
|
|
50
49
|
"Route",
|
|
51
50
|
"ServiceItem",
|
|
52
51
|
"TargetSetting",
|
|
52
|
+
"TargetSettingRef",
|
|
53
53
|
"resolve_target",
|
|
54
54
|
"target",
|
|
55
55
|
]
|
{iris_pex_embedded_python-4.0.0b9 → iris_pex_embedded_python-4.0.0b10}/src/iop/production/actions.py
RENAMED
|
@@ -17,7 +17,7 @@ from .planning import (
|
|
|
17
17
|
)
|
|
18
18
|
from .rendering import message_to_classname_body
|
|
19
19
|
from .runtime import _has_remote_director, _ProductionRuntime, _temporary_env
|
|
20
|
-
from .types import
|
|
20
|
+
from .types import TargetSettingRef
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
def start(production, detach: bool = True) -> None:
|
|
@@ -67,7 +67,10 @@ def update(production) -> None:
|
|
|
67
67
|
director.update_production()
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
def start_component(
|
|
70
|
+
def start_component(
|
|
71
|
+
production,
|
|
72
|
+
component: ComponentRef | TargetSettingRef | str,
|
|
73
|
+
) -> None:
|
|
71
74
|
component_name = production._runtime_component_name(component)
|
|
72
75
|
director = _ProductionRuntime(production).director
|
|
73
76
|
require_current_runtime(
|
|
@@ -78,7 +81,10 @@ def start_component(production, component: ComponentRef | Port | str) -> None:
|
|
|
78
81
|
director.start_component(component_name)
|
|
79
82
|
|
|
80
83
|
|
|
81
|
-
def stop_component(
|
|
84
|
+
def stop_component(
|
|
85
|
+
production,
|
|
86
|
+
component: ComponentRef | TargetSettingRef | str,
|
|
87
|
+
) -> None:
|
|
82
88
|
component_name = production._runtime_component_name(component)
|
|
83
89
|
director = _ProductionRuntime(production).director
|
|
84
90
|
require_current_runtime(
|
|
@@ -89,7 +95,10 @@ def stop_component(production, component: ComponentRef | Port | str) -> None:
|
|
|
89
95
|
director.stop_component(component_name)
|
|
90
96
|
|
|
91
97
|
|
|
92
|
-
def restart_component(
|
|
98
|
+
def restart_component(
|
|
99
|
+
production,
|
|
100
|
+
component: ComponentRef | TargetSettingRef | str,
|
|
101
|
+
) -> None:
|
|
93
102
|
component_name = production._runtime_component_name(component)
|
|
94
103
|
director = _ProductionRuntime(production).director
|
|
95
104
|
require_current_runtime(
|
|
@@ -300,13 +309,13 @@ def log(production, top: int | None = None) -> None:
|
|
|
300
309
|
|
|
301
310
|
def test_component(
|
|
302
311
|
production,
|
|
303
|
-
|
|
312
|
+
target_or_ref: str | TargetSettingRef | ComponentRef,
|
|
304
313
|
message: Any = None,
|
|
305
314
|
classname: str | None = None,
|
|
306
315
|
body: str | dict | None = None,
|
|
307
316
|
) -> Any:
|
|
308
317
|
director = _ProductionRuntime(production).director
|
|
309
|
-
target_name = production.resolve_target(
|
|
318
|
+
target_name = production.resolve_target(target_or_ref)
|
|
310
319
|
|
|
311
320
|
raise_if_existing_production_not_running(production, director)
|
|
312
321
|
|
|
@@ -12,7 +12,7 @@ from .common import (
|
|
|
12
12
|
_settings_to_iris,
|
|
13
13
|
_text_value,
|
|
14
14
|
)
|
|
15
|
-
from .types import
|
|
15
|
+
from .types import TargetSetting, TargetSettingRef
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
@dataclass
|
|
@@ -36,7 +36,8 @@ class ComponentRef:
|
|
|
36
36
|
host_settings: dict[str, Any] = field(default_factory=dict)
|
|
37
37
|
adapter_settings: dict[str, Any] = field(default_factory=dict)
|
|
38
38
|
other_settings: list[dict[str, Any]] = field(default_factory=list)
|
|
39
|
-
|
|
39
|
+
target_setting_names: set[str] = field(default_factory=set)
|
|
40
|
+
runtime_metadata: dict[str, Any] = field(default_factory=dict)
|
|
40
41
|
|
|
41
42
|
def __post_init__(self) -> None:
|
|
42
43
|
if self.class_name is None:
|
|
@@ -52,22 +53,22 @@ class ComponentRef:
|
|
|
52
53
|
if not self.adapter_class_name:
|
|
53
54
|
self.adapter_class_name = _adapter_type_from_class_name(self.class_name)
|
|
54
55
|
|
|
55
|
-
def __getattr__(self, name: str) ->
|
|
56
|
+
def __getattr__(self, name: str) -> TargetSettingRef:
|
|
56
57
|
if self.component_class is not None:
|
|
57
58
|
descriptor = getattr(self.component_class, name, None)
|
|
58
59
|
if isinstance(descriptor, TargetSetting):
|
|
59
|
-
return
|
|
60
|
+
return TargetSettingRef(
|
|
60
61
|
production=self.production,
|
|
61
62
|
component=self,
|
|
62
63
|
name=name,
|
|
63
64
|
)
|
|
64
|
-
if name in self.
|
|
65
|
-
return self.
|
|
65
|
+
if name in self.target_setting_names:
|
|
66
|
+
return self.target_setting(name)
|
|
66
67
|
raise AttributeError(name)
|
|
67
68
|
|
|
68
|
-
def
|
|
69
|
-
self.
|
|
70
|
-
return
|
|
69
|
+
def target_setting(self, name: str) -> TargetSettingRef:
|
|
70
|
+
self.target_setting_names.add(name)
|
|
71
|
+
return TargetSettingRef(
|
|
71
72
|
production=self.production,
|
|
72
73
|
component=self,
|
|
73
74
|
name=name,
|
|
@@ -160,30 +161,29 @@ class ComponentRef:
|
|
|
160
161
|
|
|
161
162
|
def connect(
|
|
162
163
|
self,
|
|
163
|
-
|
|
164
|
-
target_component: ComponentRef | str,
|
|
164
|
+
target_setting: str | TargetSettingRef,
|
|
165
|
+
target_component: ComponentRef | str | None = None,
|
|
166
|
+
**kwargs: Any,
|
|
165
167
|
) -> ComponentRef:
|
|
166
|
-
|
|
167
|
-
self.production.connect(
|
|
168
|
+
target_setting_ref = self._coerce_target_setting_ref(target_setting)
|
|
169
|
+
self.production.connect(target_setting_ref, target_component, **kwargs)
|
|
168
170
|
return self
|
|
169
171
|
|
|
170
|
-
def
|
|
172
|
+
def _coerce_target_setting_ref(
|
|
171
173
|
self,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return port_name
|
|
186
|
-
return self.port(str(port_name))
|
|
174
|
+
target_setting: str | TargetSettingRef,
|
|
175
|
+
) -> TargetSettingRef:
|
|
176
|
+
if isinstance(target_setting, TargetSettingRef):
|
|
177
|
+
if target_setting.production is not self.production:
|
|
178
|
+
raise ValueError(
|
|
179
|
+
"source target setting belongs to a different Production"
|
|
180
|
+
)
|
|
181
|
+
if target_setting.component is not self:
|
|
182
|
+
raise ValueError(
|
|
183
|
+
"source target setting belongs to a different component"
|
|
184
|
+
)
|
|
185
|
+
return target_setting
|
|
186
|
+
return self.target_setting(str(target_setting))
|
|
187
187
|
|
|
188
188
|
def inspect(self, *, refresh: bool = True) -> dict[str, Any]:
|
|
189
189
|
return self.production.inspect_component(self, refresh=refresh)
|
|
@@ -15,19 +15,19 @@ class _NamedRouteTarget(Protocol):
|
|
|
15
15
|
|
|
16
16
|
@dataclass(frozen=True)
|
|
17
17
|
class Route:
|
|
18
|
-
"""Declarative route from a
|
|
18
|
+
"""Declarative route from a target setting to one or more targets."""
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
target_setting: str | TargetSetting
|
|
21
21
|
targets: str | _NamedRouteTarget | Iterable[str | _NamedRouteTarget]
|
|
22
22
|
|
|
23
23
|
@property
|
|
24
|
-
def
|
|
25
|
-
return
|
|
24
|
+
def target_setting_name(self) -> str:
|
|
25
|
+
return normalize_route_target_setting(self.target_setting)
|
|
26
26
|
|
|
27
27
|
@property
|
|
28
|
-
def
|
|
29
|
-
if isinstance(self.
|
|
30
|
-
return self.
|
|
28
|
+
def target_setting_owner(self) -> type | None:
|
|
29
|
+
if isinstance(self.target_setting, TargetSetting):
|
|
30
|
+
return self.target_setting.owner
|
|
31
31
|
return None
|
|
32
32
|
|
|
33
33
|
@property
|
|
@@ -39,12 +39,17 @@ class Route:
|
|
|
39
39
|
targets = tuple(self.targets)
|
|
40
40
|
except TypeError as exc:
|
|
41
41
|
raise TypeError(
|
|
42
|
-
f"Route {self.
|
|
42
|
+
f"Route {self.target_setting_name!r} targets must be an item name, "
|
|
43
43
|
"a production item declaration, or an iterable of either"
|
|
44
44
|
) from exc
|
|
45
45
|
if not targets:
|
|
46
|
-
raise ValueError(
|
|
47
|
-
|
|
46
|
+
raise ValueError(
|
|
47
|
+
f"Route {self.target_setting_name!r} requires at least one target"
|
|
48
|
+
)
|
|
49
|
+
return tuple(
|
|
50
|
+
_route_target_name(target, self.target_setting_name)
|
|
51
|
+
for target in targets
|
|
52
|
+
)
|
|
48
53
|
|
|
49
54
|
|
|
50
55
|
@dataclass(frozen=True)
|
|
@@ -128,7 +133,7 @@ class OperationItem(_ProductionItemDeclaration):
|
|
|
128
133
|
kind: ClassVar[str] = "operation"
|
|
129
134
|
|
|
130
135
|
|
|
131
|
-
def
|
|
136
|
+
def normalize_route_target_setting(name: str | TargetSetting) -> str:
|
|
132
137
|
"""Normalize known Pythonic route aliases without changing other settings."""
|
|
133
138
|
|
|
134
139
|
if isinstance(name, TargetSetting):
|
|
@@ -137,19 +142,19 @@ def normalize_route_port(name: str | TargetSetting) -> str:
|
|
|
137
142
|
"Route target setting must be declared on a component class"
|
|
138
143
|
)
|
|
139
144
|
return name.name
|
|
140
|
-
|
|
141
|
-
return SETTING_NAME_ALIASES.get(
|
|
145
|
+
target_setting_name = str(name)
|
|
146
|
+
return SETTING_NAME_ALIASES.get(target_setting_name, target_setting_name)
|
|
142
147
|
|
|
143
148
|
|
|
144
|
-
def
|
|
145
|
-
return
|
|
149
|
+
def normalize_route_target_setting_for_match(name: str | TargetSetting) -> str:
|
|
150
|
+
return normalize_route_target_setting(name)
|
|
146
151
|
|
|
147
152
|
|
|
148
153
|
def _is_route_target(value: Any) -> bool:
|
|
149
154
|
return isinstance(value, str) or isinstance(value, _ProductionItemDeclaration)
|
|
150
155
|
|
|
151
156
|
|
|
152
|
-
def _route_target_name(value: Any,
|
|
157
|
+
def _route_target_name(value: Any, target_setting_name: str) -> str:
|
|
153
158
|
if isinstance(value, str):
|
|
154
159
|
if value:
|
|
155
160
|
return value
|
|
@@ -158,7 +163,7 @@ def _route_target_name(value: Any, port_name: str) -> str:
|
|
|
158
163
|
return value.name
|
|
159
164
|
|
|
160
165
|
raise TypeError(
|
|
161
|
-
f"Route {
|
|
166
|
+
f"Route {target_setting_name!r} targets must be item names or production item "
|
|
162
167
|
"declarations"
|
|
163
168
|
)
|
|
164
169
|
|