[QGIS-Developer] Reload python library used by plugin

2024-05-16 Thread Gerald Kogler via QGIS-Developer
The fantastic Plugin Reloader doesn't reload loaded libraries as 
documented here 
(https://github.com/borysiasty/plugin_reloader/issues/37). So when I 
change code in a library used by a QGIS plugin the only way I know to 
reload this library is to restart QGIS.


To make it clear: I'm not talking about core libraries but python 
libraries shipped with plugins (like Mergin/pygeodiff or GeoCat Bridge/ 
bridge-style)


Is there a more dynamic way to force a python library to reload?
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] QGIS Server ignores custom layer legend properties

2022-12-02 Thread Gerald Kogler via QGIS-Developer

Good morning everybody,

I managed to get rid of the Band name and invert the order in a raster 
layer legend in QGIS using a custom pyqgis [1]


The problem is that the changes don't show up on QGIS Server 
GetLegendGraphic request.


Is customproperties option "legend/node-order" something QGIS Server 
doesn't have in mind? How could I achieve that, do I have to create QGIS 
Server plugin?


Thanks
Gerald

[1] 
https://gis.stackexchange.com/questions/446269/custom-layer-legend-properties-dont-show-up-on-qgis-server

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Python modules shipped with QGIS

2022-08-23 Thread Gerald Kogler via QGIS-Developer
Hi! Sorry for repeating this question if it was asked lately, but I 
don't find anything in the archives.


Where do I find the list of python modules (including there versions) 
shipped with QGIS on different operating systems? I'm developing a QGIS 
plugin and get some error messages like 'No module named...' on Windows, 
but not on Linux and Mac.


Thanks a lot
Gerald
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Is there a recommended way to include external Python packages

2022-07-21 Thread Gerald Kogler via QGIS-Developer
Thanks for your recommendations, with that in mind I'll go for the 
option 2, shipping the 3rd party package with the plugin.


Till now I did that including the whl-file, but after looking at your 
plugins I see the advantage of your code of adding the directory which 
contains the library to sys.path and then doing an import (see 
https://github.com/NationalSecurityAgency/qgis-datetimetools-plugin/blob/master/__init__.py) 




On 21/7/22 19:33, C Hamilton wrote:
Generally speaking it is not recommended, but I have done it with 
several of my plugins (KML Tools, Date/Time Tools). If your python 
package is OS dependent (not pure python) then you don't want to include 
it with your plugin. My Density Analysis plugin can use the optional H3 
library (which I think might be worthwhile for QGIS to include as a part 
of its libraries), but it is machine dependent so I did not include it. 
It is not ideal to have users pip install the library, but you have to 
weigh the costs vs. the benefits of using some library.


Good luck!

On Thu, Jul 21, 2022 at 1:19 PM Gerald Kogler via QGIS-Developer 
mailto:qgis-developer@lists.osgeo.org>> 
wrote:


I'm actually developing a QGIS plugin which depends on pysftp
package to
upload files to a server. For now I thought on asking users to install
it manually, but it would be great to automatize the installation
process.

So the options I see would be:
1. Install external package using pip from inside the plugin.
2. Include and ship external package with the plugin.
3. Ask user to install it manually using pip install.

Is there a recommended way to handle this situation?
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
<https://lists.osgeo.org/mailman/listinfo/qgis-developer>



___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Is there a recommended way to include external Python packages

2022-07-21 Thread Gerald Kogler via QGIS-Developer
I'm actually developing a QGIS plugin which depends on pysftp package to 
upload files to a server. For now I thought on asking users to install 
it manually, but it would be great to automatize the installation process.


So the options I see would be:
1. Install external package using pip from inside the plugin.
2. Include and ship external package with the plugin.
3. Ask user to install it manually using pip install.

Is there a recommended way to handle this situation?
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer