Skip to content

Pin linkml-map to main and fix runtime 1.11 fallout#211

Open
amc-corey-cox wants to merge 1 commit into
mainfrom
bump-linkml-map-main
Open

Pin linkml-map to main and fix runtime 1.11 fallout#211
amc-corey-cox wants to merge 1 commit into
mainfrom
bump-linkml-map-main

Conversation

@amc-corey-cox
Copy link
Copy Markdown
Contributor

Prerequisite for the EML importer (#208) and adjacent adapter work that needs unreleased linkml-map features: dot-path `populated_from`, safe-builtin functions, `dictionary_key`, strict expression mode.

Pinning surfaces fallout from the linkml-runtime 1.10 → 1.11 transition:

  • `source_schema` / `target_schema` in trans-specs must be `SchemaReference` dicts (`{name: }`), not bare strings — three adapter specs updated.
  • `ClassDefinition.attributes` no longer mutates via a local alias after `add_class` (pydantic v2 copy semantics); XSD importer swaps the order so attributes are populated before registration.
  • `SlotDefinition.alias` returns `None` when not explicitly set (used to fall back to `slot.name`); `instance_extractor` now does the fallback inline.
  • 1.11 `URIorCURIE` validation is stricter; `test_infer_prefix` had used a prefix without trailing separator that expanded to a malformed URI — test data fixed.

All 160 tests pass. Revert the pin (back to a version constraint) when linkml-map 0.5.3+ releases.

Test plan

  • `pytest tests/` green (160 passed, 3 skipped)

Copilot AI review requested due to automatic review settings May 15, 2026 14:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates dependency resolution to use unreleased linkml-map behavior and adjusts affected schema/adapter/importer code for linkml-runtime 1.11 compatibility.

Changes:

  • Pins linkml-map via uv source and refreshes locked LinkML-related dependencies.
  • Updates adapter transform specs to use SchemaReference-style source_schema / target_schema.
  • Fixes runtime fallout in XSD importing, instance extraction, and an RDFS prefix test fixture.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Adds uv source override for linkml-map and changes dependency declaration.
uv.lock Refreshes locked dependency versions and records git-sourced linkml-map.
schema_automator/adapters/dbgap/dbgap_to_dd.transform.yaml Converts schema references to mapping form.
schema_automator/adapters/frictionless/dd_to_frictionless.transform.yaml Converts schema references to mapping form.
schema_automator/adapters/frictionless/frictionless_to_dd.transform.yaml Converts schema references to mapping form.
schema_automator/importers/xsd_import_engine.py Registers generated classes after attributes are populated.
schema_automator/utils/instance_extractor.py Falls back from missing slot alias to slot name.
tests/test_importers/test_rdfs_importer.py Updates prefix fixture and expected schema id with trailing slash.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment on lines +51 to +60
# Pinned to linkml-map main (see [tool.uv.sources]) — recent work
# adds dot-path populated_from, safe-builtin functions, dictionary_key,
# strict expression mode, and the SchemaReference shape for
# source/target_schema. The EML importer and the next batch of
# adapters need these. This pin also satisfies the is_str /
# is_bool / is_list predicate need that the *reverse* Frictionless
# adapter has — the xfail in tests/test_adapters/test_frictionless.py
# can come off once we're on a real release tag. Restore a version
# constraint and drop the source override here when 0.5.3+ releases.
"linkml-map",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct — [tool.uv.sources] is uv-only and the wheel's Requires-Dist is unconstrained. Not solving in this PR: we're deliberately holding this branch (and #212) until linkml-map 0.5.3 releases, at which point the pin reverts to a regular version constraint. Switching to a PEP 508 direct-URL form (linkml-map @ git+...) would propagate to pip but block any release from this state (PyPI rejects direct-URL deps), which is an even worse interim. Leaving open as a tracked concern; we expect this to be naturally resolved when 0.5.3 ships and we drop the pin.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged but by design — this PR is the temporary dev infrastructure noted in the PR body ("Revert the pin (back to a version constraint) when linkml-map 0.5.3+ releases"). The [tool.uv.sources] directive lets uv sync resolve to linkml-map main for local/CI work depending on unreleased features. Once linkml-map 0.5.3 hits PyPI, this becomes a normal >= 0.5.3 constraint in [project.dependencies] that the published wheel will carry. Leaving this thread open as a visible reminder to make that swap before merge.

@amc-corey-cox amc-corey-cox added the staged Work ready or in progress, waiting on upstream release label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

staged Work ready or in progress, waiting on upstream release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants