Auto create functionSignatures.json from class? Or other way round?

4 views (last 30 days)
As described here, we now can configure the tab-completion of all our custom classes and functions using a functionSignatures.json file.
I love it!
Nevertheless it's still a lot of effort to write the json files. Is there a way to couple or to automate the creation of the json? Usually one must have an imput parser anyway, so maybe it's the other way to go: Specify the user interface/parameters by the json file and auto generate an input parser for these parameters?
How does Mathworks create these files? By hand?

Answers (2)

Grant Junno
Grant Junno on 15 Nov 2018
I'm also interested in this. Considering how tied to one another these are, it would be nice to be able to reduce some duplication of effort.

Johan Jeppsson
Johan Jeppsson on 23 Nov 2018
I develop a python api, which I can call from MATLAB. Great .
Now I would like to have code-copleation and see my python doc-string as tooltips for my python classes. (In matlab)
I wonder if there is a good way to do this?
Maybe I can generate a lot of functionSignatures.json? typically 1 for each python class?
Can you even have functionSignatures.json for classes?
Wher should i put these functionSignatures.json files? maybe in a subfolder to (C:\MATLAB\R2018b\toolbox\matlab\external\interfaces\python) ??
Should I make subfolders for the different python packages maybe? My python api have several python packages (files ending with .py) and those files have several classes, and those classes contain instances of other classes.
Python version is 3.6 and all classes and methods have docstrings and Type-hints
Would appreciate any feedback and helpful tips :-)
/Henrik Lasu

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!