INCATools / ontology-development-kit

Bootstrap an OBO Library ontology
http://incatools.github.io/ontology-development-kit/
BSD 3-Clause "New" or "Revised" License
214 stars 54 forks source link

Fix component version when download from source #931

Closed anitacaron closed 6 months ago

anitacaron commented 10 months ago

Related to https://github.com/obophenotype/uberon/pull/2975

anitacaron commented 10 months ago

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 commented 10 months ago

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

matentzn commented 9 months ago

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 commented 9 months ago

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