iris-pex-embedded-python 4.0.1b3__tar.gz → 4.0.1b5__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.
Files changed (145) hide show
  1. {iris_pex_embedded_python-4.0.1b3/src/iris_pex_embedded_python.egg-info → iris_pex_embedded_python-4.0.1b5}/PKG-INFO +1 -1
  2. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/production-settings-and-targets.md +19 -1
  3. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/production-graph.md +17 -0
  4. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/python-api.md +12 -0
  5. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/settings.md +18 -0
  6. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/pyproject.toml +1 -1
  7. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/messages/dispatch.py +125 -41
  8. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/model.py +48 -0
  9. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/types.py +10 -4
  10. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5/src/iris_pex_embedded_python.egg-info}/PKG-INFO +1 -1
  11. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/AGENTS.md +0 -0
  12. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/LICENSE +0 -0
  13. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/MANIFEST.in +0 -0
  14. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/README.md +0 -0
  15. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/agents-template.md +0 -0
  16. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/ai-coding.md +0 -0
  17. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/benchmarks.md +0 -0
  18. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/changelog.md +0 -0
  19. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/code-of-conduct.md +0 -0
  20. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/command-line.md +0 -0
  21. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/component-interaction.md +0 -0
  22. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/contributing.md +0 -0
  23. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/add-business-operation.md +0 -0
  24. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/add-business-process.md +0 -0
  25. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/add-polling-service.md +0 -0
  26. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/code-index.md +0 -0
  27. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/fhir-submission-python-client.md +0 -0
  28. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/hello-world-production.md +0 -0
  29. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/hl7v2-native-input.md +0 -0
  30. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/hl7v2-to-fhir-with-fhir-converter.md +0 -0
  31. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/index.md +0 -0
  32. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/cookbooks/remote-migration.md +0 -0
  33. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/credits.md +0 -0
  34. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/debug.md +0 -0
  35. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/dtl.md +0 -0
  36. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/example.md +0 -0
  37. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/getting-started/first-steps.md +0 -0
  38. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/getting-started/installation.md +0 -0
  39. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/getting-started/register-component.md +0 -0
  40. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/healthcare-ai-coding.md +0 -0
  41. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/index.md +0 -0
  42. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/logging.md +0 -0
  43. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/prod-settings.md +0 -0
  44. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/production-change-workflow.md +0 -0
  45. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/rest-api.md +0 -0
  46. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/useful-links.md +0 -0
  47. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/venv.md +0 -0
  48. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/docs/wrapper.md +0 -0
  49. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/mkdocs.yml +0 -0
  50. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/setup.cfg +0 -0
  51. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/__init__.py +0 -0
  52. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/__main__.py +0 -0
  53. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cli/__init__.py +0 -0
  54. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cli/formatting.py +0 -0
  55. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cli/main.py +0 -0
  56. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cli/parser.py +0 -0
  57. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cli/types.py +0 -0
  58. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/BusinessOperation.cls +0 -0
  59. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/BusinessProcess.cls +0 -0
  60. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/BusinessService.cls +0 -0
  61. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Common.cls +0 -0
  62. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Director.cls +0 -0
  63. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
  64. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
  65. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
  66. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Generator/Message/Ack.cls +0 -0
  67. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Generator/Message/Poll.cls +0 -0
  68. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Generator/Message/Start.cls +0 -0
  69. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Generator/Message/StartPickle.cls +0 -0
  70. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Generator/Message/Stop.cls +0 -0
  71. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/InboundAdapter.cls +0 -0
  72. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
  73. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Message.cls +0 -0
  74. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/OutboundAdapter.cls +0 -0
  75. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/PickleMessage.cls +0 -0
  76. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
  77. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
  78. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
  79. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
  80. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
  81. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Projection.cls +0 -0
  82. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Service/Remote/Handler.cls +0 -0
  83. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Service/Remote/Rest/v1.cls +0 -0
  84. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Test.cls +0 -0
  85. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Utils.cls +0 -0
  86. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/cls/IOP/Wrapper.cls +0 -0
  87. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/__init__.py +0 -0
  88. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/async_request.py +0 -0
  89. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/business_host.py +0 -0
  90. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/business_operation.py +0 -0
  91. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/business_process.py +0 -0
  92. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/business_service.py +0 -0
  93. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/common.py +0 -0
  94. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/debugpy.py +0 -0
  95. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/generator_request.py +0 -0
  96. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/inbound_adapter.py +0 -0
  97. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/log_manager.py +0 -0
  98. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/outbound_adapter.py +0 -0
  99. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/polling_business_service.py +0 -0
  100. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/private_session_duplex.py +0 -0
  101. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/private_session_process.py +0 -0
  102. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/components/settings.py +0 -0
  103. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/messages/__init__.py +0 -0
  104. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/messages/base.py +0 -0
  105. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/messages/decorators.py +0 -0
  106. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/messages/persistent.py +0 -0
  107. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/messages/serialization.py +0 -0
  108. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/messages/validation.py +0 -0
  109. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/migration/__init__.py +0 -0
  110. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/migration/io.py +0 -0
  111. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/migration/manifest.py +0 -0
  112. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/migration/plans.py +0 -0
  113. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/migration/utils.py +0 -0
  114. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/__init__.py +0 -0
  115. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/actions.py +0 -0
  116. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/common.py +0 -0
  117. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/component.py +0 -0
  118. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/declarations.py +0 -0
  119. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/declarative.py +0 -0
  120. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/diff.py +0 -0
  121. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/import_.py +0 -0
  122. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/inspection.py +0 -0
  123. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/planning.py +0 -0
  124. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/reconstruction.py +0 -0
  125. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/rendering.py +0 -0
  126. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/runtime.py +0 -0
  127. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/source_inference.py +0 -0
  128. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/production/validation.py +0 -0
  129. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/__init__.py +0 -0
  130. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/director.py +0 -0
  131. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/environment.py +0 -0
  132. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/iris.py +0 -0
  133. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/local.py +0 -0
  134. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/protocol.py +0 -0
  135. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/remote/__init__.py +0 -0
  136. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/remote/client.py +0 -0
  137. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/remote/director.py +0 -0
  138. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/remote/migration.py +0 -0
  139. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/remote/settings.py +0 -0
  140. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iop/runtime/remote/setup.py +0 -0
  141. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +0 -0
  142. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
  143. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
  144. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
  145. {iris_pex_embedded_python-4.0.1b3 → iris_pex_embedded_python-4.0.1b5}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 4.0.1b3
3
+ Version: 4.0.1b5
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -55,6 +55,25 @@ prod.connect(process.Accepted, accepted)
55
55
  prod.connect(process.Rejected, rejected)
56
56
  ```
57
57
 
58
+ When a route should have a conventional default, pass the target item name to
59
+ `target()`:
60
+
61
+ ```python
62
+ class RouteProcess(BusinessProcess):
63
+ Accepted = target("AcceptedOperation")
64
+ Rejected = target("RejectedOperation")
65
+
66
+
67
+ process = prod.process("RouteProcess", RouteProcess)
68
+ accepted = prod.operation("AcceptedOperation", AcceptedOperation)
69
+ rejected = prod.operation("RejectedOperation", RejectedOperation)
70
+ ```
71
+
72
+ The default target is written to the generated setting initial expression and
73
+ to the production Host setting. IoP records the graph edge when the named target
74
+ item exists. Use `prod.connect(...)` when the production should override the
75
+ class default.
76
+
58
77
  ## Migration Command
59
78
 
60
79
  ```bash
@@ -73,4 +92,3 @@ iop --migrate settings.py --dry-run
73
92
  `target()` settings.
74
93
  - Adding a component to `settings.py` but forgetting its graph edge.
75
94
  - Using raw production dictionaries for new Python-authored topology.
76
-
@@ -51,6 +51,11 @@ Implemented graph import and display:
51
51
  `str(target_setting_ref)` returns the stable authoring identity, such as
52
52
  `FileInput.Output`. Runtime dispatch uses explicit target setting resolution.
53
53
 
54
+ `target("OperationName")` declares a default target. The default is used as the
55
+ generated IRIS property initial expression, applied to the component Host
56
+ setting, and registered as a graph edge once the target item exists. Explicit
57
+ Host settings and `prod.connect(...)` override the class default.
58
+
54
59
  Implemented production lifecycle:
55
60
 
56
61
  - `prod.start()`
@@ -143,6 +148,18 @@ orders = prod.operation(OrderOperation)
143
148
  prod.connect(file.Output, orders)
144
149
  ```
145
150
 
151
+ For a conventional route, the target can be defaulted on the component class:
152
+
153
+ ```python
154
+ class FileService(PollingBusinessService):
155
+ Output = target("OrderOperation")
156
+
157
+
158
+ prod = Production("Demo.Production")
159
+ file = prod.service("FileInput", FileService)
160
+ orders = prod.operation("OrderOperation", OrderOperation)
161
+ ```
162
+
146
163
  ObjectScript and built-in IRIS components use `class_name`:
147
164
 
148
165
  ```python
@@ -209,6 +209,18 @@ class FileService(BusinessService):
209
209
  )
210
210
  ```
211
211
 
212
+ Pass a target item name to `target()` to declare a default route:
213
+
214
+ ```python
215
+ class FileService(BusinessService):
216
+ Output = target("OrderOperation")
217
+ ```
218
+
219
+ The default is used as the generated IRIS property initial expression and as the
220
+ production Host setting. If the named item is present in the `Production`, IoP
221
+ also records the graph edge. An explicit Host setting or `prod.connect(...)`
222
+ overrides the default.
223
+
212
224
  You can also keep normal Python defaults and attach metadata with `typing.Annotated`:
213
225
 
214
226
  ```python
@@ -210,6 +210,24 @@ PRODUCTIONS = [prod]
210
210
  `prod.connect()` sets that setting to the destination component and
211
211
  records graph edges available to Python.
212
212
 
213
+ Pass a production item name as the first `target()` argument when a route should
214
+ have a default target without an explicit `prod.connect(...)` call:
215
+
216
+ ```python
217
+ class FileService(PollingBusinessService):
218
+ Output = target("OrderOperation")
219
+
220
+
221
+ prod = Production("Demo.Production", testing_enabled=True)
222
+ file = prod.service("FileInput", FileService)
223
+ orders = prod.operation("OrderOperation", OrderOperation)
224
+ ```
225
+
226
+ The default becomes the generated IRIS property initial expression, populates
227
+ the component Host setting, and is recorded as a graph edge once the named
228
+ target item exists. An explicit Host setting or `prod.connect(...)` overrides
229
+ the class default.
230
+
213
231
  You can also write the same production as a class declaration. The class is a
214
232
  template; put an instance in `PRODUCTIONS`.
215
233
 
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "iris_pex_embedded_python"
6
- version = "4.0.1b3"
6
+ version = "4.0.1b5"
7
7
  description = "Iris Interoperability based on Embedded Python"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.10"
@@ -1,3 +1,4 @@
1
+ import ast
1
2
  import logging
2
3
  from collections.abc import Callable
3
4
  from dataclasses import dataclass
@@ -36,6 +37,8 @@ _PICKLE_MESSAGE_CLASSES = {
36
37
  "IOP.Generator.Message.StartPickle",
37
38
  }
38
39
  _HANDLER_ATTRIBUTE = "__iop_handler_message__"
40
+ _IRIS_MODULE_PREFIX = "iris."
41
+ _UNRESOLVED = object()
39
42
 
40
43
 
41
44
  @dataclass(frozen=True)
@@ -60,7 +63,7 @@ def handler(message_type: Any) -> Callable[[Callable], Callable]:
60
63
  message_type: The message class, fully qualified class name string, or
61
64
  IRIS object instance this method handles.
62
65
  """
63
- message = _message_class_name(message_type)
66
+ message = _message_key_from_declared(message_type)
64
67
  if message is None:
65
68
  raise TypeError("handler() requires a message class or class name")
66
69
 
@@ -154,11 +157,10 @@ def dispatch_message(host: Any, request: Any) -> Any:
154
157
  """
155
158
  call = "on_message"
156
159
 
157
- module = request.__class__.__module__
158
- classname = request.__class__.__name__
160
+ message_names = _message_keys_from_request(request)
159
161
 
160
162
  for msg, method in host.DISPATCH:
161
- if msg == module + "." + classname:
163
+ if msg in message_names:
162
164
  return getattr(host, method)(request)
163
165
 
164
166
  return getattr(host, call)(request)
@@ -202,15 +204,24 @@ def create_dispatch(host: Any) -> None:
202
204
 
203
205
  def _declared_dispatch(host: Any) -> list[tuple[str, str]]:
204
206
  if "DISPATCH" in getattr(host, "__dict__", {}):
205
- return list(host.__dict__["DISPATCH"])
207
+ return _normalized_dispatch(host.__dict__["DISPATCH"])
206
208
 
207
209
  class_dispatch = host.__class__.__dict__.get("DISPATCH")
208
210
  if class_dispatch is not None:
209
- return list(class_dispatch)
211
+ return _normalized_dispatch(class_dispatch)
210
212
 
211
213
  return []
212
214
 
213
215
 
216
+ def _normalized_dispatch(dispatch: Any) -> list[tuple[str, str]]:
217
+ entries = []
218
+ for message, method in dispatch:
219
+ key = _message_key_from_declared(message)
220
+ if key is not None:
221
+ entries.append((key, method))
222
+ return entries
223
+
224
+
214
225
  def _decorated_dispatch(host: Any) -> list[tuple[str, str]]:
215
226
  dispatch = []
216
227
  for method_name in dir(host):
@@ -308,12 +319,7 @@ def get_handler_info(host: Any, method_name: str) -> tuple[str, str] | None:
308
319
 
309
320
  method = getattr(host, method_name)
310
321
  param: Parameter = next(iter(params.values()))
311
- annotation = _resolve_annotation(host, method, param.annotation)
312
-
313
- if annotation == Parameter.empty:
314
- return None
315
-
316
- message = _message_class_name(annotation)
322
+ message = _message_key_from_annotation(host, method, param.annotation)
317
323
  if message is None:
318
324
  return None
319
325
 
@@ -323,48 +329,63 @@ def get_handler_info(host: Any, method_name: str) -> tuple[str, str] | None:
323
329
  return None
324
330
 
325
331
 
326
- def _resolve_annotation(host: Any, method: Callable, annotation: Any) -> Any:
332
+ def _message_key_from_annotation(
333
+ host: Any, method: Callable, annotation: Any
334
+ ) -> str | None:
335
+ if annotation == Parameter.empty:
336
+ return None
337
+
327
338
  if not isinstance(annotation, str):
328
- return annotation
339
+ return _message_key_from_declared(annotation, allow_bare_string=False)
329
340
 
330
- globalns = _annotation_globalns(method)
331
- localns = _annotation_localns(host)
341
+ value: Any = annotation
342
+ for _ in range(3):
343
+ if not isinstance(value, str):
344
+ return _message_key_from_declared(value, allow_bare_string=False)
332
345
 
333
- try:
334
- resolved = eval(annotation, globalns, localns) # noqa: B307
335
- except Exception:
336
- resolved = annotation
346
+ key = _message_key_from_string(value, allow_bare=False)
347
+ if key is not None:
348
+ return key
337
349
 
338
- if isinstance(resolved, str):
339
- # Quoted postponed annotations evaluate to a string first.
340
- try:
341
- resolved = eval(resolved, globalns, localns) # noqa: B307
342
- except Exception:
343
- if "." in resolved:
344
- return resolved
345
- return Parameter.empty
350
+ unquoted = _unquote_string(value)
351
+ if unquoted is not None and unquoted != value:
352
+ value = unquoted
353
+ continue
346
354
 
347
- return resolved
355
+ value = _lookup_annotation_name(host, method, value)
356
+ if value is _UNRESOLVED:
357
+ return None
348
358
 
359
+ return None
349
360
 
350
- def _annotation_globalns(method: Callable) -> dict[str, Any]:
351
- function = getattr(method, "__func__", method)
352
- return getattr(function, "__globals__", {})
353
361
 
362
+ def _message_keys_from_request(request: Any) -> tuple[str, ...]:
363
+ module = request.__class__.__module__
364
+ classname = request.__class__.__name__
365
+ names = [f"{module}.{classname}"]
354
366
 
355
- def _annotation_localns(host: Any) -> dict[str, Any]:
356
- namespace: dict[str, Any] = {}
357
- for klass in reversed(type(host).__mro__):
358
- namespace.update(vars(klass))
359
- return namespace
367
+ if module.startswith("iris"):
368
+ native_name = _native_iris_message_key(request)
369
+ if native_name:
370
+ names.append(native_name)
371
+ names.append(f"{_IRIS_MODULE_PREFIX}{native_name}")
372
+
373
+ return tuple(dict.fromkeys(names))
360
374
 
361
375
 
362
- def _message_class_name(message_type: Any) -> str | None:
376
+ def _message_key_from_declared(
377
+ message_type: Any, *, allow_bare_string: bool = True
378
+ ) -> str | None:
363
379
  if isinstance(message_type, str):
364
- return message_type
380
+ return _message_key_from_string(
381
+ message_type,
382
+ allow_bare=allow_bare_string,
383
+ )
365
384
 
366
385
  if is_iris_object_instance(message_type):
367
- return f"{type(message_type).__module__}.{type(message_type).__name__}"
386
+ return _native_iris_message_key(message_type) or _python_class_key(
387
+ type(message_type)
388
+ )
368
389
 
369
390
  if message_type is Any or message_type is object:
370
391
  return None
@@ -375,7 +396,70 @@ def _message_class_name(message_type: Any) -> str | None:
375
396
  if not _is_dispatch_message_class(message_type):
376
397
  return None
377
398
 
378
- return f"{message_type.__module__}.{message_type.__name__}"
399
+ return _python_class_key(message_type)
400
+
401
+
402
+ def _message_key_from_string(value: str, *, allow_bare: bool) -> str | None:
403
+ if not value or _unquote_string(value) is not None:
404
+ return None
405
+
406
+ normalized = _strip_iris_prefix(value)
407
+ if "." in normalized:
408
+ return normalized if _looks_like_message_key(normalized) else None
409
+
410
+ return normalized if allow_bare else None
411
+
412
+
413
+ def _native_iris_message_key(message: Any) -> str | None:
414
+ iris_classname = get_iris_object_classname(message)
415
+ if not iris_classname:
416
+ return None
417
+ return _strip_iris_prefix(iris_classname)
418
+
419
+
420
+ def _python_class_key(klass: type) -> str:
421
+ return f"{klass.__module__}.{klass.__name__}"
422
+
423
+
424
+ def _strip_iris_prefix(value: str) -> str:
425
+ if value.startswith(_IRIS_MODULE_PREFIX):
426
+ return value[len(_IRIS_MODULE_PREFIX) :]
427
+ return value
428
+
429
+
430
+ def _looks_like_message_key(value: str) -> bool:
431
+ return not any(character in value for character in "'\"[](){} ,:")
432
+
433
+
434
+ def _unquote_string(value: str) -> str | None:
435
+ try:
436
+ literal = ast.literal_eval(value)
437
+ except (SyntaxError, ValueError):
438
+ return None
439
+ return literal if isinstance(literal, str) else None
440
+
441
+
442
+ def _lookup_annotation_name(host: Any, method: Callable, name: str) -> Any:
443
+ if not name.isidentifier():
444
+ return _UNRESOLVED
445
+
446
+ localns = _annotation_localns(host)
447
+ if name in localns:
448
+ return localns[name]
449
+
450
+ return _annotation_globalns(method).get(name, _UNRESOLVED)
451
+
452
+
453
+ def _annotation_globalns(method: Callable) -> dict[str, Any]:
454
+ function = getattr(method, "__func__", method)
455
+ return getattr(function, "__globals__", {})
456
+
457
+
458
+ def _annotation_localns(host: Any) -> dict[str, Any]:
459
+ namespace: dict[str, Any] = {}
460
+ for klass in reversed(type(host).__mro__):
461
+ namespace.update(vars(klass))
462
+ return namespace
379
463
 
380
464
 
381
465
  def _is_dispatch_message_class(klass: type) -> bool:
@@ -34,6 +34,7 @@ from .types import (
34
34
  PersistentMessageRegistration,
35
35
  ProductionDiff,
36
36
  ProductionGraph,
37
+ TargetSetting,
37
38
  TargetSettingRef,
38
39
  _edge_identity,
39
40
  )
@@ -1055,6 +1056,35 @@ class Production(_DeclarativeProductionMixin):
1055
1056
  )
1056
1057
  self._items.append(ref)
1057
1058
  self._items_by_name[ref.name] = ref
1059
+ self._apply_target_defaults()
1060
+
1061
+ def _apply_target_defaults(self) -> None:
1062
+ for ref in self._items:
1063
+ for setting_name, target_name in self._target_default_routes(ref):
1064
+ if setting_name not in ref.host_settings:
1065
+ if setting_name in ref.target_setting_names:
1066
+ continue
1067
+ ref.host_settings[setting_name] = target_name
1068
+ ref.target_setting_names.add(setting_name)
1069
+ if str(ref.host_settings[setting_name]) != target_name:
1070
+ continue
1071
+ if target_name not in self._items_by_name:
1072
+ continue
1073
+ self._register_connection(
1074
+ ref.name,
1075
+ setting_name,
1076
+ target_name,
1077
+ )
1078
+
1079
+ def _target_default_routes(self, ref: ComponentRef) -> tuple[tuple[str, str], ...]:
1080
+ if ref.component_class is None:
1081
+ return ()
1082
+ routes: list[tuple[str, str]] = []
1083
+ for setting_name, descriptor in _target_settings(ref.component_class):
1084
+ target_name = _target_default_name(descriptor.default)
1085
+ if target_name:
1086
+ routes.append((setting_name, target_name))
1087
+ return tuple(routes)
1058
1088
 
1059
1089
  def _diff_current(
1060
1090
  self,
@@ -1141,3 +1171,21 @@ def _connection_mode(mode: str) -> str:
1141
1171
  "Unsupported connection mode: "
1142
1172
  f"{mode!r}. Expected 'replace', 'add', or 'remove'."
1143
1173
  )
1174
+
1175
+
1176
+ def _target_settings(
1177
+ component_class: type,
1178
+ ) -> tuple[tuple[str, TargetSetting], ...]:
1179
+ descriptors: dict[str, TargetSetting] = {}
1180
+ for base in reversed(component_class.__mro__):
1181
+ for name, value in base.__dict__.items():
1182
+ if isinstance(value, TargetSetting):
1183
+ descriptors[name] = value
1184
+ return tuple(descriptors.items())
1185
+
1186
+
1187
+ def _target_default_name(value: Any) -> str:
1188
+ if value is None:
1189
+ return ""
1190
+ name = getattr(value, "name", value)
1191
+ return str(name).strip()
@@ -12,11 +12,11 @@ from ..components.settings import Category, Setting, controls
12
12
  class TargetSetting(Setting):
13
13
  """Production target setting descriptor created by target()."""
14
14
 
15
- def __init__(self, **kwargs: Any):
15
+ def __init__(self, default: Any = "", **kwargs: Any):
16
16
  kwargs.setdefault("iris_type", "Ens.DataType.ConfigName")
17
17
  kwargs.setdefault("category", Category.BASIC)
18
18
  kwargs.setdefault("control", controls.production_item())
19
- super().__init__("", **kwargs)
19
+ super().__init__(default, **kwargs)
20
20
 
21
21
  @overload
22
22
  def __get__(self, instance: None, owner: type | None = None) -> TargetSetting: ...
@@ -34,13 +34,16 @@ class TargetSetting(Setting):
34
34
  return super().__get__(instance, owner)
35
35
 
36
36
 
37
- def target(**kwargs: Any) -> TargetSetting:
37
+ def target(default: Any = "", **kwargs: Any) -> TargetSetting:
38
38
  """Purpose:
39
39
  Declare a configurable outbound target setting on a component class.
40
40
 
41
41
  Use when:
42
42
  A service or process sends messages to another production component.
43
43
 
44
+ Pass a target item name as the first argument when the route should have
45
+ a default target even without an explicit Production.connect(...) call.
46
+
44
47
  Lifecycle:
45
48
  The descriptor becomes an IRIS production setting. Production.connect(...)
46
49
  binds it to a concrete target component.
@@ -59,11 +62,14 @@ def target(**kwargs: Any) -> TargetSetting:
59
62
 
60
63
  prod.connect(router.Output, operation)
61
64
 
65
+ class DefaultRouter(BusinessProcess):
66
+ Output = target("DefaultOperation")
67
+
62
68
  Related:
63
69
  docs/cookbooks/production-settings-and-targets.md,
64
70
  docs/production-graph.md
65
71
  """
66
- return TargetSetting(**kwargs)
72
+ return TargetSetting(default, **kwargs)
67
73
 
68
74
 
69
75
  @dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 4.0.1b3
3
+ Version: 4.0.1b5
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License