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

Fix: Add none tag to non tagged labels by language #182

Conversation

Bilelkihal
Copy link
Collaborator

Issue description:

    <owl:Class rdf:about="http://purl.obolibrary.org/obo/CDNO_0000024">
        <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/CDNO_0000012"/>
        <rdfs:label rdf:datatype="http://www.w3.org/XML/1998/namespacestring">dietary fluorine</rdfs:label>
    </owl:Class>

This class in the ontology FOODON has a label that is not plain text but is typed with an rdf:datatype. As a result, it is not tagged with any language in Goo. This causes an issue where the label is returned as an array, breaking the code.

Changes

  • Updated the code to handle cases where class labels are returned as an array by converting the array of labels to a hash, assigning a language: none key to ensure proper handling.

@Bilelkihal Bilelkihal self-assigned this Jan 22, 2025
@Bilelkihal Bilelkihal added the bug label Jan 22, 2025
Copy link
Collaborator Author

@Bilelkihal Bilelkihal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@syphax-bouazzouni syphax-bouazzouni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, just add that line to the unit test you added.

@Bilelkihal
Copy link
Collaborator Author

Bilelkihal commented Jan 22, 2025

Using the code done in this PR + ontoportal-lirmm/goo#68
I successfully parsed the ontologies: FOODON, CDNO and PCSM on my local.
I will deploy them to stage and test this on stage too.

@syphax-bouazzouni syphax-bouazzouni merged commit 194fcfb into development Jan 24, 2025
23 of 24 checks passed
@Bilelkihal
Copy link
Collaborator Author

APTO also is parsed successfully

@Bilelkihal
Copy link
Collaborator Author

OBA also is parsed successfully

@syphax-bouazzouni
Copy link

OBA also is parsed successfully

@Bilelkihal comment the parsed ontologies in the issue agroportal/project-management#628 not in this already closed PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants