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
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
extr
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
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 qg
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().group
I already had a similar get_qgis_app() function, but I was only using it to
instantiate QgsApplication in tests which I thought had QIcon or QPixmap
functionality. Adding it to all other tests has solved the problem. Thanks
so much for your patience.
--
View this message in context:
http://osge
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
functio
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:
http://osgeo-org.
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
wrote:
> I've got the build environment up now, I think - many thanks, all. However,
>
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 fail
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 the
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 OSGeo.or
Have a look to the Travis config file in inasafe :
https://github.com/AIFDR/inasafe/blob/develop/.travis.yml
2015-06-22 20:19 GMT+02:00 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 defau
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 run-env-linux.
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
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 mai
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:
https://github.com/lutraconsulting
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 mai
18 matches
Mail list logo