Closed wwaites closed 4 months ago
Thanks for this. The code had moved on quite a bit so I've merged your changes into a different file here: ea00c2b7f69fc7391b903281b1a690553981cc95
I agree it is not clear about whether to use what is now PREDICATE['has_control']
or just GRAPH['core'].hasControl
. Now I see it is simple to make the URIRefs I am leaning towards just getting rid of the PREDICATE
dictionary and using CORE.hasControl
. The advantage of having them in a dictionary is that you can see what options you have though.
I agree it is not clear about whether to use what is now
PREDICATE['has_control']
or justGRAPH['core'].hasControl
. Now I see it is simple to make the URIRefs I am leaning towards just getting rid of thePREDICATE
dictionary and usingCORE.hasControl
. The advantage of having them in a dictionary is that you can see what options you have though.
The disadvantage of maintaining a dictionary is that when we define a new predicate, you need to update the dictionary and keep it in sync. You could build such a dictionary with a query though.
It is best to use namespaces with RDFlib rather than simply assembling strings.
Thereafter, is unclear whether there is a good reason to give things new names, e.g. using
TYPE
instead ofRDF.type
orAFFECTS
instead ofCORE.affects
.It would be a natural thing to define a python module that has the Spyderisk namespaces, separate from this particular code that uses it.