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

Bugfix: Equivalence issues #3

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Bugfix: Equivalence issues #3

merged 1 commit into from
Feb 22, 2024

Conversation

joeflack4
Copy link
Contributor

@joeflack4 joeflack4 commented Feb 20, 2024

Addresses:

Overview

This PR is a workaround for illogical class equivalence issues highlighted by the ontological reasoner. After applying this fix, it is expected that no such error will be thrown when running build-mondo-ingest.

Pre-merge checklist

  • Docs
    • docs/ have been added/updated OR
    • No updates to the docs necessary after careful consideration.
  • QC
    • sh run.sh make build-mondo-ingest has been run on this branch (after `docker pull obolibrary/odkfull:dev), and no errors occurred OR
    • No functional (code-related) changes to the pipeline are suggested, so no re-run is necessary.
  • Account for any new packages
    • n/a
  • Reviewed
    • Has been sufficiently reviewed by at least one review from a different team member of the Mondo Technical team.

Changes

Bugfix: Equivalence issues
Temporary fix for: ERROR org.obolibrary.robot.ReasonOperation - Only equivalent classes that have been asserted are allowed. Inferred equivalencies are forbidden.

@joeflack4 joeflack4 marked this pull request as draft February 20, 2024 23:47
@joeflack4 joeflack4 self-assigned this Feb 20, 2024
@joeflack4 joeflack4 added the bug Something isn't working label Feb 20, 2024
@joeflack4 joeflack4 force-pushed the fix-equivalence-issues branch from 8f7c919 to e4d5ea9 Compare February 21, 2024 00:03
rm -rf tmp/

tmp/output/release/icd11foundation.owl: tmp/output/intermediate1-unicode-cleaned.owl
robot remove --axioms equivalent -i $< -o $@
Copy link
Contributor Author

@joeflack4 joeflack4 Feb 21, 2024

Choose a reason for hiding this comment

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

The essential change

This is the command that applies the fix.

  • @joeflack4 Run build-mondo-ingest using the output from this to verify if it worked.

Choose a reason for hiding this comment

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

I agree, I think that line (robot remove --axioms equivalent -i $< -o $@) is fine.

I'm not sure if https://robot.obolibrary.org/remove#preserving-the-structure is also needed. I think that was needed with something in the Mondo repo in Sep 2023, but I don't recall the details or am able to find it in the repo files yet. I am leaving this note here as a reminder in case things do not look as expected.

Copy link
Contributor Author

@joeflack4 joeflack4 Feb 21, 2024

Choose a reason for hiding this comment

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

I will look at your comment tomorrow, but I just wanted to report back here that the build passed!

edit: I looked now at what you wrote yesterday; I see that this is a note for the future if needed. FYI I looked at those docs and it does look like by default the structure is preserved by default (to not preserve, you'd do --preserve-structure false, so that's good. I wonder if in Mondo they had been explicitly not preserving the structure and then later found that to be a mistake.

@@ -0,0 +1,85 @@
#!/bin/sh
Copy link
Contributor Author

@joeflack4 joeflack4 Feb 21, 2024

Choose a reason for hiding this comment

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

run.sh

This is a dependency / proxy for dependencies. Adding this file and using it is necessary to ensure the the ODK container is running, with all the correct versions of everything (e.g. robot in this case).

@twhetzel I don't like that adding this file is how I handle this dependency. The only other repo that currently does this is MedGen, and the way that I update it is to copy the run.sh manually from mondo-ingest. I did bring this up to Nico once prior, that I would prefer a solution such as a Python package that puts a wrapper around run.sh. Not a high priority I think, but would be nice eventually.

Related

Copy link

@twhetzel twhetzel Feb 21, 2024

Choose a reason for hiding this comment

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

Hmm, at the moment I'm not sure what the best solution/idea would be....

  • 1. Add ticket (low priority) to track this possible future work
  • 2. Is this step documented in the main README for mondo ingest?

Copy link
Contributor Author

@joeflack4 joeflack4 Feb 21, 2024

Choose a reason for hiding this comment

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

I may have already done (1) but it's on my todo list to check and do so shortly. Regarding (2), no and also on my todo list; may have a PR for that today!

edit:
(1) is done!

(2) done via:

Temporary fix for: ERROR org.obolibrary.robot.ReasonOperation - Only equivalent classes that have been asserted are allowed. Inferred equivalencies are forbidden.
- Update: makefile: Goal for removing equivalents axioms.
@joeflack4 joeflack4 force-pushed the fix-equivalence-issues branch from e4d5ea9 to 638cac2 Compare February 21, 2024 00:18
README.md Show resolved Hide resolved
@@ -8,8 +8,14 @@ SOURCE_URL=https://icd11files.blob.core.windows.net/tmp/whofic-2023-04-08.owl.gz
# MAIN COMMANDS / GOALS ------------------------------------------------------------------------------------------------
all: tmp/output/release/icd11foundation.owl

clean:

Choose a reason for hiding this comment

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

Is clean still being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just added that. I added it just as a command for convenience.

Choose a reason for hiding this comment

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

Is it still needed now though?

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 wasn't ever strictly needed. It's just there for convenience, and I don't think it's a harm to have such utilities.. I've seen this convention in a variety of other projects, such as in MedGen; I committed this, but this makefile goal (and much of the MedGen makefile) was copied over from a different location from work done by Chris Mungall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants