CurieNamespace catalog that is not a singleton and that uses curies#251
CurieNamespace catalog that is not a singleton and that uses curies#251kervel wants to merge 3 commits intolinkml:mainfrom
Conversation
It is my understanding that we are supposed to use the curies package, but it isn't clear how one would add maps incrementally (see: tests/test_utils/test_curienamespace.py#113 as an example). Any solution that passes test_curienamespace.py should do.
79a852e to
814b03e
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #251 +/- ##
==========================================
+ Coverage 63.54% 64.16% +0.61%
==========================================
Files 53 53
Lines 6117 6284 +167
Branches 1650 1701 +51
==========================================
+ Hits 3887 4032 +145
+ Misses 1774 1770 -4
- Partials 456 482 +26
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
i just discovered we also have "namespacegen.py" which generates a python file that ... can be used to do expand/compress. so i have the impression that we have 100 ways to fix the "how to expand/compress uri's" problems. so for an outsider it would be a bit strange to say look with namespacegen you can generate a Namespace object (which doesn't use the Namespaces class , which also can serve the same purpose btw), but if you then use pythongen we won't use that file to do exactly this. so we have:
Update i tried to use |
|
Should we perhaps open an issue for implementing a Namespace function that goes from |
|
@kervel I have moved the work on this PR into the repo branch curienamespace_index_catalogclass . If you would like to continue this work please re-open the PR on the mono-repo after the merge from that branch. We'll lift it over for you so it should take less effort. This will have a slight rename in the linkml repo but you will be able to re-open it there. |
This PR introduces a new class
CurieNamespaceCatalogthat can convert between uries and curies using https://github.com/cthoyt/curiesIts main reason of existence is the detection of uri and curie synonyms in the given CurieNamespaces to create the converter in the correct way.
It is based on linkml #1244 with two modifications:
This PR is needed to complete linkml/linkml#1257
after merging this PR, we will need to update poetry.lock (can't do it here or we will get merge conflicts)