Auto create functionSignatures.json from class? Or other way round?
3 次查看(过去 30 天)
显示 更早的评论
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?
Thanks!
0 个评论
回答(3 个)
Grant Junno
2018-11-15
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.
0 个评论
Johan Jeppsson
2018-11-23
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Python Package Integration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!