Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance import_map functionality to support namespace as well as indi… #162

Merged
merged 2 commits into from
Apr 12, 2022

Conversation

hsolbrig
Copy link
Contributor

@hsolbrig hsolbrig commented Apr 9, 2022

…vidual file mapping.

Also separated out import mapping code so that linkml can use the same code as the utilities.

…vidual file mapping.

Also separated out import mapping code so that linkml can use the same code as the utilities.
@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2022

Codecov Report

Merging #162 (9b63569) into main (482a7c2) will increase coverage by 1.26%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #162      +/-   ##
==========================================
+ Coverage   62.54%   63.81%   +1.26%     
==========================================
  Files          49       49              
  Lines        5219     5217       -2     
  Branches     1468     1463       -5     
==========================================
+ Hits         3264     3329      +65     
+ Misses       1593     1523      -70     
- Partials      362      365       +3     
Impacted Files Coverage Δ
linkml_runtime/utils/context_utils.py 55.93% <100.00%> (+7.93%) ⬆️
linkml_runtime/utils/schemaview.py 84.49% <100.00%> (+0.23%) ⬆️
linkml_runtime/utils/schemaops.py 74.00% <0.00%> (-6.44%) ⬇️
linkml_runtime/utils/namespaces.py 70.44% <0.00%> (+0.62%) ⬆️
linkml_runtime/utils/eval_utils.py 79.78% <0.00%> (+6.38%) ⬆️
linkml_runtime/__init__.py 100.00% <0.00%> (+10.52%) ⬆️
linkml_runtime/utils/dataclass_extensions_376.py 65.28% <0.00%> (+47.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12ddc4f...9b63569. Read the comment docs.

@hsolbrig
Copy link
Contributor Author

hsolbrig commented Apr 9, 2022

@cmungall - I need this to be in pypi before I can commit a corresponding linkml change. What is the process these days?

@cmungall
Copy link
Member

cmungall commented Apr 9, 2022

same as before - just make a new github release, actions will propagate to pypi

See the docs: https://github.com/linkml/linkml-runtime/blob/main/CONTRIBUTING.md#release-process

@@ -50,6 +50,17 @@ def to_file_uri(fname: str) -> str:
JsonObj(**{"@context": context_list[0] if len(context_list) == 1 else context_list})


def map_import(importmap: Dict[str, str], namespaces: Callable[[None], "Namespaces"], imp: Any) -> str:
sname = str(imp)
Copy link
Member

Choose a reason for hiding this comment

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

a docstring would be great here

@cmungall cmungall merged commit b75feaa into main Apr 12, 2022
@cmungall cmungall deleted the hsolbrig/parse_import_map branch April 12, 2022 23:57
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.

3 participants