opensysml 0.12.2.dev20261111__tar.gz → 0.12.2.dev20261117__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 (134) hide show
  1. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/PKG-INFO +1 -1
  2. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/__init__.py +7 -1
  3. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/_version.py +1 -1
  4. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/capabilities.py +21 -0
  5. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/connection.py +102 -18
  6. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/document.py +3 -0
  7. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/generate.py +5 -2
  8. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/metamodel/_generated.py +4 -4
  9. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/model.py +87 -22
  10. opensysml-0.12.2.dev20261117/opensysml/proto/sysml_pb2.py +523 -0
  11. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/proto/sysml_pb2.pyi +59 -18
  12. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/release-digests.json +6 -6
  13. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/symbol.py +55 -10
  14. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/typefacts.py +9 -2
  15. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/values.py +15 -5
  16. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml.egg-info/PKG-INFO +1 -1
  17. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml.egg-info/SOURCES.txt +2 -0
  18. opensysml-0.12.2.dev20261117/tests/test_annotating_metadata.py +128 -0
  19. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_connection.py +63 -0
  20. opensysml-0.12.2.dev20261117/tests/test_connector_ends.py +77 -0
  21. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_conversion.py +32 -0
  22. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_document.py +105 -0
  23. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_element_properties.py +51 -15
  24. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_instance.py +2 -1
  25. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_integration.py +18 -0
  26. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_model.py +15 -13
  27. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_quantity.py +31 -0
  28. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_strict_and_lookup.py +3 -2
  29. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_symbol.py +46 -11
  30. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_unnamed_children.py +92 -2
  31. opensysml-0.12.2.dev20261111/opensysml/proto/sysml_pb2.py +0 -521
  32. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/README.md +0 -0
  33. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/_dist.py +0 -0
  34. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/action_run.py +0 -0
  35. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/binary.py +0 -0
  36. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/check.py +0 -0
  37. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/conversion.py +0 -0
  38. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/diagnostic.py +0 -0
  39. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/edit.py +0 -0
  40. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/element_properties.py +0 -0
  41. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/engines.py +0 -0
  42. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/enumeration.py +0 -0
  43. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/errors.py +0 -0
  44. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/exploration.py +0 -0
  45. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/fmi_runner.py +0 -0
  46. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/importcompare.py +0 -0
  47. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/instance.py +0 -0
  48. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/metamodel/__init__.py +0 -0
  49. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/metamodel/_reader.py +0 -0
  50. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/metamodel/_runtime.py +0 -0
  51. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/proto/__init__.py +0 -0
  52. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/proto/sysml_pb2_grpc.py +0 -0
  53. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/py.typed +0 -0
  54. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/query.py +0 -0
  55. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/runs.py +0 -0
  56. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/signing.py +0 -0
  57. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/sources.py +0 -0
  58. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/typed.py +0 -0
  59. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml/verdict.py +0 -0
  60. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml.egg-info/dependency_links.txt +0 -0
  61. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml.egg-info/entry_points.txt +0 -0
  62. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml.egg-info/requires.txt +0 -0
  63. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/opensysml.egg-info/top_level.txt +0 -0
  64. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/pyproject.toml +0 -0
  65. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/setup.cfg +0 -0
  66. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_analysis_integration.py +0 -0
  67. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_api.py +0 -0
  68. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_api_reference.py +0 -0
  69. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_auth.py +0 -0
  70. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_big_integer.py +0 -0
  71. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_binary.py +0 -0
  72. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_capabilities.py +0 -0
  73. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_check.py +0 -0
  74. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_check_version.py +0 -0
  75. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_complex.py +0 -0
  76. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_diagnostic.py +0 -0
  77. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_edit.py +0 -0
  78. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_engines.py +0 -0
  79. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_enumeration.py +0 -0
  80. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_errors.py +0 -0
  81. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_evaluate_subject.py +0 -0
  82. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_explore.py +0 -0
  83. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_feature_values.py +0 -0
  84. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_feature_values_capability.py +0 -0
  85. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_fmi_runner.py +0 -0
  86. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_function.py +0 -0
  87. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_generate.py +0 -0
  88. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_generate_golden.py +0 -0
  89. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_generate_sources.py +0 -0
  90. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_import_compare.py +0 -0
  91. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_infinity.py +0 -0
  92. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_legacy_pysysml_placeholder.py +0 -0
  93. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_lifecycle.py +0 -0
  94. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_measurement_ref.py +0 -0
  95. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_metamodel.py +0 -0
  96. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_metamodel_reader.py +0 -0
  97. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_metamodel_toolkit.py +0 -0
  98. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_metamodel_typing.py +0 -0
  99. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_metaobject.py +0 -0
  100. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_metaobject_identity.py +0 -0
  101. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_migration.py +0 -0
  102. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_model_surface_integration.py +0 -0
  103. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_parse_sources.py +0 -0
  104. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_parser_warnings.py +0 -0
  105. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_performed_action_pin_shape.py +0 -0
  106. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_performed_action_unbound_input.py +0 -0
  107. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_performer.py +0 -0
  108. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_pin_release_checksums.py +0 -0
  109. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_query.py +0 -0
  110. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_rational.py +0 -0
  111. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_refresh_diagnostics.py +0 -0
  112. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_response_compression.py +0 -0
  113. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_runs.py +0 -0
  114. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_runtime.py +0 -0
  115. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_runtime_integration.py +0 -0
  116. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_schedule.py +0 -0
  117. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_set_tensor.py +0 -0
  118. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_signing.py +0 -0
  119. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_snapshot_version.py +0 -0
  120. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_stale_service.py +0 -0
  121. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_strict_conformance.py +0 -0
  122. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_structured.py +0 -0
  123. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_sweep_integration.py +0 -0
  124. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_target.py +0 -0
  125. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_tool_dry_run.py +0 -0
  126. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_typed.py +0 -0
  127. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_undetermined.py +0 -0
  128. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_unset.py +0 -0
  129. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_variation_metadata.py +0 -0
  130. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_verification.py +0 -0
  131. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_verification_arguments.py +0 -0
  132. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_verification_questions.py +0 -0
  133. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_version.py +0 -0
  134. {opensysml-0.12.2.dev20261111 → opensysml-0.12.2.dev20261117}/tests/test_wire_compat.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensysml
3
- Version: 0.12.2.dev20261111
3
+ Version: 0.12.2.dev20261117
4
4
  Summary: Python client library for OpenSysML, a SysML v2 parser and execution runtime
5
5
  Author: Open-MBEE
6
6
  License-Expression: Apache-2.0
@@ -366,7 +366,8 @@ def connect(host='localhost', port=None, auto_start=True, version=None,
366
366
  def convert(to_format, file_path=None, content=None, model_hash=None,
367
367
  from_format='', tolerate_syntax_errors=False, host='localhost',
368
368
  port=None, id_form='', include_library_stubs=False, compact=False,
369
- omit_derived=False, keep_derived=(), include_check_diagnostics=False):
369
+ omit_derived=False, keep_derived=(), include_check_diagnostics=False,
370
+ inherited_members=False):
370
371
  """Write a model out in another format (module-level convenience).
371
372
 
372
373
  Args:
@@ -394,6 +395,10 @@ def convert(to_format, file_path=None, content=None, model_hash=None,
394
395
  library stubs written before 0.11.0; by default library elements
395
396
  remain bare references, not roots. Needs the
396
397
  ``convert_library_stubs`` capability
398
+ inherited_members (bool): For api-json, also write the derived lists
399
+ that repeat each Namespace's and Type's inherited and imported
400
+ members; by default an element carries its owned structure. Needs
401
+ the ``convert_inherited_members`` capability
397
402
  compact (bool): For notation converted to api-json, write the compact
398
403
  document (``api-json-compact/1``) in place of the element array.
399
404
  Needs the ``convert_compact`` capability
@@ -441,6 +446,7 @@ def convert(to_format, file_path=None, content=None, model_hash=None,
441
446
  tolerate_syntax_errors=tolerate_syntax_errors,
442
447
  id_form=id_form,
443
448
  include_library_stubs=include_library_stubs,
449
+ inherited_members=inherited_members,
444
450
  compact=compact,
445
451
  omit_derived=omit_derived,
446
452
  keep_derived=keep_derived,
@@ -6,4 +6,4 @@ neither is a second copy that can drift. `scripts/check_version.py` compares
6
6
  this value with the release tag before anything is uploaded.
7
7
  """
8
8
 
9
- VERSION = "0.12.2.dev20261111"
9
+ VERSION = "0.12.2.dev20261117"
@@ -80,6 +80,10 @@ CAPABILITY_RENDER_DOCUMENT = "render_document"
80
80
  #: The ``RenderView`` RPC, which returns typed diagram data.
81
81
  CAPABILITY_RENDER_VIEW = "render_view"
82
82
 
83
+ #: ``RenderViewRequest.form`` and its writer options, answered in
84
+ #: ``RenderViewResponse.text``. Without it the service drops them unanswered.
85
+ CAPABILITY_RENDER_VIEW_FORM = "render_view_form"
86
+
83
87
  #: The ``ExportGraphs`` RPC, which exports the lowered graph of an action or
84
88
  #: state machine as the canonical ``graphs:1`` JSON an external engine is sent.
85
89
  CAPABILITY_EXPORT_GRAPHS = "export_graphs"
@@ -115,6 +119,19 @@ CAPABILITY_SYMBOL_ATTRIBUTES = "symbol_attributes"
115
119
  #: Without it only ``child_ids``, the owned members, is reported.
116
120
  CAPABILITY_SYMBOL_MEMBERS = "symbol_members"
117
121
 
122
+ #: ``GetSymbolRequest.resolve_name`` honoured: a qualified name resolved from the
123
+ #: root namespace through imports, aliases and visibility. Without it the service
124
+ #: reads every id as one it reported, so the name of a declaration is all it finds.
125
+ CAPABILITY_SYMBOL_NAME_RESOLUTION = "symbol_name_resolution"
126
+
127
+ #: Populated ``SymbolInfo.annotating_metadata_ids``, the metadata usages
128
+ #: annotating a symbol; without it an annotated element reports none.
129
+ CAPABILITY_SYMBOL_ANNOTATING_METADATA = "symbol_annotating_metadata"
130
+
131
+ #: ``lookup`` on GetSymbol and GetElementProperties is honoured: a name read only as a name, an id
132
+ #: only as an id. Without it one string is read name first, so a name can shadow a generated id.
133
+ CAPABILITY_SYMBOL_LOOKUP_KIND = "symbol_lookup_kind"
134
+
118
135
  #: The ``GetElementProperties`` RPC: the metamodel properties of one element by
119
136
  #: their specification names, as the model's API element form spells them.
120
137
  #: Without it the service refuses the call with ``UNIMPLEMENTED``.
@@ -329,6 +346,10 @@ CAPABILITY_CONVERT_LIBRARY_REFERENCES = "convert_library_references"
329
346
  #: of releases before 0.11.0 restored.
330
347
  CAPABILITY_CONVERT_LIBRARY_STUBS = "convert_library_stubs"
331
348
 
349
+ #: ``ConvertRequest.inherited_members``: api-json written with the derived lists that repeat each
350
+ #: Namespace's and Type's inherited and imported members; a service without it always writes them.
351
+ CAPABILITY_CONVERT_INHERITED_MEMBERS = "convert_inherited_members"
352
+
332
353
  #: ``ParseSourcesRequest.base_model_hash`` and ``ParseSourcesResponse.affected``: the documents
333
354
  #: whose results may differ from the base model's, so a client re-reads only those after an edit.
334
355
  CAPABILITY_PARSE_SOURCES_AFFECTED = "parse_sources_affected"
@@ -20,12 +20,15 @@ from opensysml.capabilities import (
20
20
  CAPABILITY_INLINE_DOCUMENT_QUERY,
21
21
  CAPABILITY_CONVERT_CHECK_DIAGNOSTICS,
22
22
  CAPABILITY_CONVERT_COMPACT,
23
+ CAPABILITY_CONVERT_INHERITED_MEMBERS,
23
24
  CAPABILITY_CONVERT_LIBRARY_STUBS,
24
25
  CAPABILITY_OSLC_QUERY,
25
26
  CAPABILITY_APPLY_EDITS,
26
27
  CAPABILITY_AUTHORING,
27
28
  CAPABILITY_CONNECTION_AUTHORING,
28
29
  CAPABILITY_MEMBER_MODIFIERS,
30
+ CAPABILITY_SYMBOL_LOOKUP_KIND,
31
+ CAPABILITY_SYMBOL_NAME_RESOLUTION,
29
32
  CAPABILITY_CONSTRAINT_BODY_AUTHORING,
30
33
  CAPABILITY_STATE_ACTION_AUTHORING,
31
34
  CAPABILITY_REQUIREMENT_CONSTRAINT_AUTHORING,
@@ -70,6 +73,7 @@ from opensysml.capabilities import (
70
73
  CAPABILITY_RENDER_DOCUMENT_HTML,
71
74
  CAPABILITY_RENDER_DOCUMENT_ASCIIDOC,
72
75
  CAPABILITY_RENDER_VIEW,
76
+ CAPABILITY_RENDER_VIEW_FORM,
73
77
  CAPABILITY_CHECK,
74
78
  CAPABILITY_EXPORT_GRAPHS,
75
79
  CAPABILITY_SCHEDULE,
@@ -1578,7 +1582,8 @@ class Connection:
1578
1582
  def convert(self, to_format, file_path=None, content=None, model_hash=None,
1579
1583
  from_format='', tolerate_syntax_errors=False, id_form='',
1580
1584
  include_library_stubs=False, compact=False, omit_derived=False,
1581
- keep_derived=(), include_check_diagnostics=False):
1585
+ keep_derived=(), include_check_diagnostics=False,
1586
+ inherited_members=False):
1582
1587
  """Write a model out in another of the formats OpenSysML writes.
1583
1588
 
1584
1589
  The source is a loaded model, named by its hash, or one named the way
@@ -1611,6 +1616,12 @@ class Connection:
1611
1616
  library stubs written before 0.11.0; by default library
1612
1617
  elements remain bare references, not roots. Needs the
1613
1618
  ``convert_library_stubs`` capability.
1619
+ inherited_members (bool): For api-json, also write on every
1620
+ Namespace and Type the derived lists that repeat its inherited
1621
+ and imported members (``membership``, ``member``,
1622
+ ``inheritedMembership``, ``featureMembership``, ``feature``,
1623
+ ``inheritedFeature``); by default an element carries its owned
1624
+ structure. Needs the ``convert_inherited_members`` capability.
1614
1625
  compact (bool): For notation converted to api-json, write the
1615
1626
  compact document (``api-json-compact/1``) in place of the
1616
1627
  element array. Needs the ``convert_compact`` capability.
@@ -1687,6 +1698,12 @@ class Connection:
1687
1698
  CAPABILITY_CONVERT_LIBRARY_STUBS,
1688
1699
  upgrade_remedy(CAPABILITY_CONVERT_LIBRARY_STUBS),
1689
1700
  )
1701
+ if inherited_members:
1702
+ require(
1703
+ self.server_info(),
1704
+ CAPABILITY_CONVERT_INHERITED_MEMBERS,
1705
+ upgrade_remedy(CAPABILITY_CONVERT_INHERITED_MEMBERS),
1706
+ )
1690
1707
  keep_derived = list(keep_derived)
1691
1708
  if compact or omit_derived or keep_derived:
1692
1709
  require(
@@ -1707,6 +1724,7 @@ class Connection:
1707
1724
  tolerate_syntax_errors=tolerate_syntax_errors,
1708
1725
  id_form=id_form,
1709
1726
  include_library_stubs=include_library_stubs,
1727
+ inherited_members=inherited_members,
1710
1728
  compact=compact,
1711
1729
  omit_derived=omit_derived,
1712
1730
  keep_derived=keep_derived,
@@ -1996,7 +2014,7 @@ class Connection:
1996
2014
  response = self._stub.Query(request)
1997
2015
  return elements_of(response)
1998
2016
 
1999
- def get_element_properties(self, model_hash, element, properties=()):
2017
+ def get_element_properties(self, model_hash, element=None, properties=(), *, name=None, id=None):
2000
2018
  """Read the metamodel properties of one element by their specification names.
2001
2019
 
2002
2020
  See :mod:`opensysml.element_properties`. The answer is what the model's
@@ -2005,8 +2023,15 @@ class Connection:
2005
2023
 
2006
2024
  Args:
2007
2025
  model_hash (str): Hash of the loaded model
2008
- element (str): The element: its qualified name, the positional id of
2009
- an unnamed member (``Owner::@2``), or the element form's ``@id``
2026
+ element (str, optional): Legacy form, one string for either kind:
2027
+ read as the element form's ``@id`` first, then as a qualified
2028
+ name, then as the positional id of an unnamed member. A name
2029
+ declared like a generated id is shadowed by that id's element
2030
+ name (str, optional): The element's qualified name, never read as an id
2031
+ id (str, optional): The element form's ``@id`` or an id ``get_symbol``
2032
+ reports (``Symbol.id``, a child's, a member's), never read as a
2033
+ name. A service without ``symbol_lookup_kind`` is sent ``name``
2034
+ or ``id`` in the legacy form
2010
2035
  properties (Sequence[str], optional): Specification names to read
2011
2036
  (``"inheritedFeature"``, ``"connectorEnd"``); empty reads every
2012
2037
  property the element form carries for the element
@@ -2020,22 +2045,26 @@ class Connection:
2020
2045
  ConversionError: If the model has no element form, because a
2021
2046
  document of it could not be read whole
2022
2047
  ModelNotFoundError: If the model is no longer cached
2048
+ ValueError: Unless exactly one of ``element``, ``name`` and ``id`` is given
2023
2049
  """
2050
+ asked = _one_lookup("element", element, name, id)
2024
2051
  require(
2025
2052
  self.server_info(),
2026
2053
  CAPABILITY_ELEMENT_PROPERTIES,
2027
2054
  upgrade_remedy(CAPABILITY_ELEMENT_PROPERTIES),
2028
2055
  )
2029
2056
  request = sysml_pb2.GetElementPropertiesRequest(
2030
- model_hash=model_hash, element_id=element, properties=list(properties)
2057
+ model_hash=model_hash, element_id=asked, properties=list(properties)
2031
2058
  )
2059
+ if element is None and self.server_info().has(CAPABILITY_SYMBOL_LOOKUP_KIND):
2060
+ request.lookup = _lookup_kind(name)
2032
2061
  with translate_rpc_errors(
2033
2062
  unimplemented=self._capability_refusal((CAPABILITY_ELEMENT_PROPERTIES,))
2034
2063
  ):
2035
2064
  response = self._stub.GetElementProperties(request)
2036
2065
  if response.error:
2037
2066
  if response.error.startswith("element not found"):
2038
- raise SymbolNotFoundError(element)
2067
+ raise SymbolNotFoundError(asked)
2039
2068
  raise ConversionError(response.error)
2040
2069
  return element_properties_of(response)
2041
2070
 
@@ -2203,15 +2232,25 @@ class Connection:
2203
2232
  return [Diagnostic(d) for d in response.diagnostics]
2204
2233
 
2205
2234
  def render_view(self, model_hash, view_name, ports="minimal", show=None, depth=0,
2206
- compartments="positioned"):
2207
- """Render a named view with minimal or full ports, the optional notation elements named, above 0 a depth bound and the compartment folding named."""
2235
+ compartments="positioned", form=None, palette=None, style=None,
2236
+ lines=None, direction=None, link=None, unplaced=None):
2237
+ """Render a named view with minimal or full ports, the optional notation elements named, above 0 a depth bound and the compartment folding named; ``form`` also writes it as text with the writer options named."""
2208
2238
  if ports not in ("minimal", "full"):
2209
2239
  raise ValueError("ports must be 'minimal' or 'full'")
2210
2240
  if compartments not in ("positioned", "most", "ports"):
2211
2241
  raise ValueError("compartments must be 'positioned', 'most' or 'ports'")
2212
2242
  if not isinstance(depth, int) or isinstance(depth, bool) or depth < 0:
2213
2243
  raise ValueError("depth must be a non-negative integer")
2214
- require(self.server_info(), CAPABILITY_RENDER_VIEW, upgrade_remedy(CAPABILITY_RENDER_VIEW))
2244
+ written = {
2245
+ "form": form, "palette": palette, "style": style, "lines": lines,
2246
+ "direction": direction, "link": link, "unplaced": unplaced,
2247
+ }
2248
+ written = {name: value for name, value in written.items() if value}
2249
+ capabilities = [CAPABILITY_RENDER_VIEW]
2250
+ if written:
2251
+ capabilities.append(CAPABILITY_RENDER_VIEW_FORM)
2252
+ for capability in capabilities:
2253
+ require(self.server_info(), capability, upgrade_remedy(capability))
2215
2254
  request = sysml_pb2.RenderViewRequest(
2216
2255
  model_hash=model_hash,
2217
2256
  view=view_name,
@@ -2219,12 +2258,13 @@ class Connection:
2219
2258
  show=list(show or ()),
2220
2259
  depth=depth,
2221
2260
  compartments="" if compartments == "positioned" else compartments,
2261
+ **written,
2222
2262
  )
2223
2263
  with translate_rpc_errors(
2224
2264
  not_found=lambda message, code: ViewNotFoundError(
2225
2265
  view_name, message, code=code
2226
2266
  ),
2227
- unimplemented=self._capability_refusal((CAPABILITY_RENDER_VIEW,)),
2267
+ unimplemented=self._capability_refusal(tuple(capabilities)),
2228
2268
  ):
2229
2269
  response = self._stub.RenderView(request)
2230
2270
  return render_view_result(response)
@@ -2376,24 +2416,53 @@ class Connection:
2376
2416
  response, lambda rows, instances: [self._sweep_row(row, instances, diagnostics) for row in rows],
2377
2417
  )
2378
2418
 
2379
- def get_symbol(self, model_hash, symbol_id, include_library_members=False):
2380
- """Fetch symbol by ID from cached model.
2381
-
2419
+ def get_symbol(
2420
+ self, model_hash, symbol_id=None, include_library_members=False, resolve_name=False, *, name=None, id=None,
2421
+ ):
2422
+ """Fetch a symbol of a cached model by qualified name or by element id.
2423
+
2424
+ Say which the string is: ``get_symbol(h, name="Demo::Vehicle")`` or
2425
+ ``get_symbol(h, id=child_id)``. The two share spellings — a package may
2426
+ be declared ``Col__V__c_pend0``, the id generated for an unnamed
2427
+ connector end, and a member ``'@3'`` beside the unnamed member listed as
2428
+ ``Owner::@3`` — and only the kind tells them apart.
2429
+
2382
2430
  Args:
2383
2431
  model_hash (str): Model content hash
2384
- symbol_id (str): Fully-qualified symbol ID
2432
+ symbol_id (str, optional): Legacy form, one string for either kind:
2433
+ read as a qualified name first, then as an id, so a declaration
2434
+ shadows the element an id of the same spelling was reported for
2385
2435
  include_library_members (bool): List the members inherited from
2386
2436
  standard-library content in ``members`` instead of counting
2387
2437
  them in ``withheld_library_members``
2388
-
2438
+ resolve_name (bool): With ``symbol_id`` only: resolve it from the
2439
+ root namespace the way ``name`` is, before reading it as an id
2440
+ name (str, optional): A qualified name, resolved from the root
2441
+ namespace the way the notation resolves one: through imports,
2442
+ an alias answered by the element it names, and no symbol where
2443
+ a member on the way is not visible from outside its namespace.
2444
+ Never read as an id
2445
+ id (str, optional): An id the service reported (``Symbol.id``, a
2446
+ child's, a member's, an element reference's), naming that
2447
+ element whatever its visibility. Never read as a name. A
2448
+ service without ``symbol_lookup_kind`` is sent ``name`` or
2449
+ ``id`` in the legacy form, and reads it name first
2450
+
2389
2451
  Returns:
2390
2452
  sysml_pb2.SymbolInfo or None: Symbol protobuf, or None if not found
2453
+
2454
+ Raises:
2455
+ ValueError: Unless exactly one of ``symbol_id``, ``name`` and ``id`` is given
2391
2456
  """
2457
+ asked = _one_lookup("symbol_id", symbol_id, name, id)
2392
2458
  request = sysml_pb2.GetSymbolRequest(
2393
- model_hash=model_hash,
2394
- symbol_id=symbol_id,
2395
- include_library_members=include_library_members,
2459
+ model_hash=model_hash, symbol_id=asked, include_library_members=include_library_members,
2396
2460
  )
2461
+ if symbol_id is None and self.server_info().has(CAPABILITY_SYMBOL_LOOKUP_KIND):
2462
+ request.lookup = _lookup_kind(name)
2463
+ # The legacy form of the lookup, which a service with the capability ignores under a kind.
2464
+ if resolve_name or name is not None:
2465
+ request.resolve_name = self.server_info().has(CAPABILITY_SYMBOL_NAME_RESOLUTION)
2397
2466
  with translate_rpc_errors():
2398
2467
  response = self._stub.GetSymbol(request)
2399
2468
 
@@ -4106,3 +4175,18 @@ class Connection:
4106
4175
  if _private_services.get(service.key) is service:
4107
4176
  del _private_services[service.key]
4108
4177
  service.stop()
4178
+
4179
+
4180
+ def _lookup_kind(name):
4181
+ """The ``LookupKind`` of a lookup by ``name``, or else by id."""
4182
+ if name is not None:
4183
+ return sysml_pb2.LOOKUP_KIND_QUALIFIED_NAME
4184
+ return sysml_pb2.LOOKUP_KIND_ELEMENT_ID
4185
+
4186
+
4187
+ def _one_lookup(legacy, single, name, id):
4188
+ """The one string a lookup names its element by, of the legacy form or a stated kind."""
4189
+ given = [value for value in (single, name, id) if value is not None]
4190
+ if len(given) != 1:
4191
+ raise ValueError(f"give exactly one of {legacy}, name and id")
4192
+ return given[0]
@@ -379,6 +379,8 @@ class RenderedView:
379
379
  notices: tuple
380
380
  shown: tuple
381
381
  frame: Optional[RenderFrame] = None
382
+ #: The rendering written in the form asked for; empty when none was.
383
+ text: str = ""
382
384
 
383
385
 
384
386
  def _render_span(span):
@@ -447,6 +449,7 @@ def render_view_result(response):
447
449
  return RenderedView(
448
450
  response.view, response.kind, response.stated, nodes, edges, tuple(response.columns),
449
451
  rows, canvas, notes, tuple(response.notices), tuple(response.shown), frame,
452
+ response.text,
450
453
  )
451
454
  #: What a binding value or an answered cell value may be.
452
455
  DocumentValue = Union[
@@ -260,7 +260,9 @@ def _names_a_type(type_facts: Optional[TypeFacts]) -> bool:
260
260
  def _derived_type(type_facts: TypeFacts) -> TypeFacts:
261
261
  """Resolve the type to the most specific of the service's derived types."""
262
262
  derived = type_facts.types[0]
263
- return replace(type_facts, resolved_id=derived.id, resolved_kind=derived.kind)
263
+ return replace(
264
+ type_facts, resolved_id=derived.id, resolved_qualified_name=derived.id, resolved_kind=derived.kind
265
+ )
264
266
 
265
267
 
266
268
  def _merged_type(own: Optional[TypeFacts], inherited: TypeFacts) -> TypeFacts:
@@ -271,6 +273,7 @@ def _merged_type(own: Optional[TypeFacts], inherited: TypeFacts) -> TypeFacts:
271
273
  own,
272
274
  declared=inherited.declared,
273
275
  resolved_id=inherited.resolved_id,
276
+ resolved_qualified_name=inherited.resolved_qualified_name,
274
277
  resolved_kind=inherited.resolved_kind,
275
278
  primitive=own.primitive or inherited.primitive,
276
279
  primitive_source=own.primitive_source or inherited.primitive_source,
@@ -367,7 +370,7 @@ def element_type(type_facts: Optional[TypeFacts], names: Dict[str, str]) -> Pyth
367
370
 
368
371
  if type_facts.resolved_id:
369
372
  return PythonType(
370
- "object", _OBJECT_DECODER, f"SysML type {type_facts.resolved_id} has no generated class"
373
+ "object", _OBJECT_DECODER, f"SysML type {type_facts.resolved_qualified_name or type_facts.resolved_id} has no generated class"
371
374
  )
372
375
 
373
376
  if type_facts.declared:
@@ -1,7 +1,7 @@
1
1
  # Code generated by tools/gen/pymetamodel. DO NOT EDIT.
2
2
  # Metamodel: 20250201
3
- # Pilot tag: 2026-09
4
- # Pilot commit: 38665073bbf02849bd309b106eba79cbb3a1ee1d
3
+ # Pilot tag: 2026-09.1
4
+ # Pilot commit: d81b2ad5016f2e2d3d4364b3d06d01d8bb12a896
5
5
  # Regenerate with: make python-metamodel
6
6
 
7
7
  from __future__ import annotations
@@ -14,8 +14,8 @@ from typing import ClassVar, Mapping
14
14
  from ._runtime import Many, Opt, _ElementBase # pyright: ignore[reportPrivateUsage]
15
15
 
16
16
  METAMODEL_VERSION = "20250201"
17
- SOURCE_TAG = "2026-09"
18
- SOURCE_COMMIT = "38665073bbf02849bd309b106eba79cbb3a1ee1d"
17
+ SOURCE_TAG = "2026-09.1"
18
+ SOURCE_COMMIT = "d81b2ad5016f2e2d3d4364b3d06d01d8bb12a896"
19
19
 
20
20
  class FeatureDirectionKind(str, Enum):
21
21
  IN = "in"
@@ -208,7 +208,8 @@ class Model:
208
208
 
209
209
  def convert(self, to_format, tolerate_syntax_errors=False, id_form='',
210
210
  include_library_stubs=False, compact=False, omit_derived=False,
211
- keep_derived=(), include_check_diagnostics=False):
211
+ keep_derived=(), include_check_diagnostics=False,
212
+ inherited_members=False):
212
213
  """Write this model out in one of the formats OpenSysML writes.
213
214
 
214
215
  Converts the source this model was parsed from, not the file as it
@@ -230,6 +231,10 @@ class Model:
230
231
  or :data:`~opensysml.conversion.ID_FORM_UUID`
231
232
  include_library_stubs (bool): For api-json, restore the ownerless
232
233
  library stubs written before 0.11.0
234
+ inherited_members (bool): For api-json, also write the derived
235
+ lists that repeat each Namespace's and Type's inherited and
236
+ imported members; by default an element carries its owned
237
+ structure. Needs the ``convert_inherited_members`` capability.
233
238
  compact (bool): For api-json, write the compact document
234
239
  (``api-json-compact/1``) in place of the element array. Needs
235
240
  the ``convert_compact`` capability.
@@ -270,6 +275,7 @@ class Model:
270
275
  tolerate_syntax_errors=tolerate_syntax_errors,
271
276
  id_form=id_form,
272
277
  include_library_stubs=include_library_stubs,
278
+ inherited_members=inherited_members,
273
279
  compact=compact,
274
280
  omit_derived=omit_derived,
275
281
  keep_derived=keep_derived,
@@ -398,7 +404,7 @@ class Model:
398
404
  """
399
405
  return Editor(self._hash, self.connection)
400
406
 
401
- def element_properties(self, element, *properties):
407
+ def element_properties(self, element=None, *properties, name=None, id=None):
402
408
  """Read the metamodel properties of one element by their specification names.
403
409
 
404
410
  The KerML 1.1 / SysML 2.1 abstract syntax of the element —
@@ -409,8 +415,12 @@ class Model:
409
415
  :mod:`opensysml.element_properties`.
410
416
 
411
417
  Args:
412
- element (str): The element: its qualified name, the positional id of
413
- an unnamed member (``Owner::@2``), or an element form id
418
+ element (str, optional): Legacy form, one string for either kind:
419
+ an element form id first, then a qualified name, then the
420
+ positional id of an unnamed member (``Owner::@2``); pass None
421
+ to give ``name`` or ``id`` with properties
422
+ name (str, optional): The element's qualified name, never read as an id
423
+ id (str, optional): An element form id or a symbol's id, never read as a name
414
424
  *properties (str): Specification names to read; none reads every
415
425
  property the element form carries for the element
416
426
 
@@ -430,7 +440,7 @@ class Model:
430
440
  >>> str(inherited[0])
431
441
  'Demo::Unit::p'
432
442
  """
433
- return self._client.get_element_properties(self._hash, element, properties)
443
+ return self._client.get_element_properties(self._hash, element, properties, name=name, id=id)
434
444
 
435
445
  def query(self, payload=None, scope=None, select=None, where=None, order_by=None,
436
446
  oslc=None):
@@ -558,8 +568,9 @@ class Model:
558
568
  return self.connection.render_document(self._hash, document_id, form=form)
559
569
 
560
570
  def render_view(self, view_name, ports="minimal", show=None, depth=0,
561
- compartments="positioned") -> RenderedView:
562
- """Render one named view as typed diagram data.
571
+ compartments="positioned", form=None, palette=None, style=None,
572
+ lines=None, direction=None, link=None, unplaced=None) -> RenderedView:
573
+ """Render one named view as typed diagram data, and in ``form`` as text.
563
574
 
564
575
  Args:
565
576
  view_name (str): Qualified view name or targeted pseudo-view
@@ -580,21 +591,49 @@ class Model:
580
591
  definition or package keeps a node, ``"ports"`` the port usages
581
592
  with the ports nested under them; a row is a node whose
582
593
  ``compartment`` names the compartment of its ``parent``
594
+ form (str | None): Form to write the rendering in besides its
595
+ data, into the result's ``text``, byte for byte what
596
+ ``sysml -render <view> -render-form <form>`` writes: ``"text"``,
597
+ ``"mermaid"``, ``"markdown"``, ``"dot"``, ``"plantuml"``,
598
+ ``"d2"``, ``"drawio"``, ``"csv"`` or ``"tsv"``; ``None`` (the
599
+ default) writes none
600
+ palette (str | None): Palette a graph form fills nodes from, as
601
+ ``-render-palette`` names them; ``None`` draws in black and white
602
+ style (str | None): Drawing style of the DOT or Mermaid form, as
603
+ ``-render-style`` names them: ``"pilot"`` (the default) or ``"cameo"``
604
+ lines (str | None): Edge routing of the DOT or PlantUML form, as
605
+ ``-render-lines`` names them: ``"splines"`` (the default),
606
+ ``"ortho"`` or ``"polyline"``
607
+ direction (str | None): Flow direction of a graph-shaped form:
608
+ ``"TB"``, ``"LR"``, ``"RL"`` or ``"BT"``; ``None`` leaves each
609
+ kind's default, which is what the CLI writes
610
+ link (str | None): Source link template each node and edge of the
611
+ form is written with, as ``-render-link`` takes it, with the
612
+ placeholders ``{file}``, ``{line}``, ``{col}``, ``{qname}`` and ``{id}``
613
+ unplaced (str | None): Where a graph form of a view some Layout
614
+ positions puts the nodes none does, as ``-render-unplaced``
615
+ names it: ``"omit"`` (the default) or ``"strip"``
583
616
 
584
617
  Returns:
585
- RenderedView: Ordered nodes, edges, table data and optional layout
618
+ RenderedView: Ordered nodes, edges, table data and optional layout,
619
+ and in ``text`` the written form when one was asked for
586
620
 
587
621
  Raises:
588
622
  ValueError: If ``ports`` is neither ``"minimal"`` nor ``"full"``, or
589
623
  ``compartments`` none of its three foldings
590
- MissingCapabilityError: If the service cannot render views
591
- InvalidRequestError: If the view is malformed or does not render
624
+ MissingCapabilityError: If the service cannot render views, or
625
+ cannot write a form when one or a writer option is asked for
626
+ InvalidRequestError: If the view is malformed or does not render,
627
+ ``form`` is none there is or one the view's kind is not written
628
+ in (``"dot"`` of a table), or a writer option names nothing
592
629
  ViewNotFoundError: If the view or pseudo-view target is missing;
593
630
  also a SymbolNotFoundError and KeyError
594
631
  ModelNotFoundError: If the service no longer holds this model
595
632
  """
596
633
  return self.connection.render_view(self._hash, view_name, ports=ports, show=show, depth=depth,
597
- compartments=compartments)
634
+ compartments=compartments, form=form, palette=palette,
635
+ style=style, lines=lines, direction=direction, link=link,
636
+ unplaced=unplaced)
598
637
 
599
638
 
600
639
  def check_action(self, action_symbol_id, inputs=None, performer=None, properties=(), diverge=(),
@@ -719,28 +758,54 @@ class Model:
719
758
  return self._symbol_by_id(name) or self._symbol_named(name)
720
759
  return self._symbol_named(name) or self._symbol_by_id(name)
721
760
 
722
- def get(self, fqn):
723
- """Get symbol by fully-qualified name (e.g., "Demo::Vehicle").
761
+ def get(self, fqn=None, *, name=None, id=None):
762
+ """Get a symbol by qualified name or by id: ``get(name=...)`` or ``get(id=...)``.
763
+
764
+ A qualified name and an id can be spelled alike — a package may be
765
+ declared ``Col__V__c_pend0``, the id generated for an unnamed connector
766
+ end, and a member ``'@3'`` beside the unnamed member ``Owner::@3`` — so
767
+ say which the string is.
768
+
769
+ A ``name`` is resolved from the root namespace the way the notation
770
+ resolves one: through imports, so a name a package re-exports answers
771
+ with the symbol it imports, an alias with the symbol it names, and a
772
+ member that is not visible from outside its namespace (``private``,
773
+ ``protected``) with None. The symbol returned may so carry another id.
774
+ An ``id`` is one the service reported (``Symbol.id``) and names that
775
+ symbol whatever its visibility.
724
776
 
725
777
  Args:
726
- fqn (str): Fully-qualified name to look up
778
+ fqn (str, optional): Legacy form, one string for either kind: read
779
+ as a qualified name first, then as an id, so a declaration
780
+ shadows the element an id of its spelling was reported for
781
+ name (str, optional): Qualified name to resolve, never read as an id
782
+ id (str, optional): Reported id to fetch, never read as a name
727
783
 
728
784
  Returns:
729
785
  Symbol or None: Matching symbol, or None if not found
786
+
787
+ Raises:
788
+ ValueError: Unless exactly one of ``fqn``, ``name`` and ``id`` is given
730
789
  """
731
- for root in self.roots:
732
- if root.id == fqn:
733
- return root
734
- return self._symbol_by_id(fqn)
790
+ if fqn is not None and name is None and id is None:
791
+ for root in self.roots:
792
+ if root.id == fqn:
793
+ return root
794
+ info = self._client.get_symbol(self._hash, fqn, resolve_name=True)
795
+ else:
796
+ info = self._client.get_symbol(self._hash, fqn, name=name, id=id)
797
+ if info is None:
798
+ return None
799
+ return Symbol(info, self._client, self._hash)
735
800
 
736
801
  def _symbol_by_id(self, fqn):
737
802
  """The symbol whose id is ``fqn``, fetched in one call, or None.
738
803
 
739
- The service resolves a qualified name the way the notation does, through
740
- imports and aliases, so it may answer with a symbol of another id. Only
741
- the symbol that carries this id is what an id lookup names.
804
+ A service without ``symbol_lookup_kind`` resolves an id no symbol was
805
+ reported under as a qualified name, so it may answer with a symbol of
806
+ another id. Only the symbol that carries this id is what an id lookup names.
742
807
  """
743
- info = self._client.get_symbol(self._hash, fqn)
808
+ info = self._client.get_symbol(self._hash, id=fqn)
744
809
  if info is None or info.id != fqn:
745
810
  return None
746
811
  return Symbol(info, self._client, self._hash)