dandi / dandi-cli

DANDI command line client to facilitate common operations
https://dandi.readthedocs.io/
Apache License 2.0
22 stars 27 forks source link

`test_parseobourl` failing due to change in ontobee schema #1424

Closed jwodder closed 7 months ago

jwodder commented 8 months ago

The test_parseobourl test in test_metadata.py is currently failing because parse_purlobourl() is returning None for all input URLs. It appears that the XML documents returned by the URLs no longer have Class elements (which parse_purlobourl() looks for) and that they have been replaced with rdf:Description.

Example current response for http://purl.obolibrary.org/obo/NCBITaxon_10090:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="https://ontobee.org/ontology/view/NCBITaxon?iri=http://purl.obolibrary.org/obo/NCBITaxon_10090"?>
<!DOCTYPE rdf:RDF [
<!ENTITY obo 'http://purl.obolibrary.org/obo/'>
<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<!ENTITY oboInOwl 'http://www.geneontology.org/formats/oboInOwl#'>
]>

<rdf:RDF xmlns:obo="http://www.geneontology.org/formats/oboInOwl#"  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"  xmlns:owl="http://www.w3.org/2002/07/owl#"  xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"  xmlns:dc="http://purl.org/dc/elements/1.1/"  xmlns:foaf="http://xmlns.com/foaf/0.1/"  xmlns:ns3="http://purl.obolibrary.org/obo/ncbitaxon#" >
<rdf:Description rdf:about="&obo;NCBITaxon_10090">
    <rdf:type rdf:resource="&owl;Class" />
    <rdfs:label>Mus musculus</rdfs:label>
    <rdfs:subClassOf rdf:resource="&obo;NCBITaxon_862507" />
    <obo:hasAlternativeId>NCBITaxon:85055</obo:hasAlternativeId>
    <obo:hasDbXref>GC_ID:1</obo:hasDbXref>
    <obo:hasExactSynonym>mouse</obo:hasExactSynonym>
    <obo:hasExactSynonym>house mouse</obo:hasExactSynonym>
    <obo:hasOBONamespace>ncbi_taxonomy</obo:hasOBONamespace>
    <ns3:has_rank rdf:resource="&obo;NCBITaxon_species" />
  </rdf:Description>
<rdf:Description rdf:about="&obo;NCBITaxon_862507">
    <rdf:type rdf:resource="&owl;Class" />
  </rdf:Description>
<rdf:Description rdf:about="&obo;NCBITaxon_species">
    <rdf:type rdf:resource="&owl;Class" />
  </rdf:Description>
<rdf:Description rdf:about="&obo;NCBITaxon_862507">
    <rdfs:label>Mus &lt;subgenus&gt;</rdfs:label>
  </rdf:Description>
<rdf:Description rdf:about="&obo;NCBITaxon_species">
    <rdfs:label>species</rdfs:label>
  </rdf:Description>
</rdf:RDF>
yarikoptic commented 8 months ago

could you please file an issue with https://github.com/OntoZoo/ontobee to discuss this change? we don't have an example of prior record in full do we?

jwodder commented 8 months ago

@yarikoptic

could you please file an issue with https://github.com/OntoZoo/ontobee to discuss this change?

I think @satra should do that, as he's the one who wrote the function for fetching data from ontobee in the first place, and thus he should be more familiar with the service.

we don't have an example of prior record in full do we?

No.

jwodder commented 8 months ago

@yarikoptic Issue filed: https://github.com/OntoZoo/ontobee/issues/200

yarikoptic commented 7 months ago

I think this was fixed on the side of ontobee