linkml / linkml-runtime

Runtime support for linkml generated models
https://linkml.io/linkml/
Creative Commons Zero v1.0 Universal
22 stars 21 forks source link

Enable passing a converter to RDFLib dumper #278

Closed cthoyt closed 9 months ago

cthoyt commented 10 months ago

Closes https://github.com/linkml/linkml/issues/1619

This pull request extends the type signature of functions in the RDFlib loader and dumper to allow passing a curies.Converter instead of a simple prefix map (if desired). The bidirected map is extracted from the converter and the respective loading/dumping procedures are not modified.

codecov[bot] commented 10 months ago

Codecov Report

Patch coverage: 74.79% and project coverage change: +0.19% :tada:

Comparison is base (74d699c) 65.86% compared to head (b16cf09) 66.06%. Report is 50 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #278 +/- ## ========================================== + Coverage 65.86% 66.06% +0.19% ========================================== Files 56 60 +4 Lines 7613 7705 +92 Branches 2012 2024 +12 ========================================== + Hits 5014 5090 +76 - Misses 2009 2025 +16 Partials 590 590 ``` | [Files Changed](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml) | Coverage Δ | | |---|---|---| | [linkml\_runtime/linkml\_model/validation.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvbGlua21sX21vZGVsL3ZhbGlkYXRpb24ucHk=) | `0.00% <0.00%> (ø)` | | | [linkml\_runtime/utils/context\_utils.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvdXRpbHMvY29udGV4dF91dGlscy5weQ==) | `73.33% <ø> (+5.00%)` | :arrow_up: | | [linkml\_runtime/loaders/loader\_root.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvbG9hZGVycy9sb2FkZXJfcm9vdC5weQ==) | `69.84% <54.28%> (+3.17%)` | :arrow_up: | | [linkml\_runtime/dumpers/rdf\_dumper.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvZHVtcGVycy9yZGZfZHVtcGVyLnB5) | `65.90% <55.55%> (-5.89%)` | :arrow_down: | | [linkml\_runtime/loaders/delimited\_file\_loader.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvbG9hZGVycy9kZWxpbWl0ZWRfZmlsZV9sb2FkZXIucHk=) | `82.85% <82.85%> (ø)` | | | [linkml\_runtime/dumpers/json\_dumper.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvZHVtcGVycy9qc29uX2R1bXBlci5weQ==) | `77.77% <84.61%> (-1.54%)` | :arrow_down: | | [linkml\_runtime/loaders/yaml\_loader.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvbG9hZGVycy95YW1sX2xvYWRlci5weQ==) | `92.30% <85.71%> (+1.00%)` | :arrow_up: | | [linkml\_runtime/utils/schemaview.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvdXRpbHMvc2NoZW1hdmlldy5weQ==) | `87.79% <88.88%> (ø)` | | | [linkml\_runtime/dumpers/delimited\_file\_dumper.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvZHVtcGVycy9kZWxpbWl0ZWRfZmlsZV9kdW1wZXIucHk=) | `89.65% <89.65%> (ø)` | | | [linkml\_runtime/dumpers/\_\_init\_\_.py](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml#diff-bGlua21sX3J1bnRpbWUvZHVtcGVycy9fX2luaXRfXy5weQ==) | `100.00% <100.00%> (ø)` | | | ... and [12 more](https://app.codecov.io/gh/linkml/linkml-runtime/pull/278?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkml) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cthoyt commented 10 months ago

@cmungall done

cmungall commented 10 months ago

Fixes https://github.com/linkml/linkml/issues/1619

cthoyt commented 9 months ago

@pkalita-lbl is there anything else needed for merge?

pkalita-lbl commented 9 months ago

Looks good to me