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

full test suite is failing due to missing biome/ecological succession axioms #1601

Open
turbomam opened this issue Jan 16, 2025 · 17 comments
Open
Assignees

Comments

@turbomam
Copy link
Contributor

turbomam commented Jan 16, 2025

This is a long issue. See here for proposed solutions:


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
@turbomam turbomam self-assigned this Jan 16, 2025
@turbomam
Copy link
Contributor Author

turbomam commented Jan 16, 2025

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 ae21b3b on 2024-03-06

@turbomam
Copy link
Contributor Author

turbomam commented Jan 16, 2025

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?

@turbomam turbomam reopened this Jan 16, 2025
@turbomam
Copy link
Contributor Author

turbomam commented Jan 16, 2025

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

@turbomam
Copy link
Contributor Author

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?!

@turbomam
Copy link
Contributor Author

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

@turbomam
Copy link
Contributor Author

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 $@

@turbomam
Copy link
Contributor Author

turbomam commented Jan 16, 2025

Does https://raw.githubusercontent.com/EnvironmentOntology/envo/refs/tags/v2024-07-01/envo.owl contain any conformsTo statements?

I don't see any

@turbomam
Copy link
Contributor Author

turbomam commented Jan 16, 2025

  • 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 $@

@pbuttigieg
Copy link
Member

pbuttigieg commented Jan 17, 2025

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.

@matentzn
Copy link
Collaborator

matentzn commented Jan 17, 2025

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).

@turbomam
Copy link
Contributor Author

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.

@matentzn
Copy link
Collaborator

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.

@turbomam
Copy link
Contributor Author

turbomam commented Jan 17, 2025

thanks @matentzn

Indeed, make -pn test reports

test: all_modules all_imports envo.owl all_reports validate-dl-profile validate-dl-profile sparql_test2

@turbomam
Copy link
Contributor Author

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.

@turbomam
Copy link
Contributor Author

turbomam commented Jan 17, 2025

Solution:

  1. short term: ./run.sh make all validate-dl-profile runs everything from ...make all test except for sparql_test2
  2. @turbomam should ensure that all biomes assert that they participate in some ecological succession
    • egrep 'AnnotationAssertion\(rdfs:label.*biome' envo-edit.owl

@turbomam turbomam changed the title Building master is failing due to biome DOSDP failures full test suite is failing due to biome DOSDP failures Jan 17, 2025
@turbomam turbomam changed the title full test suite is failing due to biome DOSDP failures full test suite is failing due to biome/ecological succession DOSDP failures Jan 17, 2025
@turbomam turbomam changed the title full test suite is failing due to biome/ecological succession DOSDP failures full test suite is failing due to missing biome/ecological succession axioms Jan 17, 2025
@cmungall
Copy link
Member

cmungall commented Jan 17, 2025 via email

@pbuttigieg
Copy link
Member

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

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

No branches or pull requests

4 participants