build of documentation is not correct

Bug #1135732 reported by Christian Jakob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Undecided
Unassigned

Bug Description

the following code is not built correctly by build-bot:

.. ipython::

 @suppress

e.g. see here:

https://yade-dem.org/doc/user.html#

when creating offline documentation, everthing looks ok.
also i tried different browsers (konqueror and iceweasel): offline doc is ok, online doc is not ok

maybe ipython is not installed on build-bot?

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

ipython is probably on the server since other blocks are displayed correctly:
https://yade-dem.org/doc/user.html#boundary-representation-brep

@suppress is the problem apparently, it supress the full block, and it appears in quite a lot of places. Thanks for spotting that. A lot of useful examples are simply lost in the online manual.

A different version of IPython maybe? We will check.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

IPython is in Version 0.13.1 for the buildbot.
Version 0.10 on my PC.
What is your version Christian?

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

Version: 0.10-2

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

In case it is familiar to somebody, I spotted a problem (I think) in our sphinx/conf.py:

if yade.runtime.ipython_version<12:
 extensions.append('ipython_directive')
else:
 extensions.append('ipython_directive012')

ipython_directive012 does not work for 0.13 it seems.

Both modules (ipython_directive/ipython_directive012) are shipped in yade sources although there is a version supported by IPython.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

My first impression was wrong; the problem is not "@supress", it is ".. ipython::" itself that will simply not work with ipython 0.13.

Apparently, there is no version of the module ipython_directive that would work with ipython 0.13 and we can't do much about it. It is a job for ipython devs.

We will have to check wether it is possible to downgrade ipython on the buildbot for the moment. In the long run I hope they will come with an updated module, as I don't want to remove all the ipython blocks...

Changed in yade:
status: New → Confirmed
Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1135732] Re: build of documentation is not correct

There is ipython_directive for 0.13 version [1], but it should be
tested before including into the yade-source.

Anton
[1] https://github.com/ipython/ipython/blob/rel-0.13/docs/sphinxext/ipython_directive.py

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

>There is ipython_directive for 0.13 version [1], but it should be
>tested before including into the yade-source.

Well, so the question is:

Who wants to test it?

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

I tested it already (chroot on wheezy). It didn't work at first attempt but now it seems to work. Let me try something...
If it still doesn't work I can fix hopefully.

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

hm, had a short look on your commit

https://github.com/yade/trunk/commit/d72b9fb60d14ea89b5d505d84d87491d9f7eae16#L0R363

Is this (line 363)

else:
 if 12<yade.runtime.ipython_version<13:

really working?
I have never seen such syntax ... and at the moment i can not check

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

It "may" work now but I'm too green with chroot and I have problems with the x session (and matplotlib needs that...). So I can't fully test sphinx.
Unfortunately, the buildbot has another independant problem and can't even compile now (there was an update of the system today, probably the reason). So... we will not know before next week it seems.

This should not be a problem:
>>> 14<15<16<17
True
>>> 14<15<14<17
False
>>>

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

This should not be a problem:
>>> 14<15<16<17

ok, i trust you, because it looks quite pythonic ^^

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Fixed in:
https://github.com/yade/trunk/commit/1e6c9ca4c967c2575c852ce4aad70123304de5aa

I'm not quite happy with this fix. A problem is that the continuation string is no longer customizable in conf.py.
It is hardcoded as " ...:" (3 spaces) in ipython_directives, while yade has 5 spaces. Unless we drag our own version of ipython_directives013.py, we will have to live with that.
I fixed sections in the rst files to use 3 spaces everywhere, I hope nothing is left behind.
Directives <= 0.12 are a more flexible and they still work whatever the number of spaces.

Changed in yade:
status: Confirmed → Fix Released
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.