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

2015-07-02 Thread Tom Chadwin
After lots of help and contributions from Akbar, I think this is now working. If anyone else would find the information useful, see: https://github.com/tomchadwin/qgis2web/issues/72 and https://github.com/tomchadwin/qgis2web/tree/LayerTree-API Many thanks, Akbar and everyone who has helped out

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

2015-06-29 Thread Akbar Gumbira
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

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

2015-06-29 Thread Akbar Gumbira
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

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

2015-06-29 Thread Tom Chadwin
Any instance of qgis_get_app() outside of /test is only my attempts to get his testing working, so I'll dig out the commit which put it there and revert it. I'll have a look at your guidance on implementing iface, but if you are able and interested to have a look as well, then of course I'd be

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

2015-06-26 Thread Tom Chadwin
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

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

2015-06-24 Thread Tom Chadwin
I've got the build environment up now, I think - many thanks, all. However, does anyone know how I can get rid of the following test fail: QPixmap: Must construct a QApplication before a QPaintDevice I don't see QApplication instantiated anywhere. I'm not sure how to get past this, since the

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

2015-06-24 Thread Akbar Gumbira
The message says it all. You must instantiate QApplication before instantiating QPaintDevice object or any object from classes inherited from QPaintDevice. Regards On Wed, Jun 24, 2015 at 4:06 PM, Tom Chadwin tom.chad...@nnpa.org.uk wrote: I've got the build environment up now, I think - many

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

2015-06-24 Thread Tom Chadwin
So Google has told me repeatedly. My issues are: - I have not previously done this because the plugin works fine in QGIS, and this issue has only shown up in tests - I don't know how (or where) to instantiate QApplication (or QgsApplication?) -- View this message in context:

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

2015-06-24 Thread Akbar Gumbira
I don't know the code base you're working on. I think what you need to do is to narrow down which test that produces that error. You can split the tests like binary search or whatever method you like (running the tests for each package etc). In InaSAFE, for testing purposes, there's a handy

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

2015-06-22 Thread Akbar Gumbira
By default in QGIS plugin builder you meant is here https://github.com/g-sherman/Qgis-Plugin-Builder/blob/master/run-env-linux.sh#L6 ?. If so, that is not the default if you install QGIS like this in Travis https://github.com/AIFDR/inasafe/blob/develop/.travis.yml#L17. You can just pass /usr as

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

2015-06-22 Thread Tom Chadwin
I have. I was just trying to put together as minimal a test environment as possible. I didn't know which packages from the inasafe yaml I needed, and which I could do without. I presume it requires many more than qgis2web. Original message From: Etienne Trimaille [via

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

2015-06-22 Thread Tom Chadwin
I've got a bit further with this, but have an embarrassingly basic question. I'm using Tim's Plugin Builder's run-env-linux.sh, but the default QGIS path doesn't seem to match where Travis installs QGIS to - is Travis running Ubuntu? Can anyone tell me what QGIS path I should pass to

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

2015-05-28 Thread Akbar Gumbira
In InaSAFE we actually use Jenkins with Github PR Builder plugin now for our reference. We had some problems with Travis: There were some tests that could take more than 10 mins and all the tests could take 50 mins and would hit job timeout in travis for public repo. Also sometimes the job failed

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

2015-05-27 Thread Tom Chadwin
Thanks very much, Martin. Looks like I have a lot to learn (unittest/nose, as well as Travis itself). -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646p5207727.html Sent from the Quantum GIS - Developer

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

2015-05-26 Thread Tom Chadwin
Has anyone set up TravisCI to test commits in a QGIS Python plugin Github repo? Can anyone give me some help? -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-TravisCI-integration-in-Github-for-QGIS-Python-plugin-tp5207646.html Sent from the Quantum GIS - Developer

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

2015-05-26 Thread Martin Dobias
Hi Tom For example InaSAFE uses Travis CI - the Travis config file from there may be a good start: https://github.com/AIFDR/inasafe We use Travis CI for Crayfish plugin - though we test only crayfish library, not the plugin itself, so QGIS libs are not required: