ncihtan / data-models

Schema.org Data Models for HTAN
MIT License
14 stars 6 forks source link

Conversion to JSON-LD creates nodes with illegal characters. #77

Open majensen opened 1 year ago

majensen commented 1 year ago

When parsing the file HTAN.mdoel.jsonld with rdflib, I get the following warnings. These appear to be elements that contain special characters in their names. (I might suggest that the name is not an ideal place to record the definitions of terms, like rural/urban populations, or long term/short term quitter.)

>>> g = rdflib.Graph().parse("HTAN.model.jsonld")
http://schema.biothings.io/Mm^3 does not look like a valid URI, trying to serialize this will break\
.
http://schema.biothings.io/Cm^2 does not look like a valid URI, trying to serialize this will break\
.
http://schema.biothings.io/UrbanPopulation(population>50000) does not look like a valid URI, trying\
 to serialize this will break.
http://schema.biothings.io/RuralPopulation(population<2500) does not look like a valid URI, trying \
to serialize this will break.
http://schema.biothings.io/CurrentReformedSmokerfor>15yrs does not look like a valid URI, trying to\
 serialize this will break.
http://schema.biothings.io/CurrentReformedSmokerfor<or=15yrs does not look like a valid URI, trying\
 to serialize this will break.
http://schema.biothings.io/Mm^3 does not look like a valid URI, trying to serialize this will break\
.
http://schema.biothings.io/Cm^2 does not look like a valid URI, trying to serialize this will break\
.
http://schema.biothings.io/UrbanPopulation(population>50000) does not look like a valid URI, trying\
 to serialize this will break.
http://schema.biothings.io/RuralPopulation(population<2500) does not look like a valid URI, trying \
to serialize this will break.
http://schema.biothings.io/CurrentReformedSmokerfor>15yrs does not look like a valid URI, trying to\
 serialize this will break.
http://schema.biothings.io/CurrentReformedSmokerfor<or=15yrs does not look like a valid URI, trying\
 to serialize this will break.
>>> 
milen-sage commented 1 year ago

@majensen thanks for noting - we added it to our backlog and will take a look in the next three weeks. Let us know if this is a blocker.

aclayton555 commented 1 year ago

@elv-sb can you please update this one accordingly

aclayton555 commented 1 year ago

Confirm whether this is in staging or prod and what is left here.

aclayton555 commented 1 year ago

Everything pushed before Oct 3, should be in prod. Everything push on Oct 19th should be in staging.

elv-sb commented 1 year ago

We have fixed the cm^2 and mm^3, but we are not going to change the greater than and less than currently. These are values coming directly from submitters and we need to do an analysis to see what will be affected if those are changed.