phyloref / phylo2owl

Tool to convert phylogenies to OWL ontologies
MIT License
4 stars 2 forks source link

Extend test suite to test all available files #19

Closed gaurav closed 7 years ago

gaurav commented 7 years ago

Instead of maintaining lists of files to be tested within the test suite, I've modified it to automatically identify sets of files that can be tested. This means that new test files can be added to examples/trees without modifying the test suite in any way. Lists of files that were tested are reported to Travis-CI (see https://travis-ci.org/gaurav/phylo2owl/builds/193234121#L335).

Each test uses different files as input; for example, if the folder contains an Newick file (with a .tre extension) and an OWL file (with an .owl extension), then the test suite will automatically run phylo2owl.py on the Newick file and compare its output with the OWL file. Similarly, all OWL files in examples/trees will be validated using the generic Node shape. Any file-specific SHACL shapes will be tested if the appropriate file (e.g. pg_2357.shacl.ttl) if present, but won't be tested if that file is missing or misspelled -- in which case the test will be reported as skipped (see example).

gaurav commented 7 years ago

@hlapp This looks like it's working again -- and with pretty testing output! Let me know if you think it's ready: meanwhile, the crowl_et_al experiment branch is passing all tests and is ready to go as well! I'll make a separate pull request for that once we close this one.

gaurav commented 7 years ago

I think we should preserve the series: it might be handy to remember what each separate piece does and the fixes necessary to make it all work. I'll remember to recommend one or the other on every pull request!

hlapp commented 7 years ago

That would be a better name, but unfortunately conftest.py is the hardcoded configuration file name for py.test.

I wasn't aware of that, and I think that answers the question as to whether the name is a good idea or not.