Open kervel opened 1 year ago
Merging #251 (814b03e) into main (b992fe0) will increase coverage by
0.61%
. The diff coverage is70.70%
.
:mega: 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
Impacted Files | Coverage Δ | |
---|---|---|
linkml_runtime/index/object_index.py | 88.28% <12.50%> (-3.53%) |
:arrow_down: |
linkml_runtime/dumpers/rdflib_dumper.py | 94.94% <40.00%> (-2.97%) |
:arrow_down: |
linkml_runtime/utils/context_utils.py | 68.33% <50.00%> (-1.85%) |
:arrow_down: |
linkml_runtime/utils/schemaview.py | 83.29% <54.83%> (-3.11%) |
:arrow_down: |
linkml_runtime/utils/curienamespace.py | 93.44% <92.72%> (+8.82%) |
:arrow_up: |
linkml_runtime/__init__.py | 100.00% <100.00%> (ø) |
|
linkml_runtime/utils/namespaces.py | 73.37% <100.00%> (+2.48%) |
:arrow_up: |
linkml_runtime/utils/yamlutils.py | 79.44% <100.00%> (+1.29%) |
:arrow_up: |
... 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:
linkml-runtime/utils/namespaces.py
@hsolbrig seems you wrote a big part of that ? Couldn't we just use that one ?NamespaceCatalog
proposed in this PR, which is basically now a convenience to create a CurieConverter without figuring out what is a synonym of what.gen-namespaces.py
which also generates a namespaces-like class, but the name is hardcoded to BiolinkNamespace
Update i tried to use Namespaces
, it misses a few convenience functions: i have to deal with values that are uriorcurie
which means they might be an uri or a curie. Namespaces doesn't have a function that goes from uriorcurie to uri or to curie, you have to know in advance if its an uri or a curie. I could add those instead of this PR.
Should we perhaps open an issue for implementing a Namespace function that goes from uriorcurie
to uri or curie?
This PR introduces a new class
CurieNamespaceCatalog
that 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 https://github.com/linkml/linkml/pull/1257
after merging this PR, we will need to update poetry.lock (can't do it here or we will get merge conflicts)