On Sep 21, 2013, at 9:39 AM, Miguel Angel <miguelan...@ajo.es> wrote:
> Thoughts on this: > > * The pythonland libraries need a serious refactor, at this moment all > functions and > classes are brought together by swig into pcbnew.py: helper functions > (LoadBoard, SaveBoard...) > unit conversion macros, scripting plugin definitions... > > From the documentation perspective, it's a mess... > > I think of refactoring into submodules: > > pcbnew (with all the pcbnew objects) > pcbnew.units (with the unit helpers) > > http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/view/head:/pcbnew/scripting/units.i > pcbnew.helpers > > http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/view/head:/pcbnew/scripting/module.i#L58 > > http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/view/head:/pcbnew/scripting/pcbnew_scripting_helpers.cpp#L59 > (backport this to python.) > > pcbnew.plugins (pcb footprint wizard plugins, etc..) > > > * There are many swig artifacts that get documented: _object, > SwigPyIterator. We must find a way to get rid of the > classes that get accidentally documented. Knowing very little about python, but this should work (it does for C): EXCLUDE_SYMBOLS More info here: http://www.doxygen.nl/config.html#cfg_exclude_symbols /Martijn > > > > > Miguel Angel Ajo Pelayo > http://www.nbee.es > +34 636 52 25 69 > skype: ajoajoajo > > > 2013/9/20 Miguel Angel <miguelan...@ajo.es> > Yet it's not as perfect as it can be, but it's a good start point, > > http://dev.kicad-pcb.org/doxygen-python/annotated.html > > http://dev.kicad-pcb.org/kicad-pcbnew-python-refman.pdf > > > > http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/revision/4327 > > To build the documentation, you only need doxygen, python, and swig, > > mkdir build-doc > cd build-doc > cmake ../kicad.bzr -DKICAD_SCRIPTING=ON > cd pcbnew > make doxygen-python > > > I must learn about how to create a mainpage from python into doxygen... > > Miguel Angel Ajo Pelayo > http://www.nbee.es > +34 636 52 25 69 > skype: ajoajoajo > > > 2013/9/8 Miguel Angel <miguelan...@ajo.es> > I'm also thinking about giving a try to sphinx, which is the software used to > build the python documentation at the python site. > > I will drop a link here later if it looks good. > > Miguel Angel Ajo Pelayo > http://www.nbee.es > +34 636 52 25 69 > skype: ajoajoajo > > > 2013/9/8 Miguel Angel <miguelan...@ajo.es> > I forgot about the most important part of my previous message, the link :) > > http://dev.kicad-pcb.org/doxygen-python-test/classpcbnew_1_1BOARD.html > > > > Miguel Angel Ajo Pelayo > http://www.nbee.es > +34 636 52 25 69 > skype: ajoajoajo > > > 2013/9/8 Miguel Angel <miguelan...@ajo.es> > > It's a first try, only "BOARD" class extended descriptions are > imported from the C++ doxygen. > > It's not perfect, but can be automated and much better than nothing. > > We do: > > C++ ->doxygen-> XML -> python_script-> .i > > then > > *.i's ->swig-> pcbnew.py > > and finally > > pcbnew.py -> doxygen -> html > > > The link came out from a test on command line, now I must spend some more > days to get this workflow into cmake > > > Miguel Angel Ajo Pelayo > http://www.nbee.es > +34 636 52 25 69 > skype: ajoajoajo > > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp