[Pymoul-svn] SF.net SVN: pymoul: [107] pymoul/trunk
Status: Alpha
Brought to you by:
tiran
From: <ti...@us...> - 2007-01-31 14:41:20
|
Revision: 107 http://pymoul.svn.sourceforge.net/pymoul/?rev=107&view=rev Author: tiran Date: 2007-01-31 06:41:17 -0800 (Wed, 31 Jan 2007) Log Message: ----------- Added genepydoc to add custom qtslot qtsignal fields Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/doc/CODING.txt Added Paths: ----------- pymoul/trunk/genepydoc.py Property Changed: ---------------- pymoul/trunk/doc/CODING.txt Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-01-31 03:00:50 UTC (rev 106) +++ pymoul/trunk/Makefile.in 2007-01-31 14:41:17 UTC (rev 107) @@ -1,5 +1,5 @@ PYTHON?=python -EPYDOC=$(PYTHON) -c "import epydoc.cli; epydoc.cli.cli()" +EPYDOC=$(PYTHON) genepydoc.py NOTSVN=-a -not -wholename '*.svn*' FINDPYTXT=find src/moul \( -name '*.py' -o -name '*.txt' \) $(NOTSVN) FINDPY=find src/moul -name '*.py' $(NOTSVN) Modified: pymoul/trunk/doc/CODING.txt =================================================================== --- pymoul/trunk/doc/CODING.txt 2007-01-31 03:00:50 UTC (rev 106) +++ pymoul/trunk/doc/CODING.txt 2007-01-31 14:41:17 UTC (rev 107) @@ -1,3 +1,43 @@ +=========== +Python code +=========== + +Use the general coding style of Zope3: + +http://wiki.zope.org/zope3/CodingStyle +http://www.python.org/peps/pep-0008.html + +Naming convention Python objects in Zope +---------------------------------------- +by JimFulton + +1. Use leading underscores as described in the "Python Style Guide", + http://www.python.org/peps/pep-0008.html + + 2. Public global variables names are spelled with CapitalizedWords, + as in 'Folder' or 'RoleService'. + + Interface names always start with a capital 'I', followed by a + capital letter, as in 'IFactory'. + + An exception is made for global non-factory functions, which are + typically spelled with [mixedCase]. + + 3. Public attribute names are [mixedCase], as in "getService" or 'register'. + + 4. Local variables, including argument names + LowercaseWithUnderscores, as in 'permission_id', or 'service'. + + 5. Single-letter variable names should be avoided unless: + + - Their meaning is extremly obvious from the context, and + + - Brevity is desireable + + The most obviouse case for single-letter variables is for + iteration variables. + + ====== epydoc ====== @@ -75,10 +115,14 @@ New field --------- @newfield tag: label [, plural] -@newfield qtslot: Qt slot, Qt slots -@newfield qtsignal: emits Qt signal, emit Qt signals +Custom fields +------------- +Some custom fields are added by the custom genepydoc.py file +@qtslot name(args): connect(SIGNAL) +@qtsignal name(args): emit(SIGNAL) + epytext markup language ======================= Property changes on: pymoul/trunk/doc/CODING.txt ___________________________________________________________________ Name: svn:keywords + Id Revision Added: pymoul/trunk/genepydoc.py =================================================================== --- pymoul/trunk/genepydoc.py (rev 0) +++ pymoul/trunk/genepydoc.py 2007-01-31 14:41:17 UTC (rev 107) @@ -0,0 +1,31 @@ +#!/usr/bin/env python2.5 +"""Generate epydoc +""" +from epydoc.cli import cli +from epydoc.docstringparser import STANDARD_FIELDS +from epydoc.docstringparser import DocstringField +#from epydoc.docstringparser import _check +#from epydoc.docstringparser import register_field_handler + +STANDARD_FIELDS.append( + DocstringField(['slots', 'qtslots'], 'Qt Slot: %s', 'Qt Slots: %s', + short=False, multivalue=True, takes_arg=True) +) + +STANDARD_FIELDS.append( + DocstringField(['signal', 'qtsignal'], 'Emits Qt Signal: %s', + 'Emit Qt Signals: %s', short=False, multivalue=True, + takes_arg=True) +) + +#process_qtsignal_field(api_doc, docindex, tag, arg, descr): +# _check(api_doc, tag, arg, context=RoutineDoc, expect_arg='single') + + +if __name__ == '__main__': + try: + cli() + except: + print '\n\n' + raise + Property changes on: pymoul/trunk/genepydoc.py ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |