full test suite is failing due to missing biome/ecological succession axioms
This is a long issue. See here for proposed solutions:
- https://github.com/EnvironmentOntology/envo/issues/1601#issuecomment-2598485531
running ./run.sh make all test includes this
robot \
--catalog catalog-v001.xml merge \
-i envo-edit-module-merged.owl \
-i modules/tags.owl verify \
--queries sparql/dosdp-conforms-violation.sparql \
-O reports/
which terminates with the following output:
FAIL Rule sparql/dosdp-conforms-violation.sparql: 17 violation(s) envo_id,label http://purl.obolibrary.org/obo/ENVO_01001838,arid biome http://purl.obolibrary.org/obo/ENVO_01001830,tropical biome http://purl.obolibrary.org/obo/ENVO_00002030,aquatic biome http://purl.obolibrary.org/obo/ENVO_01001832,subtropical biome http://purl.obolibrary.org/obo/ENVO_01001837,subalpine biome http://purl.obolibrary.org/obo/ENVO_01001834,subpolar biome http://purl.obolibrary.org/obo/ENVO_01001831,temperate biome http://purl.obolibrary.org/obo/ENVO_01001836,montane biome http://purl.obolibrary.org/obo/ENVO_01000339,polar biome http://purl.obolibrary.org/obo/ENVO_00000446,terrestrial biome http://purl.obolibrary.org/obo/ENVO_01000176,shrubland biome http://purl.obolibrary.org/obo/ENVO_01001369,tidal mangrove shrubland http://purl.obolibrary.org/obo/ENVO_01000218,xeric shrubland biome http://purl.obolibrary.org/obo/ENVO_00000893,xeric basin biome http://purl.obolibrary.org/obo/ENVO_01000219,anthropogenic terrestrial biome http://purl.obolibrary.org/obo/ENVO_01001833,mediterranean biome http://purl.obolibrary.org/obo/ENVO_01001835,alpine biome make: *** [envo.Makefile:41: sparql_test2] Error 1
That robot query is called by target sparql_test2 in src/envo/envo.Makefile
which is aliased as
test: sparql_test2
and included into src/envo/Makefile
include envo.Makefile
src/envo/sparql/dosdp-conforms-violation.sparql
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix MONDO: <http://purl.obolibrary.org/obo/MONDO_>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix oio: <http://www.geneontology.org/formats/oboInOwl#>
SELECT ?envo_id ?label WHERE {
?envo_id rdfs:subClassOf+ <http://purl.obolibrary.org/obo/ENVO_00000428> .
?envo_id rdfs:label ?label .
FILTER NOT EXISTS {
?envo_id <http://purl.org/dc/terms/conformsTo> <http://purl.obolibrary.org/obo/envo/patterns/biome.yaml> .
}
}
From @matentzn in ae21b3b7a6dc1e1a44818632fa9fa644708cdfdb on 2024-03-06
Is that SPARQL meant to be taken literally in the sense that it looks for <http://purl.org/dc/terms/conformsTo> statements, or does it invoke some magic in which triples are actually checked against the DOSDP patterns?
It looks like src/envo/*Makefile has multiple test targets:
find . -type f -name '*Makefile*' -exec grep -H '^\s*test:' {} +
./Makefile:test: all_modules all_imports envo.owl all_reports validate-dl-profile ./Makefile:test: validate-dl-profile ./envo.Makefile:test: sparql_test2
I think all calls everything from all of those test targets except validate-dl-profile and sparql_test2
validate-dl-profile appears to work
sparql_test2 seems to be the source of the problem
there's also a test_python that just confirms that python is installed?!
find ../.. -iname '*makefile*'
../../Makefile ../../mappings/Makefile ../../src/gaz/Makefile ../../src/gaz/diffs/Makefile ../../src/envo/sources/Makefile ../../src/envo/Makefile ../../src/envo/mappings/Makefile ../../src/envo/envo.Makefile ../../src/envo/diffs/Makefile
I probably need to learn more about
tmp/tags-dosdp.owl: tmp/tags-dosdp.tsv
$(ROBOT) merge -i $(SRC) template --template $< --output $@
modules/tags.owl: tmp/tags-dosdp.owl
$(ROBOT) merge $(addprefix -i , $^) annotate --ontology-iri $(ONTBASE)/$@ -o $@
Does https://raw.githubusercontent.com/EnvironmentOntology/envo/refs/tags/v2024-07-01/envo.owl contain any conformsTo statements?
I don't see any
- src/envo/tmp/tags-dosdp.owl
- src/envo/tmp/tags-dosdp.tsv
are both present but they only assert the conformsTo on ENVO:00000428 'biome', not any biome subclasses
and that one assertion doesn't make it into envo.owl
possibly need to learn more about src/envo/util/dosdp-matches-tags.py, which is called by src/envo/envo.Makefile
tmp/tags-dosdp.tsv:
python $(SCRIPTDIR)/dosdp-matches-tags.py $(addprefix -d , $(MATCHED_TSVs)) -o $@
possibly a mismatch between how the pattern file was written and how I phrased / axiomatised the biome defs in the end.
The former should be adapted to the latter.
Too complicated to write in text, please both watch this 4 minute video explaining the situation:
https://www.loom.com/share/c943c088848f4d418a901ee85658a4e6
@pbuttigieg in essence you are right (its about inconsistent patterns being used).
Thanks guys. I will watch the video in a few minutes.
What you you think about the related issue of multiple test targets in src/envo/Makefile (including importation of other Makefiles)? I would like to have one single test target and rename the others if its important to keep them. I can open a new issue for this if you want.
What you you think about the related issue of multiple test targets in src/envo/Makefile (including importation of other Makefiles)? I would like to have one single test target and rename the others if its important to keep them. I can open a new issue for this if you want.
There are not multiple test goals - actually there is none in the strict sense of the word "goal"; all there is is a target for which dependencies are being specified in multiple places in the Makefile. so:
test: check_1
....
test: check_2
Just means that both check_1 and check_2 are dependencies for test. Its a usual pattern we have for many of our makefiles - I guess there are good reason for and against this; but its not just ENVO for sure.
thanks @matentzn
Indeed, make -pn test reports
test: all_modules all_imports envo.owl all_reports validate-dl-profile validate-dl-profile sparql_test2
That was an excellent video and I'm glad we have that test. Maybe yesterday was just the first time I ever ran the test target? Always just ran all in the past? Hard to believe.
I think I had actually offered to add (participates in some ecological succession) to all biomes a while ago and just didn't do it. I have a sense that some biomes are written into envo-edit.owl and others are generated from a ROBOT template. I have very week DOSDP skills so am a little intimidated by this task.
Solution:
- short term:
./run.sh make all validate-dl-profileruns everything from...make all testexcept forsparql_test2 - @turbomam should ensure that all biomes assert that they participate in some ecological succession
-
egrep 'AnnotationAssertion\(rdfs:label.*biome' envo-edit.owl
-
Note that not all biomes can be defined this way without also introducing the ecosystem shadow (some are directly defined eg by quality)
If we in fact decided that let’s make sure there is a clear assigned ticket
On Fri, Jan 17, 2025 at 6:18 AM Mark Andrew Miller @.***> wrote:
That was an excellent video and I'm glad we have that test. Maybe yesterday was just the first time I ever ran the test target? Always just ran all in the past? Hard to believe.
I think I had actually offered to add (participates in some ecological succession) to all biomes a while ago and just didn't do it. I have a sense that some biomes are written into envo-edit.owl and others are generated from a ROBOT template. I have very week DOSDP skills so am a little intimidated by this task.
— Reply to this email directly, view it on GitHub https://github.com/EnvironmentOntology/envo/issues/1601#issuecomment-2598469156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMMOKHEKXA5P5F7ZSHUL32LEGM3AVCNFSM6AAAAABVKJBBS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJYGQ3DSMJVGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Note that not all biomes can be defined this way without also introducing the ecosystem shadow
There should indeed be an ecosystem class for each one. The quality will be on the ecosystem, and inherited by the biome class