biolink / biolinkml

DEPRECATED: replaced by linkml
https://github.com/linkml/linkml
Creative Commons Zero v1.0 Universal
23 stars 12 forks source link

YUML string generated by yumlgen is broken #118

Closed deepakunni3 closed 4 years ago

deepakunni3 commented 4 years ago

When we generate a YUML string for a class, the string does not resolve to a proper URL.

http://yuml.me/diagram/nofunky;dir:TB/class/\[ControlledTermValue]<env_medium%201..1-++\[Biosample&#124;id:string%20%3F;name:string%20%3F;alternate_identifiers:string%20*;description(i):string%20%3F],%20\[ControlledTermValue]<env_local_scale%201..1-++\[Biosample],%20\[ControlledTermValue]<env_broad_scale%201..1-++\[Biosample],%20\[TextValue]<depth%200..1-++\[Biosample],%20\[GeolocationValue]<lat_lon%201..1-++\[Biosample],%20\[BiosampleProcessing]++-%20has%20input%200..*>\[Biosample],%20\[NamedThing]^-\[Biosample]

Based on trial and error, here are the characters that need replacing before the URL is working again:

img_url.replace(' ', '%20')
img_url.replace('<', '%3C')
img_url.replace('^', '%5E')
img_url.replace('>', '%3E')
img_url.replace('|', '%7C')

Also, the HTML equivalent of '|' (&#124;) is incompatible. It should be left as-is and URL encoded.

cmungall commented 4 years ago

See

"UPDATE: As of March 18th 2020, class diagrams are parsed in a new way. They're a bit more picky! We've tested 100's of diagrams without issue. If you hit an issue, please report it on the forum and we'll fix them quickly."

hsolbrig commented 4 years ago

To the best of my knowledge this has been fixed. The biggest challenge here is YUML in markdown that is then converted to html for the github documentation. We believe that we've got it fixed -- the YUML generator didn't seem to be any more (or less) picky, but some of the previous fixes did end up creating markdown html that errored out in the generator itself.

Also, be aware of the "images" option on the markdown generator. This, instead of embedding the (sometimes complex) yuml URL in the markdown, resolves it and saves the resulting .svg image (or whatever type you choose) in an images subdirectory, meaning that you aren't dependent on the yuml generator for everyday browsing. Biolinkml uses that option but, at the moment, biolink-model appears to be using the non-image route