[Qgis-community-team] QGIS documentation build is failing and is making me crazy. Heeellp!!!!

Alexandre Neto senhor.neto at gmail.com
Tue Jun 25 08:17:45 PDT 2019


On Tue, Jun 25, 2019 at 3:20 PM DelazJ <delazj at gmail.com> wrote:

> How do we do this sanitization?
>

Deleting all variables in the end of each pycookbook file? or in the
begining?  in a testcleanup directive.

That would make sure no variable is reused on other tests.

Alex

On Tue, Jun 25, 2019 at 3:20 PM DelazJ <delazj at gmail.com> wrote:

> Hi Alex,
>
> Thanks for checking
>
> Le mar. 25 juin 2019 à 16:02, Alexandre Neto <senhor.neto at gmail.com> a
> écrit :
>
>> Hi,
>>
>> I have tried locally, and I got no failures on the 51 tests.
>>
>> There error is:
>>
>> Document: docs/pyqgis_developer_cookbook/cheat_sheet
>> ----------------------------------------------------
>> Application path not initialized
>> **********************************************************************
>> File "docs/pyqgis_developer_cookbook/cheat_sheet.rst", line 297, in default
>> Failed example:
>>     layers_names = []
>>     for layer in QgsProject.instance().mapLayers().values():
>>         layers_names.append(layer.name())
>>     print("layers TOC = {}".format(layers_names))
>> Expected:
>>     layers TOC = ['layer name you like']
>> Got:
>>     layers TOC = ['Companies', 'layer name you like']
>> **********************************************************************
>> File "docs/pyqgis_developer_cookbook/cheat_sheet.rst", line 327, in default
>> Failed example:
>>     layers_names = [layer.name() for layer in QgsProject.instance().mapLayers().values()]
>>     print("layers TOC = {}".format(layers_names))
>> Expected:
>>     layers TOC = ['layer name you like']
>> Got:
>>     layers TOC = ['Companies', 'layer name you like']
>>
>>
>> It seems that the 'Companies' layer is added to the TOC in
>> https://github.com/qgis/QGIS-Documentation/blob/6234bdcece8d5d94eb5acf7802dac13b289d65db/source/docs/pyqgis_developer_cookbook/expressions.rst#L151
>>
>> I bet the reason why sometimes it fails, and sometimes it doesn't is
>> because doctest may not always follow the same order. Since we only want to
>> test RST by RST, I think we should do some kind of sanitization at the end
>> of each file.
>>
>> How do we do this sanitization?
> In the commit you mention, which aimed to fix that issue (PR with
> discussion at https://github.com/qgis/QGIS-Documentation/pull/3869), I
> put the codes in a .. testcode:: group, thinking that will bound the
> 'Companies' layer creation to that group only. Obviously a fail (though the
> build succeeded locally and failed on travis the first time before
> succeeding two times after close/reopen steps).
> What's the purpose of group, then (
> https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html)?
> The order of doctest may indeed be random since providing the suggested
> fix also fails (https://github.com/qgis/QGIS-Documentation/pull/3880)
> with suggesting the current situation. :mad:
>
> Harrissou
>
>> Alex
>>
>>
>> On Tue, Jun 25, 2019 at 11:58 AM DelazJ <delazj at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> For days now, master in QGIS-Documentation is failing [0]. For the same
>>> reason, which has nothing to do with the writing system but the testing
>>> framework for pyQGIS code. Issue is that the failure does not seeem to be
>>> constantly reproducible.
>>> In the link above, havatv-climbalongline and havatv-pointtolayer are
>>> both based on master HEAD and none provides changes to code testing. One is
>>> passing and the other one is failing. Actually both are reported failing in
>>> doc repository [1]
>>> The fixFailingTest2 branch, also based on master, provides a fix based
>>> on the suggestion in Travis message. But it failed, and the suggested
>>> solution would be ..... the current master state.
>>>
>>> I'm getting crazy so if someone wants to give it a look and bring the
>>> repository to green, it would be nice.
>>>
>>> [0] https://travis-ci.org/qgis/QGIS-Documentation/branches
>>> [1]
>>> https://github.com/qgis/QGIS-Documentation/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc
>>>
>>> Thanks,
>>> Harrissou
>>> _______________________________________________
>>> Qgis-community-team mailing list for organizing community resources such
>>> as documentation, translation etc..
>>> Qgis-community-team at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/qgis-community-team
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-community-team/attachments/20190625/43b64622/attachment.html>


More information about the Qgis-community-team mailing list