← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #694147]: Sikuli Generate Documentation / help file of Custom Glasses

 

Question #694147 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/694147

RaiMan proposed the following answer:
ok, had a look at your stuff.

--- a general comment:
Since it seems, that you want to create some framework, that provides functions that in turn use Sikuli features, it is some overkill to wrap these functions as methods into classes, since all you functions I can currently see, are class methods (they do not need an instance object of the class, static methods). So having modules with functions is fully sufficient (like in SikuliX with the Lib/sikuli folder which is imported as from sikuli import *).

To achieve a python-compatible structure simply have a folder framework
with an __init__.py and all your modules as plain .py files. This is the
standard for module structures at language level 2.7 (see folder
Lib/sikuli).

Be aware: To achieve what you want, you have to say goodbye to the
.sikuli folders (at least for the framework stuff) and use plain .py
files (supported in the IDE). In this scenario, you should have a good
image name convention and a central structured store for your images (to
access the images we have the feature ImagePath).


--- about automatic docs in Python:
First you have to document the Python stuff according to the Python doc-string rules.

Then there are different generators available. The most used surely is Sphinx with its auto features.
Another more actual package is https://github.com/pdoc3/pdoc, which looks very promising. Though it has to be run with Python 3.5, it should be able to process your framework stuff.

Telling about your final solution would be interesting and appreciated.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.