Skip to content

feat(overlay_sssom): replay mappings on linkml schemas - #177

Open
noelmcloughlin wants to merge 1 commit into
linkml:mainfrom
lmodel:copier
Open

feat(overlay_sssom): replay mappings on linkml schemas#177
noelmcloughlin wants to merge 1 commit into
linkml:mainfrom
lmodel:copier

Conversation

@noelmcloughlin

Copy link
Copy Markdown
Contributor

This PR has two purposes:

  1. Supply two demo SSSOM TSV mapping files.
  2. Supply script to replay mappings onto the LinkML Schema, with unit test, idempotent.

See #176

@noelmcloughlin

Copy link
Copy Markdown
Contributor Author

Charlie Hodt suggested using sssom instead so moving back to draft

@matentzn

matentzn commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@noelmcloughlin two meta observations from my side:

  1. can you add a spec of what you are doing here to the issue? Without asking my agent, its incredibly difficult to understand what is happening (no mental model of the term "replay"; a loooot of code etc).
  2. Not sure if everyone that uses copier w/o an option would want to see SSSOM demo files - my guess is that most folks will just continue to manually curate the mappings in the schema files themselves
  3. Anything you can do to reduce the number of lines in the code would be much appreciated
  4. sssom is a pretty heavy dependency (for no good reason) so again we should see that somehow its inclusion is kept optional

Thanks for working on this!

@noelmcloughlin

noelmcloughlin commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Hi Nico,
Apologies for my sloppiness but I was not intending to contribute this feature until I realized there was demand (Inge is interested also) so i got Claude's to consolidate my fragmented variants of this script into single version. I was thinking about reusing sssom but we agreed to keep out of scope.

Done:

  • I updated commit with smaller script (happy path)
  • Added src/slug/mappings/README.md.jinja which is closest thing to a specificiaton

Is this forced design?

  • No - people in a hurry (no example schema) get no example sssom files - everyone else selecting "yes" to "example schema" is sending a strong signal they should receive example sssom files (learners, new adopters, not in hurry, non-production phase).

  • Maybe - The files scripts/overlay_sssom.py and src/{{project_slug}}/mappings/README.md are always supplied because it offers adoption path.

We should be clear about benefit- nobody should be editing LinkML to manage mappings - mappings are independent artifacts with different audience, lifecycle, and semantics - I see no conflict forcing adoption path into LinkML project copier - projects that edit LinkML mappings directly should consider moving to sssom.

@noelmcloughlin
noelmcloughlin marked this pull request as ready for review July 2, 2026 12:55

@matentzn matentzn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. Can we make use of sssom explicitly OPT-IN at copier.yaml level?
  2. Not so sure TSVs should be SOTA for all cases. Most LinkML users will want to continue the exact_mappings route in the model - are we offering any "exports" for ths case?

Comment thread template/scripts/overlay_sssom.py Outdated
Comment thread template/scripts/overlay_sssom.py Outdated
Comment thread template/pyproject.toml.jinja Outdated
@noelmcloughlin
noelmcloughlin marked this pull request as ready for review July 21, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants