Re: [QGIS-Developer] Revert Previous Plugin, disable "Upgrade All" and "Upgrade Plugin" buttons

2023-01-11 Thread Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer
It would probably be more the other way around for my case. I will have to 
modify the calls from my front end UI for my tool to work properly with their 
plugin and that is how I kind of expect it as I am making calls to their code.  
We plan to have quarterly releases cycles of our code with new features/bug 
fixes unless there is some major issue found in the 3rd party plugin that 
requires a hotfix.



I was hoping to avoid forking and have to maintain 3rd party plugin.  We may be 
looking to transition to a version of Visibility Analysis in GRASS that is a 
core plugin that was developed inhouse almost 40 years ago, but in the mean 
time I tried another method as a test. I copied the VisibilityAnalysis plugin 
to another directory, VA_Test, so I can mess with privileges on a copy of the 
plugin directory.



Looks like if I deny write privileges to the VA_Test the Upgrade Plugin button 
just displays as Reinstall Plugin since it does not allow an upgrade and it is 
actually greyed out so that is good. The user can still run the Upgrade All 
plugin and that will upgrade all other plugins.  When I ran that it upgraded 
the original  VisibilityAnalysis plugin directory and all other plugins that 
had upgrades available.  So this seems like this will be a quick fix.  I will 
just need to make those permission restrictions in the my installer MSI file 
and test it out.  This in general could be a good solution to prevent user’s 
from upgrading plugins that we provide with our install, so that users don’t 
just continue to upgrade before we test to make sure they work so we can avoid 
unnecessary tech support called.



-Original Message-
From: Nyall Dawson 
Sent: Wednesday, January 11, 2023 7:14 PM
To: Catania, Luke A ERDC-RDE-GRL-VA CIV 
Cc: qgis-developer 
Subject: Re: [QGIS-Developer] Revert Previous Plugin, disable "Upgrade All" and 
"Upgrade Plugin" buttons



On Wed, 11 Jan 2023 at 12:49, Catania, Luke A ERDC-RDE-GRL-VA CIV via 
QGIS-Developer 
mailto:qgis-developer@lists.osgeo.org>> wrote:

>

> I had a user that may have hit the "Upgrade All" button in the plugins 
> window. Does that automatically upgrade all installed plugins to the newest 
> version? If so is there a way to revert back to the previous versions. He may 
> have just hit the Upgrade Plugin button for the specific plugin.  Not sure 
> and I did not want to test it and mess up my configuration.

>

> We have created our own QGIS plugin that relies on the VisibilityAnalysis 
> plugin and upgrading VisibilityAnalysis from 1.7 to 1.8 breaks our tool as I 
> created a my own Visibility Analysis UI to run the VisibilityAnalysis tool.  
> I basically want to prevent a user from upgrading any plugin that we access 
> so that this does not happen.  Is there a way to disable "Upgrade All" and 
> "Upgrade Plugin" buttons in the plugin window through settings, interface 
> customization, or programmatically through python on QGIS using startup.py?



I'd suggest in this situation that you should instead be either working with 
the VisibilityAnalysis maintainers to get the latest version compatible with 
your needs, or alternatively fork parts of the

1.7 code into your plugin so that you aren't dependent on another maintainer's 
work.



Trying to workaround this by blocking plugin updates is going to be a fragile 
path, likely taking much longer than either of the above suggestions.



Nyall







>

> Thanks,

> Luke

> ___

> QGIS-Developer mailing list

> QGIS-Developer@lists.osgeo.org

> List info:

> Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked

> Unsubscribe:

> Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked


___
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] Revert Previous Plugin, disable "Upgrade All" and "Upgrade Plugin" buttons

2023-01-11 Thread Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer
Thanks. I did think of that but am trying to avoid hundred if not thousands of 
users having to deal with a manual solution.  I think I have another work 
around I am testing.

From: Ismail Sunni 
Sent: Tuesday, January 10, 2023 10:46 PM
To: Catania, Luke A ERDC-RDE-GRL-VA CIV 
Cc: qgis-developer 
Subject: Re: [QGIS-Developer] Revert Previous Plugin, disable "Upgrade All" and 
"Upgrade Plugin" buttons

Hi Luke,

You can install the previous version of the plugin by installing it from its 
zip file manually.

  1.  Go to the plugin page, (e.g. 
Blockedhttps://plugins.qgis.org/plugins/ViewshedAnalysis/Blocked)
  2.  Click the version tab
  3.  Click the version you want to install (e.g. 
Blockedhttps://plugins.qgis.org/plugins/ViewshedAnalysis/version/1.7/Blocked)
  4.  Download the plugin (a zip file)
  5.  Open Plugin Manager
  6.  Uninstall the plugin
  7.  Install from Zip
One possible way to disable the Upgrade All or Upgrade Plugin is to disable all 
the plugin repositories (i.e. Plugins -> Settings -> disable all repositories).

Hope this helps.

On Wed, Jan 11, 2023 at 9:49 AM Catania, Luke A ERDC-RDE-GRL-VA CIV via 
QGIS-Developer 
mailto:qgis-developer@lists.osgeo.org>> wrote:
I had a user that may have hit the "Upgrade All" button in the plugins window. 
Does that automatically upgrade all installed plugins to the newest version? If 
so is there a way to revert back to the previous versions. He may have just hit 
the Upgrade Plugin button for the specific plugin.  Not sure and I did not want 
to test it and mess up my configuration.

We have created our own QGIS plugin that relies on the VisibilityAnalysis 
plugin and upgrading VisibilityAnalysis from 1.7 to 1.8 breaks our tool as I 
created a my own Visibility Analysis UI to run the VisibilityAnalysis tool.  I 
basically want to prevent a user from upgrading any plugin that we access so 
that this does not happen.  Is there a way to disable "Upgrade All" and 
"Upgrade Plugin" buttons in the plugin window through settings, interface 
customization, or programmatically through python on QGIS using startup.py?

Thanks,
Luke
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked
Unsubscribe: 
Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked


--
Ismail Sunni
Software Engineer
ismailsunni.idhttp://ismailsunni.idBlocked>
ismailsunni.wordpress.comhttp://ismailsunni.wordpress.comBlocked>
___
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] Revert Previous Plugin, disable "Upgrade All" and "Upgrade Plugin" buttons

2023-01-11 Thread Nyall Dawson via QGIS-Developer
On Wed, 11 Jan 2023 at 12:49, Catania, Luke A ERDC-RDE-GRL-VA CIV via
QGIS-Developer  wrote:
>
> I had a user that may have hit the "Upgrade All" button in the plugins 
> window. Does that automatically upgrade all installed plugins to the newest 
> version? If so is there a way to revert back to the previous versions. He may 
> have just hit the Upgrade Plugin button for the specific plugin.  Not sure 
> and I did not want to test it and mess up my configuration.
>
> We have created our own QGIS plugin that relies on the VisibilityAnalysis 
> plugin and upgrading VisibilityAnalysis from 1.7 to 1.8 breaks our tool as I 
> created a my own Visibility Analysis UI to run the VisibilityAnalysis tool.  
> I basically want to prevent a user from upgrading any plugin that we access 
> so that this does not happen.  Is there a way to disable "Upgrade All" and 
> "Upgrade Plugin" buttons in the plugin window through settings, interface 
> customization, or programmatically through python on QGIS using startup.py?

I'd suggest in this situation that you should instead be either
working with the VisibilityAnalysis maintainers to get the latest
version compatible with your needs, or alternatively fork parts of the
1.7 code into your plugin so that you aren't dependent on another
maintainer's work.

Trying to workaround this by blocking plugin updates is going to be a
fragile path, likely taking much longer than either of the above
suggestions.

Nyall



>
> Thanks,
> Luke
> ___
> 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 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] Problems with matplotlib with QGIS LTR on MacOS

2023-01-11 Thread Paolo Tormene via QGIS-Developer
Hello everybody,
I was experiencing issues installing a QGIS Python plugin on MacOS 12.6
and, after some investigation, I found out that the problem seems to happen
only with the current QGIS-LTR (3.22) and not with the latest release
(3.28.2-Firenze).
The problem occurs for instance when attempting to do something like the
following from the QGIS Python console:
from matplotlib import pyplot

Traceback (most recent call last):
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/code.py",
line 90, in runcode
exec(code, self.locals)
  File "", line 1, in 
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py",
line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/pyplot.py",
line 36, in 
import matplotlib.colorbar
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py",
line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/colorbar.py",
line 44, in 
import matplotlib.contour as contour
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py",
line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/contour.py",
line 17, in 
import matplotlib.text as text
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py",
line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/text.py",
line 16, in 
from .textpath import TextPath  # Unused, but imported by others.
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py",
line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/textpath.py",
line 11, in 
from matplotlib.mathtext import MathTextParser
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py",
line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/mathtext.py",
line 27, in 
from PIL import Image
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py",
line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg/PIL/Image.py",
line 94, in 
from . import _imaging as core
  File
"/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py",
line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError:
dlopen(/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg/PIL/_
imaging.cpython-38-darwin.so, 0x0002): Library not loaded:
'/opt/X11/lib/libxcb.1.dylib'
  Referenced from:
'/Applications/QGIS-LTR.app/Contents/Resources/python/site-packages/pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg/PIL/_
imaging.cpython-38-darwin.so'
  Reason: tried: '/opt/X11/lib/libxcb.1.dylib' (no such file),
'/usr/local/lib/libxcb.1.dylib' (no such file), '/usr/lib/libxcb.1.dylib'
(no such file)

Cheers,
Paolo
-- 

*PAOLO TORMENE* senior software developer +39 0382 5169882

*GLOBAL EARTHQUAKE MODEL * working together to assess risk

*GEM -* globalquakemodel.org  *T -*
@GEMwrld  *F -* GEMwrld

___
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] Autocomplete python code in QGIS compiled

2023-01-11 Thread Jacky Volpes via QGIS-Developer

Exactly the same here!

On Ubuntu 22.04

Regards,

--
Jacky Volpes

Ingénieur SIG - Oslandia



Le 09/01/2023 à 17:12, matteo via QGIS-Developer a écrit :

Hi all,

maybe that's a silly question, but with all the self compiled QGIS 
versions that I have (3.22, 3.28, master, ecc) QGIS is not 
autocompleting the code, not in the console, editor, Processing 
script, macros, etc etc.


With the QGIS 3.22, but again the version seems not be the problem, 
installed from packages, the autocompletion works as expected.


Is there a parameter in the cmake that I have to adjust or is this 
behavior expected?


p.s. working on a Debian Sid OS

Cheers and thanks!

Matteo
___
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 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