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

Fix component version when download from source #931

Merged
merged 7 commits into from
Jan 4, 2024
Merged

Conversation

anitacaron
Copy link
Contributor

@anitacaron anitacaron self-assigned this Sep 27, 2023
@anitacaron
Copy link
Contributor Author

I tested on the linked PR and I'm getting the error:

if [ true  = true ] && [ true  = true ]; then robot --catalog catalog-v001.xml merge -I https://raw.githubusercontent.com/hubmapconsortium/ccf-validation-tools/master/owl/UB_ASCTB_subset.owl \
annotate --ontology-iri http://purl.obolibrary.org/obo/uberon/component-download-hra_subset.owl annotate -V http://purl.obolibrary.org/obo/uberon/releases/2023-09-27/component-download-hra_subset.owl --annotation owl:versionInfo 2023-09-27 -o tmp/component-download-hra_subset.owl.owl; fi
if [ true  = true ]; then if cmp -s tmp/component-download-hra_subset.owl.owl components/hra_subset.owl ; then echo "Component identical."; \
      else echo "Component is different, updating." && robot --catalog catalog-v001.xml annotate -i component-download-hra_subset.owl --ontology-iri http://purl.obolibrary.org/obo/uberon/components/hra_subset.owl annotate -V http://purl.obolibrary.org/obo/uberon/releases/2023-09-27/components/hra_subset.owl --annotation owl:versionInfo 2023-09-27 -o components/hra_subset.owl; fi; fi
Component is different, updating.
org.semanticweb.owlapi.io.OWLOntologyInputSourceException: java.io.FileNotFoundException: component-download-hra_subset.owl (No such file or directory)
Use the -vvv option to show the stack trace.
Use the --help option to see usage information.
make: *** [Makefile:417: components/hra_subset.owl] Error 1

The output file for the rule component-download-hra_subset.owl is tmp/component-download-hra_subset.owl.owl and it's the pre-requisit in the rule components/hra-subset.owl. Is there a reason to not directly name the rule tmp/component-download-hra_subset.owl?

@anitacaron
Copy link
Contributor Author

The component test in the QC here is failing for the same reason.

@anitacaron anitacaron added this to the 1.5 milestone Sep 27, 2023
@matentzn
Copy link
Contributor

matentzn commented Oct 2, 2023

The main point was to make the rule .PHONY, so that its is always run. If its not .PHONY, you wont run this rule if none of the dependencies have changed, which can result in the weird situation that mirrors or component sources are never updated until someone explicitly runs with -B.

@anitacaron
Copy link
Contributor Author

Sorry, the QC failed because I used the wrong input file in the robot command. I fixed that, and everything is good now.

matentzn
matentzn previously approved these changes Oct 13, 2023
Copy link
Contributor

@matentzn matentzn left a comment

Choose a reason for hiding this comment

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

I think this looks great, not very elegant, but very practical, and we will probably re-use this pattern in other cases as well. I would kinda like if you could get Damien to take a look, just because this is important.

@anitacaron anitacaron merged commit 252399d into master Jan 4, 2024
1 check passed
@anitacaron anitacaron deleted the fix-components branch February 29, 2024 09:46
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