workflowhub-eu / workflowhub-graph

Knowledge Graph generator for WorkflowHub
BSD 2-Clause "Simplified" License
5 stars 1 forks source link

Investigate the suitability of Ontospy / alternatives #9

Closed OliverWoolland closed 4 months ago

OliverWoolland commented 4 months ago

Is https://github.com/digitalbazaar/pyld a viable alternative to ontospy?

stain commented 4 months ago

Jena Riot https://jena.apache.org/documentation/io/#command-line-tools can also do conversion easily. Docker image in https://hub.docker.com/r/stain/jena or use Java.

There's an in-memory cache in Riot https://github.com/jsonld-java/jsonld-java/blob/master/README.md#controlling-network-traffic to avoid multiple downloads of the JSON-LD context, but of course that would be cleared for each riot command line unless you provided multiple files.

To override the JSON-LD @context cache you can ask it to load context from classpath, see jarcache.json however this may need a new Dockerfile

stain commented 4 months ago

https://rdflib.readthedocs.io/en/stable/ can read JSON-LD in Python and export other formats, you should not need pyld

stain commented 4 months ago

Decided on rdlib with Volodymyr's JSON-LD caching patch.