[Qgis-developer] Using TravisCI integration in Github for QGIS Python plugin

Akbar Gumbira akbargumbira at gmail.com
Mon Jun 29 09:28:08 PDT 2015


I just looked at the code base. If you are patient enough to get that
sorted out, I can look at that around the weekend and make a PR. One of the
problem is I see that you are playing around with get_qgis_app in the main
code (MainDialog). That function is only intended for testing purpose.

On Tue, Jun 30, 2015 at 12:02 AM, Akbar Gumbira <akbargumbira at gmail.com>
wrote:

> You can also use iface object provided by Python wrapper from qgis.utils.
> So in get_qgis_app instead of having the mock QgisInterface, you can do
> something like:
>
> ```
> from qgis.utils import iface
> IFACE = iface
> ```
>
> I think in InaSAFE, we don't want unnecessary implementations from the
> iface from qgis.utils. I am not aware of the first history of it though.
>
> Regards
>
> On Sat, Jun 27, 2015 at 5:44 AM, Tom Chadwin <tom.chadwin at nnpa.org.uk>
> wrote:
>
>> I suspect I'm not going to get this to work. I hit the problem that my
>> plugin
>> 's code used iface, which was not recognised. I managed to inject the
>> dummy
>> iface replacement created in the qgis_get_app () function mentioned above.
>> However, next the code calls:
>>
>> ```python
>> IFACE.legendInterface().groupLayerRelationship()
>>
>> ```
>>
>> While the dummy iface implements a method legendInterface(), it's just a
>> stub. It doesn't even return the right object type, but returns a canvas
>> object instead.
>>
>> I might be able to expand the dummy iface to add in the extra features
>> required to get the right object type returned by that method, but isn't
>> this all pointless?
>>
>> - the more dummy object I have to build, the less real object I am testing
>>
>> - the dummy won't have the session data associated with it, such as the
>> project's layers
>>
>> An I misunderstanding something, or is my attempt to set up testing for
>> qgis2web doomed?
>>
>>
>>
>> --
>> View this message in context:
>> http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5213199.html
>> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
>
> --
>
> *-------------------*
>
> *Akbar Gumbira*
> *Software Engineer*
> *Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
>



-- 

*-------------------*

*Akbar Gumbira*
*Software Engineer*
*Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150630/0f652a5c/attachment.html>


More information about the Qgis-developer mailing list