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

Alexandre Neto senhor.neto at gmail.com
Tue Jun 25 07:01:55 PDT 2019


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.

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/c8d081a2/attachment.html>


More information about the Qgis-community-team mailing list