Skip to content

Commit

Permalink
Refactor en threedi research tools update (#60)
Browse files Browse the repository at this point in the history
* Create model_splitter_dialog.py

* update

* reference

new project - referentiemodel ingevoegd

* Update environment.yml

* refactor 0d1d en 1d2d test

* deprecate htt qgis folder

* deprecate layer interaction

Was allemaal al niet meer in gebruik

* refactor deprecate vervolg

Was allemaal al niet meer in gebruik

* ignore ipynb_checkpoints

* datachecker gdb to gpkg

* reference model wanneer niet ingevuld

* add gpkg vector type

* Update env for ThreediToolbox 2.5.2

* schema raster source loadloayers

* update env

* refactor 1d2d test

* update sqlite test

* update_werkt niet

* damo hdb .gdb to .gpkg

* SqliteTest to SqliteCheck

* update widget height

* Nieuw project update werkend

* change relative path model_settings/default

* Changed_fixed

* model_settings refactor

---------

Co-authored-by: jkaptein <[email protected]>
  • Loading branch information
wvangerwen and jkaptein authored May 10, 2023
1 parent 1c215de commit 9e5a30a
Show file tree
Hide file tree
Showing 75 changed files with 437 additions and 803 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ hhnk_threedi_plugin\external-dependencies
hhnk_threedi_plugin/api_key.txt
*.bak
local_settings.py
*.bak
*.bak
hhnk_threedi_plugin/env/environment_spyder_dev.yml
hhnk_threedi_plugin/external-dependencies/*
hhnk_threedi_plugin/logs/*
hhnk_threedi_plugin/resources_rc.py
hhnk_threedi_plugin/hhnk_toolbox_dockwidget_base_ui.py
Thumbs.db
.ipynb_checkpoints

# documenation
_build/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from qgis.core import QgsApplication
from PyQt5.QtCore import QMutex, QWaitCondition
from hhnk_threedi_plugin.qgis_interaction.layers_management.removing_layers import remove_layers
from deprecated.qgis_interaction.layers_management.removing_layers import remove_layers
from hhnk_threedi_plugin.tasks.load_3di_results_tasks import load3diResultsTask
# from hhnk_threedi_plugin.tasks.tests_tasks.one_d_two_d.read_nodes_task import readNodesTask
# from hhnk_threedi_plugin.tasks.tests_tasks.one_d_two_d.flowlines_task import flowLinesTask
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from qgis.core import QgsApplication
from PyQt5.QtCore import QMutex, QWaitCondition
from hhnk_threedi_plugin.qgis_interaction.layers_management.removing_layers import remove_layers
from deprecated.qgis_interaction.layers_management.removing_layers import remove_layers
from hhnk_threedi_plugin.tasks.load_3di_results_tasks import load3diResultsTask
from hhnk_threedi_plugin.tasks.tests_tasks.zero_d_one_d.zero_d_one_d_task import zeroDOneDTask
from hhnk_threedi_plugin.tasks.tests_tasks.zero_d_one_d.hydraulic_tests_task import hydraulicTestsTask
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from qgis.core import QgsApplication
from PyQt5.QtCore import QMutex, QWaitCondition
from hhnk_threedi_plugin.qgis_interaction.layers_management.removing_layers import remove_layers
from deprecated.qgis_interaction.layers_management.removing_layers import remove_layers
from hhnk_threedi_plugin.tasks.sqlite_test_tasks.profiles_used_task import profilesUsedTask
from hhnk_threedi_plugin.tasks.sqlite_test_tasks.isolated_channels_task import isolatedChannelsTask
from hhnk_threedi_plugin.tasks.sqlite_test_tasks.controlled_structs_task import controlledStructsTask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from qgis.gui import QgsMessageBar
from .verify_sqlite_tests_input import verify_input
from ...utility.file_widget import fileWidget
from hhnk_threedi_plugin.qgis_interaction.layers_management.layers.get_layers_list import (
from deprecated.qgis_interaction.get_layers_list import (
get_layers_list,
)
from hhnk_threedi_plugin.qgis_interaction.layers_management.groups.layer_groups_structure import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from hhnk_threedi_plugin.error_messages.input_error_messages import no_output_folder, no_result_selected


#Verplaatst naar \hhnk_threedi_plugin\gui\checks\zero_d_one_d.py
def verify_input(output_path, revision_selected):
"""
Checks whether all fields are correctly filled out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from ...error_messages.input_error_messages import (
from ....hhnk_threedi_plugin.error_messages.input_error_messages import (
no_output_folder,
no_result_selected,
invalid_model_path,
)
from ...gui.path_verification_functions import is_valid_raster, is_valid_model_path
from ....hhnk_threedi_plugin.gui.path_verification_functions import is_valid_raster, is_valid_model_path


def verify_input(revision_selected, dem_path, model_path, output_path):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from ..groups.layer_groups_structure import QgisLayerStructure
from ...hhnk_threedi_plugin.qgis_interaction.layers_management.groups.layer_groups_structure import QgisLayerStructure
import os
import re
from ..groups.project_groups_dicts import build_groups_dict
from ..layers.build_layer_names_dict import build_layer_dicts
from ..layers.layer_variable import layerVariables
from ..layers.build_layer_styles_dict import build_layer_styles_dict
from ..layers.layer_types_definition import VECTOR, VIRTUAL, RASTER
from .layers_management.groups.project_groups_dicts import build_groups_dict
from .layers_management.layers.build_layer_names_dict import build_layer_dicts
from ...hhnk_threedi_plugin.qgis_interaction.layers_management.layers.layer_variable import layerVariables
from .build_layer_styles_dict import build_layer_styles_dict
from ...hhnk_threedi_plugin.qgis_interaction.layers_management.layers.layer_types_definition import VECTOR, VIRTUAL, RASTER


from hhnk_research_tools.variables import file_types_dict, GPKG, TIF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import re
import copy
from .layers.layer_types_definition import VECTOR, VIRTUAL, RASTER
from ....hhnk_threedi_plugin.qgis_interaction.layers_management.layers.layer_types_definition import VECTOR, VIRTUAL, RASTER
from qgis.core import (
QgsProject,
QgsVectorLayer,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .layer_groups_structure import QgisLayerStructure
from .....hhnk_threedi_plugin.qgis_interaction.layers_management.groups.layer_groups_structure import QgisLayerStructure


def build_group_order(qls):
Expand Down
2 changes: 1 addition & 1 deletion deprecated/tasks/tests_tasks/one_d_two_d/flowlines_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers


# old
Expand Down
5 changes: 1 addition & 4 deletions deprecated/tasks/tests_tasks/one_d_two_d/read_nodes_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers

# old
# from hhnk_threedi_tools.tests.one_d_two_d.read_nodes_results import read_node_results
# import hhnk_research_tools as hrt

# new
from hhnk_threedi_tools import OneDTwoDTest
Expand Down
5 changes: 1 addition & 4 deletions deprecated/tasks/tests_tasks/one_d_two_d/waterlevels_task.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import copy
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers
from hhnk_threedi_plugin.qgis_interaction.layers_management.layers.layer_variable import layerVariables

# old
# from hhnk_threedi_tools.folder_structure_and_paths.paths_functions import create_tif_path
# from hhnk_threedi_tools.tests.one_d_two_d.get_waterlevel_at_timesteps import calc_waterlevel_depth_at_timesteps

from hhnk_threedi_tools import OneDTwoDTest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers
from hhnk_threedi_plugin.gui.checks.sqlite_test_widgets.controlled_structs_result import (
create_controlled_structs_widget,
)
Expand Down
2 changes: 1 addition & 1 deletion deprecated/tasks/tests_tasks/sqlite/dewatering_task.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers

description = "bepalen ontwateringsdiepte op basis van DEM hoogtes"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers
from hhnk_threedi_plugin.gui.checks.sqlite_test_widgets.isolated_channels_result import (
create_isolated_channels_result_widget,
)
Expand Down
2 changes: 1 addition & 1 deletion deprecated/tasks/tests_tasks/sqlite/profiles_used_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers
from hhnk_threedi_plugin.gui.checks.sqlite_test_widgets.profiles_used_result import (
create_profiles_used_widget,
)
Expand Down
2 changes: 1 addition & 1 deletion deprecated/tasks/tests_tasks/sqlite/sqlite_test_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from PyQt5.QtCore import QMutex, QWaitCondition
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers
from hhnk_threedi_plugin.gui.checks.sqlite_test_widgets.isolated_channels_result import (
create_isolated_channels_result_widget,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers
from hhnk_threedi_plugin.gui.checks.sqlite_test_widgets.structs_channels_result import (
create_structs_channels_result_widget,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers
from hhnk_threedi_plugin.gui.checks.sqlite_test_widgets.watersurface_area_result import (
create_watersurface_area_result_widget,
)
Expand Down
2 changes: 1 addition & 1 deletion deprecated/tasks/tests_tasks/sqlite/weir_height_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers
from hhnk_threedi_plugin.gui.checks.sqlite_test_widgets.weir_height_result import (
create_weir_height_widget,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers

# hhnk-threedi-tests
from hhnk_threedi_tools import ZeroDOneDTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PyQt5.QtCore import pyqtSignal
from qgis.core import QgsTask, Qgis
from qgis.utils import QgsMessageLog, iface
from hhnk_threedi_plugin.qgis_interaction.layers_management.adding_layers import add_layers
from deprecated.qgis_interaction.layers_management.adding_layers import add_layers


description = "0d1d tests uitvoeren"
Expand Down

This file was deleted.

10 changes: 5 additions & 5 deletions hhnk_threedi_plugin/env/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ dependencies:
- pip: # 3Di packages are not conda installable and are therefore installed by PIP
# - et-xmlfile==1.1.0
- openpyxl==3.1.2
- threedi_modelchecker==1.0.1
- threedi_modelchecker==2.1.0 #ThreediToolbox 2.5.2
- threedi_scenario_downloader==0.16
- threedi_schema==0.214.4
- threedi_schema==0.216.4 #ThreediToolbox 2.5.2
- threedi_raster_edits==0.26
- threedi-api-client==4.1.1
- threedigrid_builder==1.8.0
- threedigrid_builder==1.10.0 #ThreediToolbox 2.5.2

#Plugin
- hhnk_research_tools==2023.1
- hhnk_threedi_tools==2023.1
- hhnk_research_tools==2023.2
- hhnk_threedi_tools==2023.2
6 changes: 3 additions & 3 deletions hhnk_threedi_plugin/env/environment_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ dependencies:
- pip: # 3Di packages are not conda installable and are therefore installed by PIP
- et-xmlfile==1.1.0
- openpyxl==3.1.2
- threedi_modelchecker==1.0.1
- threedi_modelchecker==2.1.0 #ThreediToolbox 2.5.2
- threedi_scenario_downloader==0.16
- threedi_schema==0.214.4
- threedi_schema==0.216.4 #ThreediToolbox 2.5.2
- threedi_raster_edits==0.26
- threedi-api-client==4.1.1
- threedigrid_builder==1.8.0
- threedigrid_builder==1.10.0 #ThreediToolbox 2.5.2
Loading

0 comments on commit 9e5a30a

Please sign in to comment.