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

Fix namespaces CURIE prefix & suffix extraction #308

Closed vincentkelleher closed 3 months ago

vincentkelleher commented 4 months ago

Motivation Behind This

While working on the LinkML JSON-LD Context generator, I chose to use the namespaces.py prefix_suffix(..) method to build @id attributes.

Then, I started having issues with the test_curie_prefix_matching.py test class (BTW thanks to the developer of this class 👍 ) which has very specific CURIEs like p1:/c/c1 for example.

Solution

I went through the CURIE specification to find which types of CURIEs should be supported and I added them to the test_namespaces.py test class to make sure specific cases were managed.

The solution I propose is straightforward but as this method is used in many places, the impacts can be big. I have a pull request coming up to update the LinkML project with my JSON-LD Context generator developments and test updates.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 62.91%. Comparing base (27b9158) to head (d409e57). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #308 +/- ## ========================================== + Coverage 62.88% 62.91% +0.02% ========================================== Files 62 62 Lines 8528 8528 Branches 2436 2436 ========================================== + Hits 5363 5365 +2 + Misses 2554 2553 -1 + Partials 611 610 -1 ```

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

vincentkelleher commented 3 months ago

Thanks @cmungall 🙏