linkml-map 0.5.2__tar.gz → 0.5.3__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 (504) hide show
  1. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/workflows/claude-issue-summarize.yml +1 -1
  2. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/workflows/claude-issue-triage.yml +1 -1
  3. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/workflows/claude.yml +2 -2
  4. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/workflows/codespell.yml +1 -1
  5. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/workflows/deploy_documentation.yml +7 -8
  6. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/workflows/dragon-ai.yml +16 -5
  7. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/workflows/main.yaml +17 -5
  8. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/workflows/pypi-publish.yaml +4 -4
  9. {linkml_map-0.5.2 → linkml_map-0.5.3}/.pre-commit-config.yaml +3 -2
  10. {linkml_map-0.5.2 → linkml_map-0.5.3}/AGENTS.md +5 -6
  11. {linkml_map-0.5.2 → linkml_map-0.5.3}/PKG-INFO +35 -11
  12. {linkml_map-0.5.2 → linkml_map-0.5.3}/README.md +29 -7
  13. linkml_map-0.5.3/docs/api/extensions.md +155 -0
  14. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/api/functions.md +7 -0
  15. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/examples/MetamodelMapping.ipynb +3 -75
  16. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/examples/Tutorial-SQLCompiler.ipynb +3 -47
  17. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/examples/Tutorial.ipynb +3 -47
  18. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/index.md +143 -37
  19. linkml_map-0.5.3/docs/schema/Agent.md +211 -0
  20. linkml_map-0.5.3/docs/schema/AggregationOperation.md +217 -0
  21. linkml_map-0.5.3/docs/schema/AggregationType.md +117 -0
  22. linkml_map-0.5.3/docs/schema/AliasedClass.md +208 -0
  23. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/Any.md +30 -7
  24. linkml_map-0.5.3/docs/schema/Boolean.md +61 -0
  25. linkml_map-0.5.3/docs/schema/ClassDerivation.md +592 -0
  26. linkml_map-0.5.3/docs/schema/ClassReference.md +51 -0
  27. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/CollectionType.md +18 -5
  28. linkml_map-0.5.3/docs/schema/CopyDirective.md +340 -0
  29. linkml_map-0.5.3/docs/schema/Curie.md +65 -0
  30. linkml_map-0.5.3/docs/schema/Date.md +62 -0
  31. linkml_map-0.5.3/docs/schema/DateOrDatetime.md +60 -0
  32. linkml_map-0.5.3/docs/schema/Datetime.md +61 -0
  33. linkml_map-0.5.3/docs/schema/Decimal.md +60 -0
  34. linkml_map-0.5.3/docs/schema/Double.md +60 -0
  35. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/ElementDerivation.md +211 -87
  36. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/EnumDerivation.md +191 -94
  37. linkml_map-0.5.3/docs/schema/EnumReference.md +51 -0
  38. linkml_map-0.5.3/docs/schema/Float.md +60 -0
  39. linkml_map-0.5.3/docs/schema/GroupingOperation.md +144 -0
  40. linkml_map-0.5.3/docs/schema/Integer.md +60 -0
  41. linkml_map-0.5.3/docs/schema/InvalidValueHandlingStrategy.md +75 -0
  42. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/Inverse.md +31 -21
  43. linkml_map-0.5.3/docs/schema/Jsonpath.md +60 -0
  44. linkml_map-0.5.3/docs/schema/Jsonpointer.md +60 -0
  45. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/KeyVal.md +55 -22
  46. linkml_map-0.5.3/docs/schema/Ncname.md +60 -0
  47. linkml_map-0.5.3/docs/schema/Nodeidentifier.md +60 -0
  48. linkml_map-0.5.3/docs/schema/ObjectDerivation.md +446 -0
  49. linkml_map-0.5.3/docs/schema/Objectidentifier.md +64 -0
  50. linkml_map-0.5.3/docs/schema/Offset.md +201 -0
  51. linkml_map-0.5.3/docs/schema/Organization.md +200 -0
  52. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/PermissibleValueDerivation.md +194 -89
  53. linkml_map-0.5.3/docs/schema/Person.md +200 -0
  54. linkml_map-0.5.3/docs/schema/PivotDirectionType.md +77 -0
  55. linkml_map-0.5.3/docs/schema/PivotOperation.md +358 -0
  56. linkml_map-0.5.3/docs/schema/PrefixDerivation.md +386 -0
  57. linkml_map-0.5.3/docs/schema/SchemaReference.md +214 -0
  58. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/SerializationSyntaxType.md +18 -5
  59. linkml_map-0.5.3/docs/schema/SlotDerivation.md +1021 -0
  60. linkml_map-0.5.3/docs/schema/SlotReference.md +51 -0
  61. linkml_map-0.5.3/docs/schema/Software.md +202 -0
  62. linkml_map-0.5.3/docs/schema/Sparqlpath.md +60 -0
  63. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/SpecificationComponent.md +31 -24
  64. linkml_map-0.5.3/docs/schema/String.md +60 -0
  65. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/StringificationConfiguration.md +59 -25
  66. linkml_map-0.5.3/docs/schema/Time.md +62 -0
  67. linkml_map-0.5.3/docs/schema/TransformationOperation.md +114 -0
  68. linkml_map-0.5.3/docs/schema/TransformationSpecification.md +733 -0
  69. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/UnitConversionConfiguration.md +96 -45
  70. linkml_map-0.5.3/docs/schema/Uri.md +65 -0
  71. linkml_map-0.5.3/docs/schema/Uriorcurie.md +60 -0
  72. linkml_map-0.5.3/docs/schema/add.md +104 -0
  73. linkml_map-0.5.3/docs/schema/affiliation.md +103 -0
  74. linkml_map-0.5.3/docs/schema/aggregation_operation.md +104 -0
  75. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/alias.md +41 -9
  76. linkml_map-0.5.3/docs/schema/author.md +107 -0
  77. linkml_map-0.5.3/docs/schema/cast_collection_as.md +104 -0
  78. linkml_map-0.5.3/docs/schema/class_derivations.md +83 -0
  79. linkml_map-0.5.3/docs/schema/class_name.md +102 -0
  80. linkml_map-0.5.3/docs/schema/class_named.md +102 -0
  81. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/comments.md +47 -14
  82. linkml_map-0.5.3/docs/schema/content_url.md +103 -0
  83. linkml_map-0.5.3/docs/schema/copy_all.md +103 -0
  84. linkml_map-0.5.3/docs/schema/copy_directives.md +87 -0
  85. linkml_map-0.5.3/docs/schema/creator.md +109 -0
  86. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/datamodel.md +83 -63
  87. linkml_map-0.5.3/docs/schema/delimiter.md +116 -0
  88. linkml_map-0.5.3/docs/schema/derived_from.md +109 -0
  89. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/description.md +46 -12
  90. linkml_map-0.5.3/docs/schema/dictionary_key.md +104 -0
  91. linkml_map-0.5.3/docs/schema/direction.md +105 -0
  92. linkml_map-0.5.3/docs/schema/documentation.md +103 -0
  93. linkml_map-0.5.3/docs/schema/element_name.md +107 -0
  94. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/enum_derivations.md +41 -10
  95. linkml_map-0.5.3/docs/schema/exclude.md +109 -0
  96. linkml_map-0.5.3/docs/schema/exclude_all.md +103 -0
  97. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/expr.md +32 -7
  98. linkml_map-0.5.3/docs/schema/expression_mappings.md +115 -0
  99. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/expression_to_expression_mappings.md +47 -13
  100. linkml_map-0.5.3/docs/schema/expression_to_value_mappings.md +115 -0
  101. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/hide.md +32 -7
  102. linkml_map-0.5.3/docs/schema/id.md +84 -0
  103. linkml_map-0.5.3/docs/schema/id_slots.md +105 -0
  104. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/implements.md +46 -14
  105. linkml_map-0.5.3/docs/schema/include.md +109 -0
  106. linkml_map-0.5.3/docs/schema/invalid_value_handling.md +104 -0
  107. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/inverse_of.md +40 -8
  108. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/is_a.md +50 -10
  109. linkml_map-0.5.3/docs/schema/join_on.md +103 -0
  110. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/joins.md +41 -10
  111. linkml_map-0.5.3/docs/schema/key.md +106 -0
  112. linkml_map-0.5.3/docs/schema/license.md +105 -0
  113. linkml_map-0.5.3/docs/schema/linkml-map.md +17 -0
  114. linkml_map-0.5.3/docs/schema/lookup_key.md +102 -0
  115. linkml_map-0.5.3/docs/schema/mapping_method.md +104 -0
  116. linkml_map-0.5.3/docs/schema/mirror_source.md +110 -0
  117. linkml_map-0.5.3/docs/schema/missing_values.md +107 -0
  118. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/mixins.md +51 -12
  119. linkml_map-0.5.3/docs/schema/name.md +96 -0
  120. linkml_map-0.5.3/docs/schema/none_if_non_numeric.md +105 -0
  121. linkml_map-0.5.3/docs/schema/null_handling.md +81 -0
  122. linkml_map-0.5.3/docs/schema/object_derivations.md +110 -0
  123. linkml_map-0.5.3/docs/schema/offset.md +106 -0
  124. linkml_map-0.5.3/docs/schema/offset_field.md +106 -0
  125. linkml_map-0.5.3/docs/schema/offset_reverse.md +104 -0
  126. linkml_map-0.5.3/docs/schema/offset_value.md +107 -0
  127. linkml_map-0.5.3/docs/schema/operator.md +105 -0
  128. linkml_map-0.5.3/docs/schema/orcid.md +103 -0
  129. linkml_map-0.5.3/docs/schema/over_slots.md +105 -0
  130. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/overrides.md +44 -11
  131. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/permissible_value_derivations.md +41 -10
  132. linkml_map-0.5.3/docs/schema/pivot_operation.md +81 -0
  133. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/populated_from.md +33 -8
  134. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/prefixes.md +42 -10
  135. linkml_map-0.5.3/docs/schema/publication_date.md +105 -0
  136. linkml_map-0.5.3/docs/schema/range.md +106 -0
  137. linkml_map-0.5.3/docs/schema/repository_url.md +103 -0
  138. linkml_map-0.5.3/docs/schema/reversed.md +104 -0
  139. linkml_map-0.5.3/docs/schema/reviewer.md +107 -0
  140. linkml_map-0.5.3/docs/schema/ror_id.md +103 -0
  141. linkml_map-0.5.3/docs/schema/schema_uri.md +103 -0
  142. linkml_map-0.5.3/docs/schema/slot_derivations.md +81 -0
  143. linkml_map-0.5.3/docs/schema/slot_name.md +103 -0
  144. linkml_map-0.5.3/docs/schema/slot_name_template.md +105 -0
  145. linkml_map-0.5.3/docs/schema/source_file.md +103 -0
  146. linkml_map-0.5.3/docs/schema/source_key.md +102 -0
  147. linkml_map-0.5.3/docs/schema/source_magnitude_slot.md +103 -0
  148. linkml_map-0.5.3/docs/schema/source_schema.md +104 -0
  149. linkml_map-0.5.3/docs/schema/source_schema_patches.md +105 -0
  150. linkml_map-0.5.3/docs/schema/source_slots.md +105 -0
  151. linkml_map-0.5.3/docs/schema/source_unit.md +103 -0
  152. linkml_map-0.5.3/docs/schema/source_unit_scheme.md +112 -0
  153. linkml_map-0.5.3/docs/schema/source_unit_slot.md +103 -0
  154. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/sources.md +33 -8
  155. linkml_map-0.5.3/docs/schema/stringification.md +103 -0
  156. linkml_map-0.5.3/docs/schema/syntax.md +115 -0
  157. linkml_map-0.5.3/docs/schema/target_definition.md +81 -0
  158. linkml_map-0.5.3/docs/schema/target_magnitude_slot.md +103 -0
  159. linkml_map-0.5.3/docs/schema/target_schema.md +104 -0
  160. linkml_map-0.5.3/docs/schema/target_unit.md +103 -0
  161. linkml_map-0.5.3/docs/schema/target_unit_scheme.md +112 -0
  162. linkml_map-0.5.3/docs/schema/target_unit_slot.md +102 -0
  163. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/title.md +41 -8
  164. linkml_map-0.5.3/docs/schema/type.md +108 -0
  165. linkml_map-0.5.3/docs/schema/type_designator.md +104 -0
  166. linkml_map-0.5.3/docs/schema/unit_conversion.md +104 -0
  167. linkml_map-0.5.3/docs/schema/unit_slot.md +103 -0
  168. linkml_map-0.5.3/docs/schema/unmelt_to_class.md +104 -0
  169. linkml_map-0.5.3/docs/schema/unmelt_to_slots.md +106 -0
  170. linkml_map-0.5.3/docs/schema/url.md +103 -0
  171. linkml_map-0.5.3/docs/schema/value.md +81 -0
  172. linkml_map-0.5.3/docs/schema/value_mappings.md +115 -0
  173. linkml_map-0.5.3/docs/schema/value_slot.md +113 -0
  174. linkml_map-0.5.3/docs/schema/variable_slot.md +113 -0
  175. linkml_map-0.5.3/docs/schema/version.md +83 -0
  176. {linkml_map-0.5.2 → linkml_map-0.5.3}/mkdocs.yml +1 -0
  177. {linkml_map-0.5.2 → linkml_map-0.5.3}/pyproject.toml +5 -3
  178. linkml_map-0.5.3/src/linkml_map/cli/cli.py +923 -0
  179. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/compiler.py +6 -3
  180. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/graphviz_compiler.py +2 -0
  181. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/python_compiler.py +2 -6
  182. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/sql_compiler.py +4 -2
  183. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/templates/markdown.j2 +2 -2
  184. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/datamodel/transformer_model.py +234 -116
  185. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/datamodel/transformer_model.yaml +240 -15
  186. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/inference/inference.py +16 -10
  187. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/inference/inverter.py +15 -2
  188. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/inference/schema_mapper.py +15 -14
  189. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/loaders/data_loaders.py +80 -0
  190. linkml_map-0.5.3/src/linkml_map/transformer/engine.py +164 -0
  191. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/transformer/errors.py +12 -0
  192. linkml_map-0.5.3/src/linkml_map/transformer/join_engine.py +295 -0
  193. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/transformer/object_transformer.py +577 -116
  194. linkml_map-0.5.3/src/linkml_map/transformer/transformer.py +978 -0
  195. linkml_map-0.5.3/src/linkml_map/utils/eval_utils.py +1035 -0
  196. linkml_map-0.5.3/src/linkml_map/utils/expression_locations.py +111 -0
  197. linkml_map-0.5.3/src/linkml_map/utils/extensions.py +205 -0
  198. linkml_map-0.5.3/src/linkml_map/utils/join_utils.py +176 -0
  199. linkml_map-0.5.3/src/linkml_map/utils/lookup_index.py +261 -0
  200. linkml_map-0.5.3/src/linkml_map/utils/spec_merge.py +217 -0
  201. linkml_map-0.5.3/src/linkml_map/validator.py +1453 -0
  202. {linkml_map-0.5.2 → linkml_map-0.5.3}/templates/pydantic/class.py.jinja +10 -0
  203. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/biolink/transform/biolink-example-profile.transform.yaml +4 -2
  204. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/fair_mappings_metadata/data/sample-linkmlmap-spec.yaml +5 -3
  205. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/fair_mappings_metadata/transform/linkmlmap-to-fair.transformation.yaml +11 -5
  206. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/transform/denormalize.transform.yaml +4 -2
  207. linkml_map-0.5.3/tests/input/examples/personinfo_basic/model/agent_model.py +805 -0
  208. linkml_map-0.5.3/tests/input/examples/personinfo_basic/output/personinfo_compiled.md +56 -0
  209. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/output/personinfo_derived.yaml +2 -38
  210. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/target/agent.yaml +11 -1
  211. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/transform/personinfo-to-agent.transform.yaml +9 -41
  212. linkml_map-0.5.3/tests/input/extensions/override_demo_ext.py +12 -0
  213. linkml_map-0.5.3/tests/input/extensions/slugify_ext.py +30 -0
  214. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/transform/person_to_agent.transform.yaml +4 -2
  215. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_cli/test_cli.py +115 -8
  216. linkml_map-0.5.3/tests/test_cli/test_cli_multi_spec.py +520 -0
  217. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_cli/test_cli_tabular.py +96 -1
  218. linkml_map-0.5.3/tests/test_cli/test_cli_validate.py +192 -0
  219. linkml_map-0.5.3/tests/test_cli/test_pre_flight.py +219 -0
  220. linkml_map-0.5.3/tests/test_compiler/test_duckdb_compiler.py +178 -0
  221. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_compiler/test_graphviz_compiler.py +1 -1
  222. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_compiler/test_python_compiler.py +4 -3
  223. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_compliance/test_compliance_suite.py +3 -9
  224. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_datamodel.py +52 -9
  225. linkml_map-0.5.3/tests/test_deprecations.py +317 -0
  226. linkml_map-0.5.3/tests/test_inference/test_induce_dotted_populated_from.py +101 -0
  227. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_loaders/test_data_loader.py +203 -0
  228. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_schema_mapper/test_schema_mapper.py +75 -0
  229. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_class_name_spaces.py +2 -2
  230. linkml_map-0.5.3/tests/test_transformer/test_expr_implicit_join.py +114 -0
  231. linkml_map-0.5.3/tests/test_transformer/test_expr_strict_mode.py +148 -0
  232. linkml_map-0.5.3/tests/test_transformer/test_expression_locations.py +144 -0
  233. linkml_map-0.5.3/tests/test_transformer/test_implicit_cross_table_join.py +936 -0
  234. linkml_map-0.5.3/tests/test_transformer/test_inline_dotpath.py +141 -0
  235. linkml_map-0.5.3/tests/test_transformer/test_join_engine.py +681 -0
  236. linkml_map-0.5.3/tests/test_transformer/test_join_synthesis_completeness.py +360 -0
  237. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_multi_enum.py +48 -0
  238. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_no_range_scalar.py +2 -2
  239. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_object_transformer.py +129 -49
  240. linkml_map-0.5.3/tests/test_transformer/test_object_transformer_new.py +957 -0
  241. linkml_map-0.5.3/tests/test_upstream_canaries.py +49 -0
  242. linkml_map-0.5.3/tests/test_utils/test_eval_utils.py +1408 -0
  243. linkml_map-0.5.3/tests/test_utils/test_extensions.py +576 -0
  244. linkml_map-0.5.3/tests/test_utils/test_join_utils.py +82 -0
  245. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_utils/test_lookup_index.py +48 -0
  246. linkml_map-0.5.3/tests/test_utils/test_lookup_index_context_manager.py +372 -0
  247. linkml_map-0.5.3/tests/test_utils/test_lookup_index_resource_limits.py +149 -0
  248. linkml_map-0.5.3/tests/test_utils/test_spec_merge.py +205 -0
  249. linkml_map-0.5.3/tests/test_validator.py +1731 -0
  250. {linkml_map-0.5.2 → linkml_map-0.5.3}/uv.lock +46 -12
  251. linkml_map-0.5.2/docs/schema/AliasedClass.md +0 -149
  252. linkml_map-0.5.2/docs/schema/Boolean.md +0 -36
  253. linkml_map-0.5.2/docs/schema/ClassDerivation.md +0 -418
  254. linkml_map-0.5.2/docs/schema/ClassReference.md +0 -31
  255. linkml_map-0.5.2/docs/schema/CopyDirective.md +0 -236
  256. linkml_map-0.5.2/docs/schema/Curie.md +0 -41
  257. linkml_map-0.5.2/docs/schema/Date.md +0 -36
  258. linkml_map-0.5.2/docs/schema/DateOrDatetime.md +0 -36
  259. linkml_map-0.5.2/docs/schema/Datetime.md +0 -36
  260. linkml_map-0.5.2/docs/schema/Decimal.md +0 -35
  261. linkml_map-0.5.2/docs/schema/Double.md +0 -35
  262. linkml_map-0.5.2/docs/schema/EnumReference.md +0 -31
  263. linkml_map-0.5.2/docs/schema/Float.md +0 -35
  264. linkml_map-0.5.2/docs/schema/Integer.md +0 -35
  265. linkml_map-0.5.2/docs/schema/Jsonpath.md +0 -36
  266. linkml_map-0.5.2/docs/schema/Jsonpointer.md +0 -36
  267. linkml_map-0.5.2/docs/schema/Ncname.md +0 -36
  268. linkml_map-0.5.2/docs/schema/Nodeidentifier.md +0 -36
  269. linkml_map-0.5.2/docs/schema/Objectidentifier.md +0 -40
  270. linkml_map-0.5.2/docs/schema/PrefixDerivation.md +0 -291
  271. linkml_map-0.5.2/docs/schema/SlotDerivation.md +0 -598
  272. linkml_map-0.5.2/docs/schema/SlotReference.md +0 -31
  273. linkml_map-0.5.2/docs/schema/Sparqlpath.md +0 -36
  274. linkml_map-0.5.2/docs/schema/String.md +0 -35
  275. linkml_map-0.5.2/docs/schema/Time.md +0 -36
  276. linkml_map-0.5.2/docs/schema/TransformationSpecification.md +0 -357
  277. linkml_map-0.5.2/docs/schema/Uri.md +0 -40
  278. linkml_map-0.5.2/docs/schema/Uriorcurie.md +0 -36
  279. linkml_map-0.5.2/docs/schema/add.md +0 -65
  280. linkml_map-0.5.2/docs/schema/cast_collection_as.md +0 -65
  281. linkml_map-0.5.2/docs/schema/class_derivations.md +0 -76
  282. linkml_map-0.5.2/docs/schema/class_name.md +0 -64
  283. linkml_map-0.5.2/docs/schema/class_named.md +0 -70
  284. linkml_map-0.5.2/docs/schema/copy_all.md +0 -65
  285. linkml_map-0.5.2/docs/schema/copy_directives.md +0 -74
  286. linkml_map-0.5.2/docs/schema/delimiter.md +0 -78
  287. linkml_map-0.5.2/docs/schema/derived_from.md +0 -75
  288. linkml_map-0.5.2/docs/schema/dictionary_key.md +0 -65
  289. linkml_map-0.5.2/docs/schema/element_name.md +0 -68
  290. linkml_map-0.5.2/docs/schema/exclude.md +0 -65
  291. linkml_map-0.5.2/docs/schema/exclude_all.md +0 -65
  292. linkml_map-0.5.2/docs/schema/expression_to_value_mappings.md +0 -80
  293. linkml_map-0.5.2/docs/schema/id.md +0 -71
  294. linkml_map-0.5.2/docs/schema/include.md +0 -65
  295. linkml_map-0.5.2/docs/schema/key.md +0 -68
  296. linkml_map-0.5.2/docs/schema/mirror_source.md +0 -70
  297. linkml_map-0.5.2/docs/schema/name.md +0 -62
  298. linkml_map-0.5.2/docs/schema/over_slots.md +0 -68
  299. linkml_map-0.5.2/docs/schema/range.md +0 -66
  300. linkml_map-0.5.2/docs/schema/reversed.md +0 -65
  301. linkml_map-0.5.2/docs/schema/slot_derivations.md +0 -56
  302. linkml_map-0.5.2/docs/schema/slot_name.md +0 -64
  303. linkml_map-0.5.2/docs/schema/source_magnitude_slot.md +0 -64
  304. linkml_map-0.5.2/docs/schema/source_schema.md +0 -70
  305. linkml_map-0.5.2/docs/schema/source_unit.md +0 -64
  306. linkml_map-0.5.2/docs/schema/source_unit_scheme.md +0 -74
  307. linkml_map-0.5.2/docs/schema/source_unit_slot.md +0 -64
  308. linkml_map-0.5.2/docs/schema/stringification.md +0 -65
  309. linkml_map-0.5.2/docs/schema/syntax.md +0 -76
  310. linkml_map-0.5.2/docs/schema/target_magnitude_slot.md +0 -64
  311. linkml_map-0.5.2/docs/schema/target_schema.md +0 -70
  312. linkml_map-0.5.2/docs/schema/target_unit.md +0 -64
  313. linkml_map-0.5.2/docs/schema/target_unit_scheme.md +0 -74
  314. linkml_map-0.5.2/docs/schema/target_unit_slot.md +0 -64
  315. linkml_map-0.5.2/docs/schema/type_designator.md +0 -65
  316. linkml_map-0.5.2/docs/schema/unit_conversion.md +0 -65
  317. linkml_map-0.5.2/docs/schema/value.md +0 -65
  318. linkml_map-0.5.2/docs/schema/value_mappings.md +0 -80
  319. linkml_map-0.5.2/src/linkml_map/cli/cli.py +0 -502
  320. linkml_map-0.5.2/src/linkml_map/compiler/awk_compiler.py +0 -13
  321. linkml_map-0.5.2/src/linkml_map/transformer/engine.py +0 -90
  322. linkml_map-0.5.2/src/linkml_map/transformer/transformer.py +0 -361
  323. linkml_map-0.5.2/src/linkml_map/utils/eval_utils.py +0 -480
  324. linkml_map-0.5.2/src/linkml_map/utils/lookup_index.py +0 -113
  325. linkml_map-0.5.2/tests/input/examples/personinfo_basic/model/agent_model.py +0 -1021
  326. linkml_map-0.5.2/tests/input/examples/personinfo_basic/output/personinfo_compiled.md +0 -83
  327. linkml_map-0.5.2/tests/test_compiler/test_duckdb_compiler.py +0 -45
  328. linkml_map-0.5.2/tests/test_transformer/test_object_transformer_new.py +0 -266
  329. linkml_map-0.5.2/tests/test_utils/test_eval_utils.py +0 -751
  330. {linkml_map-0.5.2 → linkml_map-0.5.3}/.claude/.mcp.json +0 -0
  331. {linkml_map-0.5.2 → linkml_map-0.5.3}/.claude/settings.json +0 -0
  332. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/CODE_OF_CONDUCT.md +0 -0
  333. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/CONTRIBUTING.md +0 -0
  334. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/actions/claude-code-action/action.yml +0 -0
  335. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/actions/claude-issue-summarize-action/action.yml +0 -0
  336. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/actions/claude-issue-triage-action/action.yml +0 -0
  337. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/ai-controllers.json +0 -0
  338. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/copilot-instructions.md +0 -0
  339. {linkml_map-0.5.2 → linkml_map-0.5.3}/.github/copilot-setup-steps.yml +0 -0
  340. {linkml_map-0.5.2 → linkml_map-0.5.3}/.gitignore +0 -0
  341. {linkml_map-0.5.2 → linkml_map-0.5.3}/CLAUDE.md +0 -0
  342. {linkml_map-0.5.2 → linkml_map-0.5.3}/LICENSE +0 -0
  343. {linkml_map-0.5.2 → linkml_map-0.5.3}/Makefile +0 -0
  344. {linkml_map-0.5.2 → linkml_map-0.5.3}/about.yaml +0 -0
  345. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/api/compiler.md +0 -0
  346. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/api/expressions.md +0 -0
  347. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/api/inference.md +0 -0
  348. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/api/session.md +0 -0
  349. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/api/transformer.md +0 -0
  350. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/examples/biolink-subsetting.ipynb +0 -0
  351. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/examples/denormalizing.ipynb +0 -0
  352. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/faq.md +0 -0
  353. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/about.md +0 -0
  354. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/api.md +0 -0
  355. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/compiler.md +0 -0
  356. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/faq.md +0 -0
  357. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/functions.md +0 -0
  358. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/index.md +0 -0
  359. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/overview.md +0 -0
  360. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/same_as.md +0 -0
  361. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/session.md +0 -0
  362. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/transformer.md +0 -0
  363. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/types.md +0 -0
  364. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/schema/unit.md +0 -0
  365. {linkml_map-0.5.2 → linkml_map-0.5.3}/docs/specification/compliance.md +0 -0
  366. {linkml_map-0.5.2 → linkml_map-0.5.3}/project.Makefile +0 -0
  367. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/__init__.py +0 -0
  368. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/cli/__init__.py +0 -0
  369. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/__init__.py +0 -0
  370. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/j2_based_compiler.py +0 -0
  371. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/markdown_compiler.py +0 -0
  372. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/r2rml_compiler.py +0 -0
  373. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/sparql_compiler.py +0 -0
  374. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/sssom_compiler.py +0 -0
  375. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/templates/__init__.py +0 -0
  376. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/tr/__init__.py +0 -0
  377. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/compiler/tr/transformer_to_mapping_tables.tr.yaml +0 -0
  378. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/datamodel/__init__.py +0 -0
  379. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/datamodel/sssom.map.yaml +0 -0
  380. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/datamodel/transformer_model_new.py +0 -0
  381. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/functions/__init__.py +0 -0
  382. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/functions/unit_conversion.py +0 -0
  383. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/importer/__init__.py +0 -0
  384. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/importer/importer.py +0 -0
  385. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/inference/__init__.py +0 -0
  386. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/loaders/__init__.py +0 -0
  387. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/session.py +0 -0
  388. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/transformer/__init__.py +0 -0
  389. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/transformer/duckdb_transformer.py +0 -0
  390. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/utils/__init__.py +0 -0
  391. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/utils/dynamic_object.py +0 -0
  392. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/utils/fk_utils.py +0 -0
  393. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/utils/loaders.py +0 -0
  394. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/utils/multi_file_transformer.py +0 -0
  395. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/utils/schema_patch.py +0 -0
  396. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/writers/__init__.py +0 -0
  397. {linkml_map-0.5.2 → linkml_map-0.5.3}/src/linkml_map/writers/output_streams.py +0 -0
  398. {linkml_map-0.5.2 → linkml_map-0.5.3}/templates/pydantic/attribute.py.jinja +0 -0
  399. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/README.md +0 -0
  400. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/__init__.py +0 -0
  401. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/conftest.py +0 -0
  402. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/__init__.py +0 -0
  403. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/attic/denormalize-mapping.yaml +0 -0
  404. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/attic/mapping_denorm.yaml +0 -0
  405. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/attic/mapping_norm.yaml +0 -0
  406. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/attic/mappingset-norm-example-01.yaml +0 -0
  407. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/attic/personinfo-s1-example-data-01.yaml +0 -0
  408. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/attic/personinfo_s1.yaml +0 -0
  409. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/attic/personinfo_s2.yaml +0 -0
  410. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/attic/transform-s1-to-s2.yaml +0 -0
  411. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/README.md +0 -0
  412. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/__init__.py +0 -0
  413. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/biolink/data/gene-001.yaml +0 -0
  414. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/biolink/output/gene-001.transformed.yaml +0 -0
  415. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/biolink/source/biolink-model.yaml +0 -0
  416. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/biolink/target/target.yaml +0 -0
  417. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/fair_mappings_metadata/__init__.py +0 -0
  418. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/fair_mappings_metadata/output/linkmlmap-fair-mappings.yaml +0 -0
  419. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/__init__.py +0 -0
  420. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/data/MappingSet-001.yaml +0 -0
  421. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/model/__init__.py +0 -0
  422. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/model/denormalized_model.py +0 -0
  423. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/model/normalized_model.py +0 -0
  424. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/output/MappingSet-001.transformed.yaml +0 -0
  425. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/source/cmdr_normalized.yaml +0 -0
  426. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/source/normalized.yaml +0 -0
  427. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/target/cmdr_denormalized.yaml +0 -0
  428. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/flattening/target/denormalized.yaml +0 -0
  429. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/measurements/data/PersonQuantityValue-001.yaml +0 -0
  430. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/measurements/data/PersonQuantityValue-002.yaml +0 -0
  431. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/measurements/instructions.yaml +0 -0
  432. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/measurements/output/PersonQuantityValue-001.transformed.yaml +0 -0
  433. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/measurements/output/PersonQuantityValue-002.transformed.yaml +0 -0
  434. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/measurements/source/quantity_value.yaml +0 -0
  435. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/measurements/target/quantity_value_flat.yaml +0 -0
  436. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/measurements/transform/qv-to-scalar.transform.yaml +0 -0
  437. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/__init__.py +0 -0
  438. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/data/Container-001.yaml +0 -0
  439. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/data/Person-001.yaml +0 -0
  440. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/model/__init__.py +0 -0
  441. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/model/personinfo_model.py +0 -0
  442. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/output/Container-001.transformed.yaml +0 -0
  443. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/output/Person-001.transformed.yaml +0 -0
  444. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/output/personinfo_compiled.py +0 -0
  445. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/personinfo_basic/source/personinfo.yaml +0 -0
  446. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/single_value_for_multivalued/data/Container-001.yaml +0 -0
  447. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/single_value_for_multivalued/output/Container-001.transformed.yaml +0 -0
  448. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/single_value_for_multivalued/source/greetings.yaml +0 -0
  449. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/single_value_for_multivalued/target/languages.yaml +0 -0
  450. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/single_value_for_multivalued/transform/greetings-to-languages.transform.yaml +0 -0
  451. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/tabular/data/Person.csv +0 -0
  452. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/tabular/data/Person.tsv +0 -0
  453. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/tabular/source/person_flat.yaml +0 -0
  454. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/tabular/transform/person_to_agent.transform.yaml +0 -0
  455. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/type_coercion/data/MyRecord-001.yaml +0 -0
  456. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/type_coercion/output/MyRecord-001.transformed.yaml +0 -0
  457. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/type_coercion/source/type_coercion.yaml +0 -0
  458. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/type_coercion/target/target.yaml +0 -0
  459. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/input/examples/type_coercion/transform/type_coercion.transform.yaml +0 -0
  460. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/__init__.py +0 -0
  461. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/data/Person-001.yaml +0 -0
  462. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/expected/Person-001.transformed.yaml +0 -0
  463. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/source/person.yaml +0 -0
  464. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/target/agent.yaml +0 -0
  465. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/utils/apply_patch.py +0 -0
  466. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/utils/test_apply_schema_patch.py +0 -0
  467. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold/utils/test_apply_transform_patch.py +0 -0
  468. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold_container/__init__.py +0 -0
  469. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold_container/data/Container-001.yaml +0 -0
  470. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold_container/expected/Container-001.transformed.yaml +0 -0
  471. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold_container/source/container.yaml +0 -0
  472. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold_container/target/flat_person.yaml +0 -0
  473. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/scaffold_container/transform/flatten_fk.transform.yaml +0 -0
  474. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_cli/__init__.py +0 -0
  475. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_compiler/__init__.py +0 -0
  476. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_compiler/test_markdown_compiler.py +0 -0
  477. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_loaders/__init__.py +0 -0
  478. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_schema_mapper/__init__.py +0 -0
  479. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_strictdict.py +0 -0
  480. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/__init__.py +0 -0
  481. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_biolink_subsetting.py +0 -0
  482. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_cmdr_transformation.py +0 -0
  483. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_continue_on_error.py +0 -0
  484. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_cross_class_lookup.py +0 -0
  485. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_cross_table_lookup.py +0 -0
  486. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_duckdb_transformer.py +0 -0
  487. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_engine_edge_cases.py +0 -0
  488. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_flatten_inlined.py +0 -0
  489. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_nmdc_biosample_study_join.py +0 -0
  490. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_nmdc_flattening_patterns.py +0 -0
  491. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_nmdc_unified_activities.py +0 -0
  492. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_nmdc_uuid5_ids.py +0 -0
  493. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_pivot_operation.py +0 -0
  494. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_range_override.py +0 -0
  495. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_source_schema_patches.py +0 -0
  496. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_transformer/test_transformer_examples.py +0 -0
  497. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_utils/__init__.py +0 -0
  498. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_utils/test_dynamic_object.py +0 -0
  499. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_utils/test_fk_utils.py +0 -0
  500. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_utils/test_lookup_index_edge_cases.py +0 -0
  501. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_writers/__init__.py +0 -0
  502. {linkml_map-0.5.2 → linkml_map-0.5.3}/tests/test_writers/test_output_streams.py +0 -0
  503. {linkml_map-0.5.2 → linkml_map-0.5.3}/tox.ini +0 -0
  504. {linkml_map-0.5.2 → linkml_map-0.5.3}/utils/get-value.sh +0 -0
@@ -14,7 +14,7 @@ jobs:
14
14
  issues: write
15
15
  steps:
16
16
  - name: Checkout repository
17
- uses: actions/checkout@v4
17
+ uses: actions/checkout@v6
18
18
  with:
19
19
  ref: ${{ github.ref }}
20
20
 
@@ -14,7 +14,7 @@ jobs:
14
14
  issues: write
15
15
  steps:
16
16
  - name: Checkout repository
17
- uses: actions/checkout@v4
17
+ uses: actions/checkout@v6
18
18
  with:
19
19
  ref: ${{ github.ref }}
20
20
 
@@ -26,12 +26,12 @@ jobs:
26
26
  actions: read # Required for Claude to read CI results on PRs
27
27
  steps:
28
28
  - name: Checkout repository
29
- uses: actions/checkout@v4
29
+ uses: actions/checkout@v6
30
30
  with:
31
31
  fetch-depth: 1
32
32
 
33
33
  - name: Install uv
34
- uses: astral-sh/setup-uv@v5
34
+ uses: astral-sh/setup-uv@v8.2.0
35
35
 
36
36
  - name: Install python tools
37
37
  run: |
@@ -22,6 +22,6 @@ jobs:
22
22
 
23
23
  steps:
24
24
  - name: Checkout
25
- uses: actions/checkout@v4
25
+ uses: actions/checkout@v6
26
26
  - name: Codespell
27
27
  uses: codespell-project/actions-codespell@v2
@@ -7,7 +7,9 @@ on:
7
7
  branches: [ main ]
8
8
 
9
9
  paths:
10
- - 'src/linkml_map/datamodel.yaml'
10
+ - 'src/linkml_map/datamodel/transformer_model.yaml'
11
+ - 'docs/**'
12
+ - 'mkdocs.yml'
11
13
 
12
14
  # A workflow run is made up of one or more jobs that can run sequentially or in parallel
13
15
  jobs:
@@ -18,15 +20,15 @@ jobs:
18
20
  # Steps represent a sequence of tasks that will be executed as part of the job
19
21
  steps:
20
22
  - name: Check out repository
21
- uses: actions/checkout@v4
23
+ uses: actions/checkout@v6
22
24
  with:
23
25
  fetch-depth: 0
24
26
 
25
27
  - name: Install uv
26
- uses: astral-sh/setup-uv@v5
28
+ uses: astral-sh/setup-uv@v8.2.0
27
29
 
28
30
  - name: Set up Python3
29
- uses: actions/setup-python@v5
31
+ uses: actions/setup-python@v6
30
32
  with:
31
33
  python-version: 3.12
32
34
 
@@ -34,7 +36,4 @@ jobs:
34
36
  run: uv sync
35
37
 
36
38
  - name: Generate and deploy docs
37
- run: |
38
- mkdir docs
39
- touch docs/.nojekyll
40
- make deploy-gh-doc
39
+ run: make deploy-gh-doc
@@ -16,12 +16,23 @@ on:
16
16
 
17
17
  jobs:
18
18
  check-mention:
19
+ # Only spin up the job when the actual command phrase is present, matching
20
+ # the script's qualifying regex (/@dragon-ai-agent\s+please\s+/i). Without
21
+ # this the job runs (and shows a green check) on every issue, PR, and
22
+ # review comment; gating on the bare handle would also trip on any comment
23
+ # that merely mentions the bot. The script below still does the precise
24
+ # check (authorized user, captured prompt).
25
+ if: |
26
+ (github.event_name == 'issues' && contains(github.event.issue.body, '@dragon-ai-agent please')) ||
27
+ (github.event_name == 'pull_request' && contains(github.event.pull_request.body, '@dragon-ai-agent please')) ||
28
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@dragon-ai-agent please')) ||
29
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@dragon-ai-agent please'))
19
30
  runs-on: ubuntu-latest
20
31
  outputs:
21
32
  result: ${{ steps.check.outputs.result }}
22
33
  steps:
23
34
  - name: Checkout repository
24
- uses: actions/checkout@v4
35
+ uses: actions/checkout@v6
25
36
  # this seems to be necessary to ensure actions uses the latest; see
26
37
  # https://github.com/actions/checkout/issues/439
27
38
  with:
@@ -29,7 +40,7 @@ jobs:
29
40
 
30
41
  - name: Check for qualifying mention
31
42
  id: check
32
- uses: actions/github-script@v6
43
+ uses: actions/github-script@v9
33
44
  with:
34
45
  github-token: ${{ secrets.PAT_FOR_PR }} # Use PAT instead of default token
35
46
  script: |
@@ -101,7 +112,7 @@ jobs:
101
112
  runs-on: ubuntu-latest
102
113
  steps:
103
114
  - name: Checkout repository
104
- uses: actions/checkout@v4
115
+ uses: actions/checkout@v6
105
116
  with:
106
117
  ref: ${{ github.ref }}
107
118
  token: ${{ secrets.PAT_FOR_PR }} # Use PAT for checkout to allow committing later
@@ -115,7 +126,7 @@ jobs:
115
126
  run: mkdir -p ${{ env.TOOLS_DIR }}
116
127
 
117
128
  - name: Setup Node.js
118
- uses: actions/setup-node@v3
129
+ uses: actions/setup-node@v6
119
130
  with:
120
131
  node-version: '18'
121
132
 
@@ -131,7 +142,7 @@ jobs:
131
142
  ls -alt ${{ env.TOOLS_DIR }}
132
143
 
133
144
  - name: Install uv
134
- uses: astral-sh/setup-uv@v5
145
+ uses: astral-sh/setup-uv@v8.2.0
135
146
 
136
147
  - name: Install python tools
137
148
  run: |
@@ -18,9 +18,9 @@ jobs:
18
18
  quality-checks:
19
19
  runs-on: ubuntu-latest
20
20
  steps:
21
- - uses: actions/checkout@v4
21
+ - uses: actions/checkout@v6
22
22
 
23
- - uses: actions/setup-python@v5
23
+ - uses: actions/setup-python@v6
24
24
  with:
25
25
  python-version: '3.12'
26
26
 
@@ -37,14 +37,14 @@ jobs:
37
37
  python-version: [ '3.10', '3.11', '3.12', '3.13' ]
38
38
 
39
39
  steps:
40
- - uses: actions/checkout@v4
40
+ - uses: actions/checkout@v6
41
41
 
42
42
  - uses: ts-graphviz/setup-graphviz@v2
43
43
 
44
44
  - name: Install uv
45
- uses: astral-sh/setup-uv@v5
45
+ uses: astral-sh/setup-uv@v8.2.0
46
46
 
47
- - uses: actions/setup-python@v5
47
+ - uses: actions/setup-python@v6
48
48
  with:
49
49
  python-version: ${{ matrix.python-version }}
50
50
 
@@ -63,5 +63,17 @@ jobs:
63
63
  exit 1
64
64
  fi
65
65
 
66
+ - name: Regenerate schema docs and check for drift
67
+ if: github.event_name == 'pull_request' && matrix.python-version == '3.12'
68
+ run: |
69
+ make gendoc
70
+ if ! git diff --quiet docs/schema/ || [ -n "$(git ls-files --others --exclude-standard docs/schema/)" ]; then
71
+ echo "::error::Generated files in docs/schema/ are out of date."
72
+ echo "Run 'make gendoc' and commit the result."
73
+ git status --short docs/schema/
74
+ git diff --stat docs/schema/
75
+ exit 1
76
+ fi
77
+
66
78
  - name: Run tests
67
79
  run: make test
@@ -3,7 +3,7 @@ name: Publish Python Package
3
3
  on:
4
4
  workflow_dispatch:
5
5
  release:
6
- types: [created]
6
+ types: [published]
7
7
 
8
8
  jobs:
9
9
  build-n-publish:
@@ -14,13 +14,13 @@ jobs:
14
14
  permissions:
15
15
  id-token: write
16
16
  steps:
17
- - uses: actions/checkout@v4
17
+ - uses: actions/checkout@v6
18
18
 
19
19
  - name: Install uv
20
- uses: astral-sh/setup-uv@v5
20
+ uses: astral-sh/setup-uv@v8.2.0
21
21
 
22
22
  - name: Set up Python
23
- uses: actions/setup-python@v5
23
+ uses: actions/setup-python@v6
24
24
  with:
25
25
  python-version: '3.12'
26
26
 
@@ -1,16 +1,17 @@
1
1
  # Exclusion notes:
2
2
  # tests/input/ — golden test fixtures that must match tool output exactly
3
3
  # src/linkml_map/datamodel/ — generated by gen-pydantic, not hand-edited
4
+ # docs/schema/ — generated by gen-doc, not hand-edited
4
5
  repos:
5
6
  - repo: https://github.com/pre-commit/pre-commit-hooks
6
7
  rev: v4.4.0
7
8
  hooks:
8
9
  - id: end-of-file-fixer
9
- exclude: ^(tests/input/|src/linkml_map/datamodel/)
10
+ exclude: ^(tests/input/|src/linkml_map/datamodel/|docs/schema/)
10
11
  - id: check-yaml
11
12
  - id: check-toml
12
13
  - id: trailing-whitespace
13
- exclude: ^(tests/input/|src/linkml_map/datamodel/)
14
+ exclude: ^(tests/input/|src/linkml_map/datamodel/|docs/schema/)
14
15
 
15
16
  - repo: https://github.com/astral-sh/ruff-pre-commit
16
17
  rev: v0.11.13
@@ -7,7 +7,7 @@ TODO: fill in extra description here
7
7
  ## Repo management
8
8
 
9
9
  This repo uses `uv` for managing dependencies. Never use commands like `pip` to add or manage dependencies.
10
- `uv run` is the best way to run things, unless you are using `justfile` or `makefile` target
10
+ `uv run` is the best way to run things, unless there is a `Makefile` target that fits.
11
11
 
12
12
  `mkdocs` is used for documentation.
13
13
  ## This is a Python repository
@@ -21,11 +21,10 @@ Layout:
21
21
 
22
22
  Building and testing:
23
23
 
24
- * `just --list` to see all commands
25
- * `just test` performs unit tests, doctests, ruff/linting
26
- * `just test-full` as above plus integration tests
27
-
28
- You can run the underlying commands (with `uv run ...`) but in general justfile targets should be favored.
24
+ * `uv run pytest` - run unit tests
25
+ * `uv run pytest -m integration` - run integration tests
26
+ * `uv run ruff check .` and `uv run ruff format .` - lint and format
27
+ * `make` targets (e.g. `make src/linkml_map/datamodel/transformer_model.py`) regenerate the pydantic model from the YAML schema
29
28
 
30
29
  Best practice:
31
30
 
@@ -1,24 +1,26 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: linkml-map
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: a framework for specifying and executing mappings between data models
5
5
  Author-email: cmungall <cjm@berkeleybop.org>
6
6
  License-File: LICENSE
7
7
  Requires-Python: <3.14,>=3.10
8
8
  Requires-Dist: asteval>=1.0.5
9
- Requires-Dist: click>=8
9
+ Requires-Dist: click>=8.2
10
10
  Requires-Dist: curies
11
11
  Requires-Dist: deepdiff>=6.0
12
12
  Requires-Dist: duckdb>=1.1.0
13
13
  Requires-Dist: flatten-dict>=0.4.2
14
14
  Requires-Dist: graphviz>=0.20
15
+ Requires-Dist: inflection>=0.5.1
15
16
  Requires-Dist: jinja2>=3
16
17
  Requires-Dist: lark>=1
17
- Requires-Dist: linkml-runtime>=1.10.0
18
- Requires-Dist: linkml>=1.10.0
18
+ Requires-Dist: linkml-runtime>=1.11.0
19
+ Requires-Dist: linkml>=1.11.0
19
20
  Requires-Dist: more-itertools>=10.0.0
20
21
  Requires-Dist: pint>=0.20
21
22
  Requires-Dist: pydantic<3,>=2
23
+ Requires-Dist: python-slugify>=8.0.4
22
24
  Requires-Dist: pyyaml
23
25
  Requires-Dist: simpleeval>=1.0.3
24
26
  Requires-Dist: ucumvert>=0.2
@@ -49,9 +51,7 @@ Features:
49
51
  - Mappings are reversible (provided all expressions used are reversible)
50
52
  - Multiple output formats (YAML, JSON, JSONL, TSV, CSV)
51
53
 
52
- For full documentation see:
53
-
54
- - [linkml.io/linkml-map/](https://linkml.io/linkml-map/)
54
+ For full documentation see [linkml.io/linkml-map/](https://linkml.io/linkml-map/).
55
55
 
56
56
  Status:
57
57
 
@@ -60,7 +60,31 @@ Not all parts of the model are implemented in the reference Python framework.
60
60
 
61
61
  ## Quickstart
62
62
 
63
- * [Tutorial Notebook](docs/examples/Tutorial.ipynb)
64
- * [Generated Docs](https://linkml.github.io/linkml-map/)
65
- * [Compliance Suite](https://linkml.github.io/linkml-map/specification/compliance)
66
- * [API Docs](https://linkml.github.io/linkml-map/api/)
63
+ Install:
64
+
65
+ ```bash
66
+ pip install linkml-map
67
+ # or, in a uv-managed project: uv add linkml-map
68
+ ```
69
+
70
+ When using `uv`, prefix CLI invocations with `uv run` (e.g. `uv run linkml-map --help`).
71
+
72
+ Run the included example (the example files live in this repo):
73
+
74
+ ```bash
75
+ git clone https://github.com/linkml/linkml-map.git
76
+ cd linkml-map/tests/input/examples/personinfo_basic
77
+ linkml-map map-data --unrestricted-eval \
78
+ -T transform/personinfo-to-agent.transform.yaml \
79
+ -s source/personinfo.yaml \
80
+ data/Container-001.yaml
81
+ ```
82
+
83
+ See the [Quick Start guide](https://linkml.io/linkml-map/#quick-start) for the expected output and next steps.
84
+
85
+ ## More
86
+
87
+ * [Tutorial Notebook](https://github.com/linkml/linkml-map/blob/main/docs/examples/Tutorial.ipynb)
88
+ * [Full docs](https://linkml.io/linkml-map/)
89
+ * [Compliance Suite](https://linkml.io/linkml-map/specification/compliance/)
90
+ * [API Docs](https://linkml.io/linkml-map/api/)
@@ -23,9 +23,7 @@ Features:
23
23
  - Mappings are reversible (provided all expressions used are reversible)
24
24
  - Multiple output formats (YAML, JSON, JSONL, TSV, CSV)
25
25
 
26
- For full documentation see:
27
-
28
- - [linkml.io/linkml-map/](https://linkml.io/linkml-map/)
26
+ For full documentation see [linkml.io/linkml-map/](https://linkml.io/linkml-map/).
29
27
 
30
28
  Status:
31
29
 
@@ -34,7 +32,31 @@ Not all parts of the model are implemented in the reference Python framework.
34
32
 
35
33
  ## Quickstart
36
34
 
37
- * [Tutorial Notebook](docs/examples/Tutorial.ipynb)
38
- * [Generated Docs](https://linkml.github.io/linkml-map/)
39
- * [Compliance Suite](https://linkml.github.io/linkml-map/specification/compliance)
40
- * [API Docs](https://linkml.github.io/linkml-map/api/)
35
+ Install:
36
+
37
+ ```bash
38
+ pip install linkml-map
39
+ # or, in a uv-managed project: uv add linkml-map
40
+ ```
41
+
42
+ When using `uv`, prefix CLI invocations with `uv run` (e.g. `uv run linkml-map --help`).
43
+
44
+ Run the included example (the example files live in this repo):
45
+
46
+ ```bash
47
+ git clone https://github.com/linkml/linkml-map.git
48
+ cd linkml-map/tests/input/examples/personinfo_basic
49
+ linkml-map map-data --unrestricted-eval \
50
+ -T transform/personinfo-to-agent.transform.yaml \
51
+ -s source/personinfo.yaml \
52
+ data/Container-001.yaml
53
+ ```
54
+
55
+ See the [Quick Start guide](https://linkml.io/linkml-map/#quick-start) for the expected output and next steps.
56
+
57
+ ## More
58
+
59
+ * [Tutorial Notebook](https://github.com/linkml/linkml-map/blob/main/docs/examples/Tutorial.ipynb)
60
+ * [Full docs](https://linkml.io/linkml-map/)
61
+ * [Compliance Suite](https://linkml.io/linkml-map/specification/compliance/)
62
+ * [API Docs](https://linkml.io/linkml-map/api/)
@@ -0,0 +1,155 @@
1
+ # Extension Functions
2
+
3
+ linkml-map ships a curated set of safe built-in functions for use in
4
+ [expressions](expressions.md). When you need a function that isn't built in,
5
+ you can register your own — without forking linkml-map or wrapping it in a
6
+ custom Python harness — by tagging plain Python functions with
7
+ `@safe_function` and pointing the CLI at the file.
8
+
9
+ ## Quick example
10
+
11
+ A user-supplied `my_helpers.py`:
12
+
13
+ ```python
14
+ from linkml_map.utils.extensions import safe_function
15
+
16
+
17
+ @safe_function
18
+ def normalize_taxon_id(s: str) -> str | None:
19
+ """Strip the 'NCBI:' prefix and pad to 8 digits."""
20
+ if not s:
21
+ return None
22
+ raw = s.removeprefix("NCBI:").strip()
23
+ return f"NCBI:{int(raw):08d}"
24
+ ```
25
+
26
+ Then in a trans-spec:
27
+
28
+ ```yaml
29
+ # required_extensions: my_helpers.py (convention; see below)
30
+ class_derivations:
31
+ Organism:
32
+ populated_from: SourceOrganism
33
+ slot_derivations:
34
+ tax_id:
35
+ expr: "normalize_taxon_id(taxon)"
36
+ ```
37
+
38
+ And at the command line:
39
+
40
+ ```bash
41
+ linkml-map map-data -s schema.yaml -T transform.yaml \
42
+ --functions ./my_helpers.py \
43
+ data.tsv -o out.jsonl
44
+ ```
45
+
46
+ The flag is repeatable: pass `--functions` (or the short form `-F`) once per
47
+ extension file.
48
+
49
+ ## The `@safe_function` contract
50
+
51
+ Applying `@safe_function` is a **declaration by the author** that the function
52
+ is:
53
+
54
+ - **Pure** — no I/O, no network calls, no global state mutation
55
+ - **Bounded-time** — deterministic and fast; runs once per row in a transform
56
+ - **Deterministic** — same inputs produce same outputs
57
+
58
+ linkml-map **does not verify** these properties. The name "safe" reflects what
59
+ *you* are declaring about the function, not what linkml-map enforces. This is
60
+ the same posture as `typing.final` or `@SafeVarargs` in other ecosystems.
61
+
62
+ The trust model is identical to `pip install`: anything in a module you import
63
+ will run. If you're importing a third-party extension, treat it like any other
64
+ dependency.
65
+
66
+ ## When NOT to use extensions
67
+
68
+ Extensions are not an escape hatch for putting transformation logic in Python.
69
+ They exist for **named atomic operations** that read cleaner as a name than as
70
+ an expression chain — `slugify(name)` instead of
71
+ `replace(replace(lower(strip(name)), ' ', '_'), ',', '')`.
72
+
73
+ If the function you're tempted to write is more than a few lines of pure
74
+ data manipulation, ask first whether it belongs in the trans-spec or in the
75
+ source/target schema. The declarative spec is the documentation of what the
76
+ transformation does; pulling logic out into Python hides it from review.
77
+
78
+ ## Reserved names
79
+
80
+ A handful of names are injected per-call by the transformer (currently `slot`,
81
+ used inside expressions to reference a previously derived target slot). An
82
+ extension cannot define a function with one of these names — it would be
83
+ silently shadowed at evaluation time. `load_extensions` raises
84
+ `ExtensionError` on the attempt so the conflict shows up at load time
85
+ rather than as silent wrong behavior.
86
+
87
+ ## Override semantics
88
+
89
+ A `@safe_function` may shadow a built-in if you explicitly say so:
90
+
91
+ ```python
92
+ @safe_function(override=True)
93
+ def lower(s: str) -> str:
94
+ return s.casefold() # locale-aware, replaces the built-in str.lower
95
+ ```
96
+
97
+ - **Without `override=True`**: collision with a built-in raises `ExtensionError`
98
+ at load time — protects against accidental shadowing from a typo.
99
+ - **With `override=True` but no matching built-in**: logged as a warning (still
100
+ loaded) — useful as a typo catcher for the override case.
101
+ - **Collision between two extensions**: always an error. Pick one.
102
+
103
+ There is no CLI flag to enable overrides. The decision lives on the function
104
+ declaration, where the author is responsible for it.
105
+
106
+ ## List-style functions
107
+
108
+ By default, scalar functions distribute over lists and propagate `None`
109
+ (`slugify([a, b, None])` → `[slugify(a), slugify(b), None]`). For functions
110
+ that legitimately accept a list as their first argument (aggregators, etc.),
111
+ opt out:
112
+
113
+ ```python
114
+ @safe_function(distributes=False)
115
+ def median(items: list[float]) -> float:
116
+ sorted_items = sorted(items)
117
+ return sorted_items[len(sorted_items) // 2]
118
+ ```
119
+
120
+ ## Required-extension convention
121
+
122
+ A trans-spec that references an extension function won't run without
123
+ `--functions`. The runtime error is clear (`Unknown function 'foo'. (If this
124
+ is a custom function, pass it via --functions <path>.)`), but it's still
125
+ runtime. Until linkml-map gains a declarative `required_extensions:` key, the
126
+ convention is to note the dependency in a header comment on the spec:
127
+
128
+ ```yaml
129
+ # required_extensions:
130
+ # - my_helpers.py
131
+ #
132
+ id: https://example.org/my-transform
133
+ class_derivations:
134
+ ...
135
+ ```
136
+
137
+ ## Programmatic use
138
+
139
+ Python callers can skip the CLI and set extensions directly on the transformer:
140
+
141
+ ```python
142
+ from linkml_map.transformer.object_transformer import ObjectTransformer
143
+ from linkml_map.utils.extensions import load_extensions
144
+
145
+ ext = load_extensions(["./my_helpers.py"])
146
+ tr = ObjectTransformer(extension_functions=ext)
147
+ ```
148
+
149
+ `extension_functions` accepts any `dict[str, Callable]`, so you can also bypass
150
+ the loader entirely and hand-build the dict if you prefer (skipping the
151
+ decorator-tagging step).
152
+
153
+ ## API reference
154
+
155
+ ::: linkml_map.utils.extensions
@@ -20,6 +20,13 @@ and null propagation.
20
20
  | `len(items)` | Length of a list |
21
21
  | `case(pairs...)` | Conditional — first matching `(condition, value)` pair |
22
22
  | `uuid5(namespace, name)` | Deterministic UUID v5 generation |
23
+ | `slugify(s, separator="_")` | ASCII-fold + lowercase + collapse non-alphanumerics; `None` on no extractable content |
24
+ | `to_snake(s)` | Convert to `snake_case` |
25
+ | `to_camel(s)` | Convert to `camelCase` |
26
+ | `to_pascal(s)` | Convert to `PascalCase` |
27
+
28
+ For functions not in this list, see [Extension Functions](extensions.md) to
29
+ register your own.
23
30
 
24
31
  ## Unit Conversion
25
32
 
@@ -35,7 +35,7 @@
35
35
  },
36
36
  {
37
37
  "cell_type": "code",
38
- "execution_count": 1,
38
+ "execution_count": null,
39
39
  "id": "569394bf0a0aa7c4",
40
40
  "metadata": {
41
41
  "ExecuteTime": {
@@ -47,80 +47,8 @@
47
47
  "outputs_hidden": false
48
48
  }
49
49
  },
50
- "outputs": [
51
- {
52
- "name": "stdout",
53
- "output_type": "stream",
54
- "text": [
55
- "name: test-schema\n",
56
- "id: http://example.org/test-schema\n",
57
- "default_prefix: http://example.org/test-schema/\n",
58
- "classes:\n",
59
- " Schema:\n",
60
- " attributes:\n",
61
- " id:\n",
62
- " description: The name of the schema\n",
63
- " required: true\n",
64
- " tables:\n",
65
- " multivalued: true\n",
66
- " range: Table\n",
67
- " inlined_as_list: true\n",
68
- " tree_root: true\n",
69
- " Table:\n",
70
- " attributes:\n",
71
- " id:\n",
72
- " description: The name of the table\n",
73
- " required: true\n",
74
- " columns:\n",
75
- " multivalued: true\n",
76
- " range: Column\n",
77
- " inlined_as_list: true\n",
78
- " Column:\n",
79
- " attributes:\n",
80
- " id:\n",
81
- " description: The name of the column\n",
82
- " required: true\n",
83
- " primary_key:\n",
84
- " range: boolean\n",
85
- " datatype:\n",
86
- " range: string\n",
87
- "prefixes: {}\n"
88
- ]
89
- }
90
- ],
91
- "source": [
92
- "import yaml\n",
93
- "from linkml_runtime.linkml_model import SlotDefinition\n",
94
- "from linkml.utils.schema_builder import SchemaBuilder\n",
95
- "\n",
96
- "sb = SchemaBuilder()\n",
97
- "sb.add_class(\"Schema\", \n",
98
- " tree_root=True,\n",
99
- " slots=[\n",
100
- " SlotDefinition(\"id\", required=True, description=\"The name of the schema\"),\n",
101
- " SlotDefinition(\"tables\", range=\"Table\", multivalued=True, inlined_as_list=True),\n",
102
- " ],\n",
103
- " use_attributes=True,\n",
104
- " )\n",
105
- "sb.add_class(\"Table\",\n",
106
- " slots=[\n",
107
- " SlotDefinition(\"id\", required=True, description=\"The name of the table\"),\n",
108
- " SlotDefinition(\"columns\", range=\"Column\", multivalued=True, inlined_as_list=True),\n",
109
- " ],\n",
110
- " use_attributes=True,\n",
111
- " )\n",
112
- "sb.add_class(\"Column\",\n",
113
- " slots=[\n",
114
- " SlotDefinition(\"id\", required=True, description=\"The name of the column\"),\n",
115
- " SlotDefinition(\"primary_key\", range=\"boolean\"),\n",
116
- " SlotDefinition(\"datatype\", range=\"string\"),\n",
117
- " ],\n",
118
- " use_attributes=True,\n",
119
- " )\n",
120
- "\n",
121
- "my_metamodel = sb.as_dict()\n",
122
- "print(yaml.dump(sb.as_dict(), sort_keys=False))"
123
- ]
50
+ "outputs": [],
51
+ "source": "import yaml\nfrom linkml_runtime.linkml_model import SlotDefinition\nfrom linkml_runtime.utils.schema_builder import SchemaBuilder\n\nsb = SchemaBuilder()\nsb.add_class(\"Schema\", \n tree_root=True,\n slots=[\n SlotDefinition(\"id\", required=True, description=\"The name of the schema\"),\n SlotDefinition(\"tables\", range=\"Table\", multivalued=True, inlined_as_list=True),\n ],\n use_attributes=True,\n )\nsb.add_class(\"Table\",\n slots=[\n SlotDefinition(\"id\", required=True, description=\"The name of the table\"),\n SlotDefinition(\"columns\", range=\"Column\", multivalued=True, inlined_as_list=True),\n ],\n use_attributes=True,\n )\nsb.add_class(\"Column\",\n slots=[\n SlotDefinition(\"id\", required=True, description=\"The name of the column\"),\n SlotDefinition(\"primary_key\", range=\"boolean\"),\n SlotDefinition(\"datatype\", range=\"string\"),\n ],\n use_attributes=True,\n )\n\nmy_metamodel = sb.as_dict()\nprint(yaml.dump(sb.as_dict(), sort_keys=False))"
124
52
  },
125
53
  {
126
54
  "cell_type": "markdown",