Sphinxed Phoenix Documentation (5)

1 view
Skip to first unread message

Andrea Gavana

unread,
Apr 6, 2012, 2:14:31 PM4/6/12
to wxPyth...@googlegroups.com
Hi All,

(please tell me to shut up if I become boring), a new set of
documentation pages for Phoenix is available. I have managed to put in
wx.lib as well (although with ~130 warnings), and also the very nice
I18N page from Werner.

You can see the various results in these pages:

http://xoomer.virgilio.it/infinity77/Phoenix/main.html
http://xoomer.virgilio.it/infinity77/Phoenix/lib.html
http://xoomer.virgilio.it/infinity77/Phoenix/internationalization.html

The wx.lib stuff has still some things missing/wrong, I'll try to
correct them over the next few days. Other than that, wx.lib is still
in the need of a big docstrings clean-up/harmonization with the rest
of the documentation...

In the meanwhile, please do take a look at the new docs and report
back any strange thing you may find.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Werner

unread,
Apr 6, 2012, 4:15:05 PM4/6/12
to wxpyth...@googlegroups.com
Hi Andrea,

On 06/04/2012 20:14, Andrea Gavana wrote:
> Hi All,
>
> (please tell me to shut up if I become boring),

Keep them coming!


> a new set of
> documentation pages for Phoenix is available. I have managed to put in
> wx.lib as well (although with ~130 warnings), and also the very nice
> I18N page from Werner.
>
> You can see the various results in these pages:
>
> http://xoomer.virgilio.it/infinity77/Phoenix/main.html
> http://xoomer.virgilio.it/infinity77/Phoenix/lib.html

Will try and do some more in here.
> http://xoomer.virgilio.it/infinity77/Phoenix/internationalization.html
Have seen some things which can be simplified and cleaned-up, especially
for the sample app.

Werner

Werner

unread,
Apr 7, 2012, 3:44:24 AM4/7/12
to wxpyth...@googlegroups.com
Hi Andrea,

I noticed a few things in the combotreebox, i.e. the code samples need
to be indented (done here) and I see e.g. in "FindClientData" that
"TreeItemId" is linked for parameter parent but not for the return?

Am I assuming correct that for returns and rtype I would have to do
:class:`TreeItemId`, would this hurt if I use it also for the param
"parent", i.e. use it consistently all the way trough?

Werner

Werner

unread,
Apr 7, 2012, 5:22:36 AM4/7/12
to wxpyth...@googlegroups.com
Hi Andrea,

Attached the patch with my changes for the I18N stuff.

In the sample application I moved a couple of things to a
app_constant.py module, to ensure that domain and languages are only
defined in one place (especially as wx.Locale does not complain if one
feeds a domain name which doesn't exist in the locale folder). I also
removed the tools folder and put the geni18n.py into the main folder and
it generates the .pot to the locale folder.

One thing I can't figure out is how to get the link for "GetTranslation"
in the "Prepare the source code" section, hhm, maybe not yet documented
in Phoenix?

Werner


i18nwxapp.patch

Werner

unread,
Apr 7, 2012, 5:43:24 AM4/7/12
to wxpyth...@googlegroups.com
Hi Andrea,

Had my coffee, so I see now why it works in why it works for parent but
not after return.

Attached a patch to correct the indentation of the code and use
:class:`TreeItemId` where needed and a some other little clean ups to
make e.g. the summary a bit nicer.

Werner

combotreebox 2.patch

Werner

unread,
Apr 7, 2012, 5:47:15 AM4/7/12
to wxpyth...@googlegroups.com
Hi Andrea,

And here a very tiny patch to fix wx.Colour to :class:`Colour`.

Werner

colourutils 2.patch

Andrea Gavana

unread,
Apr 7, 2012, 5:57:03 AM4/7/12
to wxpyth...@googlegroups.com
Hi Werner,

On 7 April 2012 11:47, Werner wrote:
> Hi Andrea,
>
> And here a very tiny patch to fix wx.Colour to :class:`Colour`.

Thank you for all the patches, I'll apply them now and re-run Sphinx.
It might take a while, as Phoenix + wx.lib will make Sphinx churn for
about 20 minutes... I guess it will be funny when we start including
wx.py and wx.tools in it :-D

By the way, you correctly figured out that there are 2 possible ways
to get the ":param:" stuff to show up the links, namely:

1) If a parameter has only one possible type, you can write:

:param Colour `my_colour`: my description.

2) If it has 2 possible types (I haven't tried with more than 2...):

:param `my_colour`: my description.
:type my_colour: tuple or :class:`Colour`

(You can also use :ref: instead of :class:, but the latter is usually
preferred).

For the return type, it is correct as you did:

:rtype: :class:`Colour`

I'll re-upload the docs when Sphinx it's finished.

Thank you!

Andrea Gavana

unread,
Apr 7, 2012, 5:58:30 AM4/7/12
to wxpyth...@googlegroups.com
Hi Werner,

It seems like GetTranslation is not in the function list for Phoenix,
so either my scripts have messed up something or it hasn't been
wrapped yet. I'll check it now.

Werner

unread,
Apr 7, 2012, 6:10:28 AM4/7/12
to wxpyth...@googlegroups.com
Hi Andrea,

A patch for platebtn.py, mainly change @param to :param and other small
changes to Sphinx'ify it.

I think that was the last low hanging fruit.

Werner

platebtn.patch

Werner

unread,
Apr 7, 2012, 8:10:42 AM4/7/12
to wxpyth...@googlegroups.com
Hi Andrea,

My patch for the i18n stuff didn't remove the folder i18ntools and it is
still in the zip, when you have a moment can you make these two changes.

Werner

Robin Dunn

unread,
Apr 7, 2012, 7:18:41 PM4/7/12
to wxpyth...@googlegroups.com
On 4/7/12 2:58 AM, Andrea Gavana wrote:
> Hi Werner,
>
> On 7 April 2012 11:22, Werner wrote:
>> Hi Andrea,
>>
>> Attached the patch with my changes for the I18N stuff.
>>
>> In the sample application I moved a couple of things to a app_constant.py
>> module, to ensure that domain and languages are only defined in one place
>> (especially as wx.Locale does not complain if one feeds a domain name which
>> doesn't exist in the locale folder). I also removed the tools folder and
>> put the geni18n.py into the main folder and it generates the .pot to the
>> locale folder.
>>
>> One thing I can't figure out is how to get the link for "GetTranslation" in
>> the "Prepare the source code" section, hhm, maybe not yet documented in
>> Phoenix?
>
> It seems like GetTranslation is not in the function list for Phoenix,
> so either my scripts have messed up something or it hasn't been
> wrapped yet. I'll check it now.

I'm adding it now.


--
Robin Dunn
Software Craftsman
http://wxPython.org

Reply all
Reply to author
Forward
0 new messages