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

Updated Triplestore.add_function() to also support EMMO. #67

Merged
merged 5 commits into from
Jan 26, 2023

Conversation

jesper-friis
Copy link
Contributor

Closes #65

@jesper-friis jesper-friis linked an issue Jan 25, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2023

Codecov Report

Base: 67.06% // Head: 67.07% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (75dc2c7) compared to base (b5afd8d).
Patch coverage: 68.62% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
+ Coverage   67.06%   67.07%   +0.01%     
==========================================
  Files          14       14              
  Lines        1014     1063      +49     
==========================================
+ Hits          680      713      +33     
- Misses        334      350      +16     
Impacted Files Coverage Δ
tripper/mappings/mappings.py 48.16% <18.18%> (-1.46%) ⬇️
tripper/triplestore.py 78.26% <82.50%> (+0.62%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

This was referenced Jan 25, 2023
hasInput = EMMO.EMMO_36e69413_8c59_4799_946c_10b05d266e22
hasOutput = EMMO.EMMO_c4bace1d_4db0_4cd3_87e9_18122bae2840
# Software = EMMO.EMMO_8681074a_e225_4e38_b586_e85b0f43ce38
# hasSoftware = EMMO.Software # TODO: fix
Copy link
Contributor

Choose a reason for hiding this comment

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

How hard would this be to fix? Can you provide more information?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It requires that we add the hasSoftware object property to EMMO - easy to do, but will take time since it should be quickly discussed in the EMMO team

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem. Just write something like "requires the hasSoftware object property which is not currently implemented in EMMO". This will make it easier if someone other than you ends up fixing the todo :)

@@ -646,3 +658,55 @@ def _add_function_fno(self, func, expects, returns, base_iri):
lst = lst_next

return func_iri

def _add_function_emmo(self, func, expects, returns, base_iri):
"""Implementing add_function() for EMMO."""
Copy link
Contributor

@daniel-sintef daniel-sintef Jan 26, 2023

Choose a reason for hiding this comment

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

Do we need a docstring? E.g, I have no clue what this function it does or what its arguments are for...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an EMMO-specific implementation of the public method add_function(), which is documented above.

I will add a few more words...

@@ -0,0 +1,119 @@
"""Test Triplestore.add_function()"""
# pylint: disable=invalid-name
Copy link
Contributor

Choose a reason for hiding this comment

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

Very glad to see test added with the code :)

@jesper-friis jesper-friis requested review from daniel-sintef and removed request for francescalb January 26, 2023 14:50
@jesper-friis jesper-friis merged commit 13c64ee into main Jan 26, 2023
@jesper-friis jesper-friis deleted the 65-use-emmo-instead-of-fno branch January 26, 2023 15:21
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.

Describe functions with EMMO instead of FnO
4 participants