Skip to content

Transform function signatures in Python to FnO descriptions in RDF!

Notifications You must be signed in to change notification settings

FnOio/fno-descriptor-python

Repository files navigation

fno-descriptor-python

Convenience tool for creating FnO function & parameter descriptions from Python functions.

Manually describing functions can be time-consuming and error-prone. The fno-descriptor-python enables you to quickly define a function signature in Python, and generates its corresponding FnO descriptions by leveraging Python type-hinting.

Dependencies

  • rdflib
  • pyshacl

Supported

  • fno:Parameter
  • fno:ParameterMapping
  • fno:Output
  • fno:ReturnMapping
  • fno:Function
  • fno:Mapping
  • fno:MethodMapping
  • Add func.__doc__ as doap:description
  • SHACL validation of generated FnO descriptions 🚧 WIP
    • currently, ListNodeShape is commented out in shapes/all.ttl
  • Use default type map

Usage example (main.py)

A usage example is given in main.py.

You can run the example as follows:

python src/main.py

About

Transform function signatures in Python to FnO descriptions in RDF!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published