Skip to content

Commit

Permalink
2023.3 fixes (#80)
Browse files Browse the repository at this point in the history
* deploy users with hhnk

* fix populate laad lagen

* update hrt version

* update deps versions

* update version
  • Loading branch information
wvangerwen authored Jun 23, 2023
1 parent 58a632e commit 689b590
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion hhnk_threedi_plugin/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@author: Wietse Gerwen & Daniel Tollenaar
Current requirements:
- QGIS version must be 3.22
- QGIS version must be 3.28
- ThreeDiToolbox properly installed (for threedigrid and other deps).
Expand Down
4 changes: 2 additions & 2 deletions hhnk_threedi_plugin/env/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ dependencies:
- rtree==1.0.1 #threedi_raster_edits dep

#Plugin
- hhnk_research_tools==2023.3
- hhnk_threedi_tools==2023.3
- hhnk_research_tools==2023.3.2
- hhnk_threedi_tools==2023.3.2
7 changes: 0 additions & 7 deletions hhnk_threedi_plugin/gui/load_layers_popup.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ def __init__(self, caller, parent):
def populate_one_d_two_combobox(self):
"""Add available revisions to dropdown"""
revisions = self.caller.fenv.output.one_d_two_d.revisions
if len(revisions) == 0:
return

self.one_d_two_d_selector.clear()
self.one_d_two_d_selector.addItem("")
Expand All @@ -176,9 +174,6 @@ def populate_zero_d_one_d_combobox(self):
"""Add available revisions to dropdown"""
revisions = self.caller.fenv.output.zero_d_one_d.revisions

if len(revisions) == 0:
return

self.zero_d_one_d_selector.clear()
self.zero_d_one_d_selector.addItem("")
for revision in revisions:
Expand All @@ -187,8 +182,6 @@ def populate_zero_d_one_d_combobox(self):
def populate_klimaatsommen_combobox(self):
"""Add available revisions to dropdown"""
revisions = self.caller.fenv.threedi_results.climate_results.revisions
if len(revisions) == 0:
return

self.klimaatsommen_selector.clear()
self.klimaatsommen_selector.addItem("")
Expand Down
2 changes: 1 addition & 1 deletion hhnk_threedi_plugin/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name=HHNK 3Di toolbox
qgisMinimumVersion=3.0
description=Plugin voor watersysteemanalyse met 3Di
version=2023.3
version=2023.3.2
author=Wietse van Gerwen, HHNK
[email protected]

Expand Down
35 changes: 23 additions & 12 deletions scripts/run_deploy_plugin_across_users.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
# %%
from deploy_plugin_across_users import deploy, get_users
from pathlib import Path
import os

# PLUGINS_DIR = r"c://Users//{user}//AppData//Roaming//3Di//QGIS3//profiles//default//python//plugins" # noqa
# plugins_dir = PLUGINS_DIR
PLUGINS_DIR = r"c://Users//{user}//AppData//Roaming//3Di//QGIS3//profiles//default//python//plugins" # noqa
plugins_dir = PLUGINS_DIR
# from pathlib import Path
# users = get_users()
# for user in users:
# print(f"checking user '{user}'")
# user_plugins_dir = Path(plugins_dir.format(user=user))
# if user_plugins_dir.parent.is_dir():
# print(user)
users = get_users()

selected_users = []
for user in users:
try:
print(f"checking user '{user}'")
user_plugins_dir = Path(plugins_dir.format(user=user))
if user_plugins_dir.parent.is_dir():
if len([i for i in user_plugins_dir.glob("*hhnk_threedi_plugin")]) == 1:
selected_users.append(user)
except:
pass

print("\nSelected users:")
print(selected_users)
# %%
deploy(admin_user="wvangerwen",
plugins = ["hhnk_threedi_plugin", "ThreeDiToolbox", "valuetool", "pdokservicesplugin"],
users = [],
plugins = ["hhnk_threedi_plugin", "ThreeDiToolbox"],
users = selected_users,
users_ignored = [],
files_ignored = ["local_settings.py", "api_key.txt"],
)


# %%

0 comments on commit 689b590

Please sign in to comment.