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

Implement basic COB alignment check in new ODK ROBOT plugin #1175

Open
matentzn opened this issue Feb 4, 2025 · 8 comments
Open

Implement basic COB alignment check in new ODK ROBOT plugin #1175

matentzn opened this issue Feb 4, 2025 · 8 comments
Assignees

Comments

@matentzn
Copy link
Contributor

matentzn commented Feb 4, 2025

@gouttegd is adding an ODK specific ROBOT plugin in #1174;

The next big phase in OBO Foundry is to roll out COB widely. I would like to request the following pipeline:

odk:validate-cob (I don't yet what parameters are needed).

The pipeline:

  1. Downloads the latest release of COB
  2. Checks if all base IRIs are aligned with COB by determining if they are subclasses of at least one COB class.
  3. Produces a report ala robot report that lists all top-level classes that are currently not aligned with COB and returns a 1 exit code

I can see that functionality moving to ROBOT eventually, but I would like to try it first here.

@gouttegd I might have someone that would be interested to help us implementing stuff like this, but I am not sure if it is worth the learning curve; do you agree with this issue here in general? Not sure how familiar you are with COB and OBO Foundry, maybe you need some more context?

@gouttegd
Copy link
Contributor

gouttegd commented Feb 4, 2025

do you agree with this issue here in general?

Yeah, sounds good. Modulo one thing:

I would prefer such a validation pipeline not to be tied specifically to COB. Instead, I would rather have it take any “upper ontology” as argument (COB or something else), and check that all base IRIs are subclasses of at least one class of that upper ontology.

This is for the sake of people who use the ODK to maintain ontologies that are not part of the OBO Foundry (we know there are some, though they are likely a minority) and who might not be interested in COB alignment.

@gouttegd
Copy link
Contributor

gouttegd commented Feb 4, 2025

(COB support can still be hardcoded in such a plugin for convenience, for example with a --use-cob option or similar.)

@gouttegd gouttegd self-assigned this Feb 4, 2025
@gouttegd
Copy link
Contributor

gouttegd commented Feb 4, 2025

@matentzn Assigning myself for now. Happy to step back if you want to use this feature request to train someone in how to write a ROBOT command.

@matentzn
Copy link
Contributor Author

matentzn commented Feb 4, 2025

I would prefer such a validation pipeline not to be tied specifically to COB. Instead, I would rather have it take any “upper ontology” as argument (COB or something else), and check that all base IRIs are subclasses of at least one class of that upper ontology.

Even better! Agreed.

@matentzn Assigning myself for now. Happy to step back if you want to use this feature request to train someone in how to write a ROBOT command.

I'd rather you tell me - I have someone, but I was going to let them do this only if you said you were not interested; the reason is that for you or me, this issue will take a fraction of the time it would take someone that has never seen the OWL API before :D

@gouttegd
Copy link
Contributor

gouttegd commented Feb 4, 2025

I'd rather you tell me - I have someone, but I was going to let them do this only if you said you were not interested; the reason is that for you or me, this issue will take a fraction of the time it would take someone that has never seen the OWL API before :D

OK, I’ll do it then.

(Am I jumping at an opportunity to write some code because I’d rather do that than migrate curation data from one database to another? You have no proof.)

gouttegd added a commit that referenced this issue Feb 4, 2025
We add a new option in the 'robot_report' section called
'upper_ontology'. If set, it should be the (resolvable) IRI of an upper
ontology (such as http://purl.obolibrary.org/obo/cob.owl).

When set, a a new report is added to the list of ROBOT report, one that
tests whether all classes of the ontology are classified under one of
the classes of the upper ontology. The new report uses the same
parameters as the standard ROBOT reports regarding the file to perform
the check on ('report_on') and whether the check should be limited to
classes within the project's namespaces or not ('use_base_iris').

See #1175
@gouttegd
Copy link
Contributor

gouttegd commented Feb 4, 2025

Experimental ROBOT command is here.

Tentative exploitation in a ODK pipeline is in my current experimental PR about an ODK plugin.

(I have tested the ROBOT command; I have not tested the ODK pipeline yet, it might very well contain a stupid Jinja2 mistake.)

@gouttegd
Copy link
Contributor

gouttegd commented Feb 5, 2025

it might very well contain a stupid Jinja2 mistake.

... And indeed it seems it does. I’ll look into that later.

gouttegd added a commit to gouttegd/exp-robot-plugin that referenced this issue Feb 5, 2025
As per request (see
INCATools/ontology-development-kit#1175), when
producing a report, it should only list the *top-level* unaligned
classes, not their descendants.
@matentzn
Copy link
Contributor Author

matentzn commented Feb 6, 2025

This is super cool, THANKS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants