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

Schema changed, breaking our code #200

Closed
jwodder opened this issue Mar 25, 2024 · 12 comments
Closed

Schema changed, breaking our code #200

jwodder opened this issue Mar 25, 2024 · 12 comments

Comments

@jwodder
Copy link

jwodder commented Mar 25, 2024

We have a program that makes queries to URLs like http://purl.obolibrary.org/obo/NCBITaxon_10090 and extracts data from the first Class element satisfying some condition. However, the responses from these URLs recently changed so that there are no longer any Class elements; the elements seem to have been renamed to rdf:Description. Why is this happening? Is this change intentional?

CC @yarikoptic @satra

@satra
Copy link

satra commented Mar 25, 2024

@yongqunh - it looks like the xml representation has changed for the response. more generally we are interested in the details of a given URI. is there a better way to programmatically query the details instead of doing a GET on the ontobee service?

@yongqunh
Copy link
Member

There appear to be some bugs during our recent server updating. We are now doing the debugging ...
Sorry for the inconvience.

@yarikoptic
Copy link

Sorry to pester -- any progress @yongqunh ?

@yongqunh
Copy link
Member

Sorry for the delayed reply. I would like to know more about your question. You said that the responses from these URLs recently changed so no Class elements any more, and the elements seem to have been renamed to rdf:Description. Actually, I don't know what happen. Can you provide more details about this?
Note that we don't change (in any purpose) the Ontobee code; we only did some debugging to make it work, which may accidently change something, though.
So I would like to know more about your concern. Can you provide more information? Thanks.

@jwodder
Copy link
Author

jwodder commented Apr 16, 2024

@yongqunh The problem seems to have been resolved at some point; I can't tell when.

At the moment, a request to, say, http://purl.obolibrary.org/obo/NCBITaxon_10090 returns the following, which has the schema we want:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="https://ontobee.org/ontology/view/NCBITaxon?iri=http://purl.obolibrary.org/obo/NCBITaxon_10090"?>
<rdf:RDF xmlns="http://www.w3.org/2002/07/owl#"
     xml:base="http://www.w3.org/2002/07/owl"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:obo="http://purl.obolibrary.org/obo/"
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:ns3="http://purl.obolibrary.org/obo/ncbitaxon#">
    


    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Annotation properties
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->

    <AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasOBONamespace"/>
    <AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
    <AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasDbXref"/>
    <AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasAlternativeId"/>
    <AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/ncbitaxon#has_rank"/>
    


    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Datatypes
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->

    


    <!-- 
    ///////////////////////////////////////////////////////////////////////////////////////
    //
    // Classes
    //
    ///////////////////////////////////////////////////////////////////////////////////////
     -->

    


    <!-- http://purl.obolibrary.org/obo/NCBITaxon_10090 -->

    <Class rdf:about="http://purl.obolibrary.org/obo/NCBITaxon_10090">
        <rdfs:label>Mus musculus</rdfs:label>
        <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/NCBITaxon_862507"/>
        <oboInOwl:hasAlternativeId>NCBITaxon:85055</oboInOwl:hasAlternativeId>
        <oboInOwl:hasExactSynonym>house mouse</oboInOwl:hasExactSynonym>
        <oboInOwl:hasOBONamespace>ncbi_taxonomy</oboInOwl:hasOBONamespace>
        <oboInOwl:hasExactSynonym>mouse</oboInOwl:hasExactSynonym>
        <oboInOwl:hasDbXref>GC_ID:1</oboInOwl:hasDbXref>
        <ns3:has_rank rdf:resource="http://purl.obolibrary.org/obo/NCBITaxon_species"/>
    </Class>
    


    <!-- http://purl.obolibrary.org/obo/NCBITaxon_862507 -->

    <Class rdf:about="http://purl.obolibrary.org/obo/NCBITaxon_862507">
        <rdfs:label>Mus &lt;subgenus&gt;</rdfs:label>
    </Class>
    


    <!-- http://purl.obolibrary.org/obo/NCBITaxon_species -->

    <Class rdf:about="http://purl.obolibrary.org/obo/NCBITaxon_species">
        <rdfs:label>species</rdfs:label>
    </Class>
</rdf:RDF>



<!-- Generated by the OWL API (version 3.2.4.1806) http://owlapi.sourceforge.net -->

As of March 25, requests to the same URL were instead returning the following, which broke our code:

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

@yongqunh
Copy link
Member

I see. I am glad that this problem has been resolved mysteriously :-). It appears that the previous broken code has a slightly different format. It is possible that we did some debugging earlier for some debugging purpose, and their debugging resolved this issue without our notice. Anyway, it appears to be a good result.
Please let me know if you have more concern. Otherwise, we may close this issue. Thanks!

@yarikoptic
Copy link

FWIW, I have now added (after fixing for allowing larger number of redirects, see #201) a check for the target content in such a response: https://github.com/dandi/upptime/blob/master/.upptimerc.yml#L48

  - name: PURL redirect example1 (ontobee)
    url: http://purl.obolibrary.org/obo/PATO_0000384
    maxRedirects: 6
    __dangerous__body_down_if_text_missing: '<Class rdf:about="http://purl.obolibrary.org/obo/PATO_0001894">'

anyone ( @yongqunh ) wants to be added as a target for alerts happen such a test (or also ontobee just going down) fails? ;-)

@yongqunh
Copy link
Member

Sounds good. Is it monitored automatically? How it works?
Thanks.

@yarikoptic
Copy link

Ok, I will add you ;-)

Yes, automatically, see https://github.com/upptime/upptime project which pretty much provides a number of ci jobs which periodically hit the prescribed urls to get timing/availability information and then render time trends in the GitHub repo. Also it takes nice care about opening issue when resource disappears, it closing it when it reemerges

@ontoden
Copy link
Contributor

ontoden commented Apr 17, 2024 via email

yarikoptic added a commit to dandi/upptime that referenced this issue Apr 17, 2024
@yarikoptic
Copy link

did assignment of @yongqunh in dandi/upptime@702fe03

Feel welcome to submit PR if want to have others added. I guess we could consider this issue resolved for now AFAIK ;)

@yongqunh
Copy link
Member

Great. I will then close this issue for now. Thanks.

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

5 participants