SINTEF / dlite

DLite - a lightweight data-centric framework for semantic interoperability
https://SINTEF.github.io/dlite
MIT License
28 stars 5 forks source link

Function repo #327

Open jesper-friis opened 2 years ago

jesper-friis commented 2 years ago

We need a proper repository for property mapping functions and cost functions.

Currently they are just stored in a dict that have the IRI we assign the function as key and the function itself as value.

One solution could be to provide the mapping functions as Python modules that can be loaded via a simple plugin system using importlib. There will then be no need for serialisation of the function repo and it plugins could be either be included with the system using them or provided as verified pypi packages for safety.

The function repo plugin system could be implemented as a separate module in the triplestore subpackage. That would allow the triplestore to transparently use it under the hood, keeping the convenience of Triplestore.add_function().

jesper-friis commented 11 months ago

See the following up of this discussion on https://github.com/EMMC-ASBL/tripper/issues/128