Skip to content

Feature: YARRRML generator with CLI#2934

Merged
amc-corey-cox merged 6 commits into
linkml:mainfrom
lapkinvladimir:feat/yarrrmlgen
Oct 10, 2025
Merged

Feature: YARRRML generator with CLI#2934
amc-corey-cox merged 6 commits into
linkml:mainfrom
lapkinvladimir:feat/yarrrmlgen

Conversation

@lapkinvladimir

Copy link
Copy Markdown
Contributor

This PR adds a basic YARRRML generator to LinkML.

What it does

New CLI entrypoint: gen-yarrrml
Generates one YARRRML mapping per LinkML class
Subject from identifier or key slot (safe fallback if none)
Defaults: JSON source (.json~jsonpath, $.items[*])

Tests

End-to-end tests covering:

  • identifier / key slots and subject fallback
  • slot alias expansion
  • multiple classes and prefixes
  • inlined objects skipped if inlined: true
  • negative case (missing target instances) marked xfail

@codecov

codecov Bot commented Oct 10, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.82%. Comparing base (44b0b32) to head (aa7c30a).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
linkml/generators/yarrrmlgen.py 83.00% 11 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2934      +/-   ##
==========================================
+ Coverage   80.43%   83.82%   +3.39%     
==========================================
  Files         140      141       +1     
  Lines       15611    15713     +102     
  Branches     3171     3186      +15     
==========================================
+ Hits        12556    13172     +616     
+ Misses       2399     1844     -555     
- Partials      656      697      +41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matentzn

Copy link
Copy Markdown
Contributor

Aweeeesome!!!

@Ostrzyciel Ostrzyciel left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I discussed the testing approach here with @lapkinvladimir, and I think it's good – we have end-to-end testing ensuring that the mapping works and even matches schemas on both sides. So – in that regard – that's an approve :) but I'm not very familiar with the codebase in general.

@amc-corey-cox amc-corey-cox 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.

This looks good to me!

@amc-corey-cox amc-corey-cox merged commit 3b48bd0 into linkml:main Oct 10, 2025
23 checks passed
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.

4 participants