-
Notifications
You must be signed in to change notification settings - Fork 42
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
Ontology to pycram objects #191
Conversation
@@ -813,3 +874,60 @@ def reason(self, world: OntologyWorld = None, use_pellet_reasoner: bool = True) | |||
return False | |||
rospy.loginfo(f"{reasoner_name} reasoning finishes!") | |||
return True | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also provide tests for such methods. Furthermore stick to the RST docstrings.
src/pycram/ontology/ontology.py
Outdated
Returns: | ||
conceptIRI: an IRI string. If the input conceptName is already an IRI form, conceptIRI = conceptName. | ||
:param conceptName: a string containing a possibly shortened concept name | ||
:type conceptName: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types are not needed since they are annotated in the method signature
test/test_ontology.py
Outdated
@@ -69,7 +71,9 @@ def remove_sql_file(cls, sql_filepath: str): | |||
if os.path.exists(sql_journal_filepath): | |||
os.remove(sql_journal_filepath) | |||
|
|||
@unittest.skipUnless(True, 'never skip') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line does nothing. Remove it
test/test_ontology.py
Outdated
@@ -303,6 +307,52 @@ def test_ontology_save(self): | |||
self.assertTrue(self.ontology_manager.save(owl_filepath)) | |||
self.assertTrue(Path(owl_filepath).is_file()) | |||
self.assertTrue(Path(sql_filepath).is_file()) | |||
|
|||
@unittest.skipUnless(True, 'Never skip') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
@@ -116,7 +119,7 @@ def test_loaded_ontologies(self): | |||
self.assertIsNotNone(self.main_ontology) | |||
self.assertTrue(self.main_ontology.loaded) | |||
if self.ontology_manager.main_ontology_iri is SOMA_ONTOLOGY_IRI or \ | |||
self.ontology_manager.main_ontology_iri is SOMA_HOME_ONTOLOGY_IRI: | |||
self.ontology_manager.main_ontology_iri is SOMA_DFL_ONTOLOGY_IRI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.ontology_manager.main_ontology_iri is SOMA_DFL_ONTOLOGY_IRI: | |
self.ontology_manager.main_ontology_iri is SOMA_HOME_ONTOLOGY_IRI or \ | |
self.ontology_manager.main_ontology_iri is SOMA_DFL_ONTOLOGY_IRI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is meant for any SOMA onto actually
Closing this due to inactivity |
Ping. Inactivity because I wasn't sure what to do. Were there any changes requested? |
Work in progress, but started a pull request to draw attention to this.
TODOs: