Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

laad lagen refactor #125

Merged
merged 46 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e92f7b4
eerste opzet refactor styling
wvangerwen Oct 13, 2023
c659069
working on qgislayer
wvangerwen Oct 17, 2023
a003b3e
update versions
wvangerwen Oct 20, 2023
c56a42a
first working qgis loading
wvangerwen Oct 20, 2023
250ad59
properly remove existing layers when loading
wvangerwen Oct 23, 2023
8a8e2d9
fix remove
wvangerwen Oct 23, 2023
65cfdbf
load only selected subjects
wvangerwen Oct 23, 2023
f189a18
loading through ui
wvangerwen Oct 23, 2023
eb71552
update testprotocol.csv
wvangerwen Oct 23, 2023
5a047e1
Merge branch 'main' into laad-lagen-refactor
wvangerwen Oct 23, 2023
0b056e4
fixes #120
wvangerwen Oct 23, 2023
6ab6b41
add themes to project
wvangerwen Oct 24, 2023
705ca60
polderclusters in docs
DanielTollenaar Oct 25, 2023
7d9e66a
Update model_splitter_dialog.py
DanielTollenaar Oct 25, 2023
6348833
klimaatsommen in testprotocol.csv
wvangerwen Oct 25, 2023
0de6902
klimaatsommen csv weg en luchtfoto 2022
wvangerwen Oct 25, 2023
1d482ac
group op idx 0 invoegen
wvangerwen Oct 25, 2023
52d573b
load_layers weg project.Project direct aanroepen
wvangerwen Oct 25, 2023
6693b6e
volgorde groups #62
wvangerwen Oct 25, 2023
4c8a91e
styling hyd toets
wvangerwen Oct 25, 2023
f2463c2
deprecate unused code path_verification_functions
wvangerwen Oct 27, 2023
168089a
black --line-length=119
wvangerwen Oct 27, 2023
91a427c
fix some linting warnings
wvangerwen Oct 27, 2023
7e45a41
linting
wvangerwen Oct 30, 2023
3d34749
remove unused import
wvangerwen Oct 30, 2023
2f91803
fixes #131
wvangerwen Oct 30, 2023
15ccbaa
reset settings_path on close
wvangerwen Oct 30, 2023
1a372a3
styling updates
wvangerwen Oct 30, 2023
ab4fe6c
layouts half werkend.
wvangerwen Oct 30, 2023
4dfaae7
formatting
wvangerwen Oct 30, 2023
8677401
labels kunstwerken
wvangerwen Oct 31, 2023
a28a3fb
Update project.py
DanielTollenaar Oct 31, 2023
58f02ef
qgis structure en styles van plugin naar htt
wvangerwen Oct 31, 2023
2b6c526
Update project.py
DanielTollenaar Oct 31, 2023
fc1f409
Merge branch 'laad-lagen-refactor' of https://github.com/threedi/hhnk…
DanielTollenaar Oct 31, 2023
6bfd255
Update project.py
DanielTollenaar Oct 31, 2023
1ca6858
clean project
DanielTollenaar Oct 31, 2023
31aaa0d
OUR_DIR to HHNK_THREEDI_PLUGIN_DIR
wvangerwen Oct 31, 2023
1504f94
Merge branch 'laad-lagen-refactor' of https://github.com/threedi/hhnk…
wvangerwen Oct 31, 2023
1726e4a
Update project.py
DanielTollenaar Oct 31, 2023
58b047a
Update project.py
DanielTollenaar Oct 31, 2023
e3ea192
layer_structure_csv vanuit htt
wvangerwen Oct 31, 2023
b1397c1
Merge branch 'laad-lagen-refactor' of https://github.com/threedi/hhnk…
wvangerwen Oct 31, 2023
028cc41
test load layers
DanielTollenaar Nov 1, 2023
1e54a84
fixes #143 visbility presets werkend
wvangerwen Nov 2, 2023
28cbed5
verbose default to false
wvangerwen Nov 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Plugin voor het bouwen en analyseren van [3Di](https://3diwatermanagement.com/)
* [Gebruikershandleiding](md_files/usage.md)
* [Uitleg tests en functionaliteit](md_files/tests_documentation.md)
* [Bron data](md_files/needed_data.md)
* [Polder clusters](md_files/polder_clusters.md)
58 changes: 58 additions & 0 deletions docs/md_files/polder_clusters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Polder clusters

| ID | Naam | Code Polders V4 |
|----|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 | Heerhugowaard | "03150","03350" |
| 2 | Drieban | "6090" |
| 3 | Purmer | "5801","5802","5803" |
| 4 | Grootlimmerpolder | "04230","04290","04300" |
| 5 | Koegras | "2060","2040","2010","20601" |
| 6 | Marken | "5160" |
| 7 | HUB | "04310","04320","04541","04542" |
| 8 | Beemster | "5400","5401" |
| 9 | VNK | "6750" |
| 10 | t Hoekje | "2020","2040" |
| 11 | Assendelft | "04751","04752","04380" |
| 12 | Grootslag | "6700","6770","6780","6080" |
| 13 | Heiloo | "04170","04650","04160","04200" |
| 14 | Purmerend | "5741","5742","5721","5722","5841","5842","5320" |
| 15 | Starnmeer | "04460" |
| 16 | Eijerland | 8040,"8071" |
| 17 | Mijzen | "04520" |
| 18 | Oudorp | "03765" |
| 20 | Wijdewormer | "5310" |
| 21 | Noorderkaag | "03703" |
| 23 | Edam Volendam Katwoude | "5360","5781","5761","5762","5782" |
| 24 | VRNK-Oost | "2100","2110","03190","03200","03210","6753" |
| 25 | Wieringermeer | "7701","7702","7703","7704" |
| 26 | Binnenduinrand Egmond | "04100","04150","04902","04220","04902-00" |
| 27 | Geestmerambacht | "03764","03751","03240","03801","03802","03763","03300","03752" |
| 28 | Waterland | "5170","5470","5821","5480","5230","5240","5560","5220","5180","5410","5250","5440","5500","5150","5510","5260","5520","5822","5200","5490","5210","5530","5540","5550","5570","5460","5600","5610","5620","5580","5390","5171" |
| 29 | Schermer | "04851","04852","04853" |
| 30 | Zijpe-West | "2751","2752","2775","2754","2780","2779","2050","2756" |
| 31 | Oosterpolder Hoorn | "6110","6100" |
| 32 | Westzaan | "04400","04390" |
| 33 | Bergermeer | "04070","04080","04090","04952","04953","04640" |
| 34 | Wieringerwaard | "2080" |
| 35 | Schagerkogge | "03010","03020","03030","03040","03050","03060","03701","03702" |
| 36 | Zeevang | "5701","5702","5703","5704","5705" |
| 37 | Westerkogge | "6130" |
| 38 | Alkmaardermeerpolders | "04250","04280","04260","04420","04270", "04240" |
| 39 | Wieringen | "2851","2852","2854","2855","2856" |
| 40 | Zijpe-Zuid | "2757","2758","2759","2781","2763","2764","2765","2766" |
| 41 | Egmondermeer | "04130","04110","04951" |
| 42 | Oostzaan | "5330","5340" |
| 43 | HOUW (Wohoobur) | "6180","6190","6200","6210" |
| 44 | Zijpe-Noord | "2767","2768","2772","2769","2773","2774","2120" |
| 45 | Callantsoog | "2030","2040" |
| 46 | Bergen-Noord | "04010","04020","04030","04040","04050","04060" |
| 47 | Berkmeer e.o. | "6230","6240","03130","03140" |
| 48 | Valkkoog en Schagerwaard | "03080","03090" |
| 49 | Waar Woud Spek eet | "03100","03110","03120","03340" |
| 50 | Wormer | "5270","5280","5290","5300" |
| 51 | Eilandspolder | "04801","04802","04803","04804","04470" |
| 53 | VRNK-West | "03160","03170","03180","03070" |
| 54 | Anna Paulowna | "2803","2804","2805" |
| 55 | NZK-polders | "04340","04580","04590","04610","04410" |
| 56 | Beetskoog | "5010","5020","5030","5040","5050","5080" |
| 57 | Texel-Zuid | "8010","8020","8030","8071" |
14 changes: 7 additions & 7 deletions hhnk_threedi_plugin/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@
DETACHED_PROCESS = 0x00000008

# Globals
OUR_DIR = Path(__file__).parent
DEPENDENCY_DIR = OUR_DIR / "external-dependencies"
HHNK_THREEDI_PLUGIN_DIR = Path(__file__).parent
DEPENDENCY_DIR = HHNK_THREEDI_PLUGIN_DIR / "external-dependencies"
DEPENDENCY_DIR.mkdir(parents=True, exist_ok=True)
THREEDI_DEPENDENCY_DIR = OUR_DIR.parent / "ThreeDiToolbox" / "deps"
THREEDI_DEPENDENCY_DIR = HHNK_THREEDI_PLUGIN_DIR.parent / "ThreeDiToolbox" / "deps"

WHEEL_DIR = OUR_DIR / "wheels"
WHEEL_DIR = HHNK_THREEDI_PLUGIN_DIR / "wheels"
WHEEL_DIR.mkdir(parents=True, exist_ok=True)

YML_PATH = OUR_DIR.joinpath("env", "environment.yml")
YML_PATH = HHNK_THREEDI_PLUGIN_DIR.joinpath("env", "environment.yml")

LOG_DIR = OUR_DIR / "logs"
LOG_DIR = HHNK_THREEDI_PLUGIN_DIR / "logs"
LOG_DIR.mkdir(parents=True, exist_ok=True)

PATCH_DIR = OUR_DIR / "patches"
PATCH_DIR = HHNK_THREEDI_PLUGIN_DIR / "patches"
PATCHES = {"downloader.py":DEPENDENCY_DIR/r"threedi_scenario_downloader/downloader.py"}

USERDEPS = ["jupyterlab", "ipywidgets"] #Dependencies in userfolder %appdata%/python/
Expand Down
2 changes: 1 addition & 1 deletion hhnk_threedi_plugin/env/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies:
- threedi_modelchecker==2.4.0 #ThreediToolbox 2.5.5
- threedi_scenario_downloader==1.2 #Lizard API v4 only
- threedi_schema==0.217.11 #ThreediToolbox 2.5.4
- threedi-api-client==4.1.2 #3Di Models and Simulations 3.5.2
- threedi-api-client==4.1.4 #3Di Models and Simulations 3.6.1
- threedigrid_builder==1.12.1 #ThreediToolbox 2.5.5
- threedigrid==2.0.6 #ThreediToolbox 2.5.4
- threedidepth==0.6.1 #ThreediToolbox 2.5.4
Expand Down
2 changes: 1 addition & 1 deletion hhnk_threedi_plugin/env/environment_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies:
- threedi_modelchecker==2.4.0 #ThreediToolbox 2.5.5
- threedi_scenario_downloader==1.2 #Lizard API v4 only
- threedi_schema==0.217.11 #ThreediToolbox 2.5.4
- threedi-api-client==4.1.2 #3Di Models and Simulations 3.5.2
- threedi-api-client==4.1.4 #3Di Models and Simulations 3.6.1
- threedigrid_builder==1.12.1 #ThreediToolbox 2.5.5
- threedigrid==2.0.6 #ThreediToolbox 2.5.4
- threedidepth==0.6.1 #ThreediToolbox 2.5.4
Expand Down
2 changes: 1 addition & 1 deletion hhnk_threedi_plugin/env/environment_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies:
- threedi_scenario_downloader==1.2 #Lizard API v4 only
- threedi_schema==0.217.11 #ThreediToolbox 2.5.4

- threedi-api-client==4.1.2 #3Di Models and Simulations 3.5.2
- threedi-api-client==4.1.4 #3Di Models and Simulations 3.6.1
- threedigrid_builder==1.12.1 #ThreediToolbox 2.5.5
- threedigrid==2.0.6 #ThreediToolbox 2.5.4
- threedidepth==0.6.1 #ThreediToolbox 2.5.4
1 change: 0 additions & 1 deletion hhnk_threedi_plugin/error_messages/input_error_messages.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# These are messages displayed to users if something is wrong with their input

invalid_model_path = "Pad naar model is ongeldig {}"
no_bank_levels_calculated = "Geen berekende bank levels in model"
no_manholes_backup = "Geen manholes backup gevonden"
invalid_datachecker_path = "Pad naar datachecker is ongeldig {}"
Expand Down
34 changes: 14 additions & 20 deletions hhnk_threedi_plugin/gui/checks/bank_levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
from qgis.core import Qgis
from hhnk_threedi_plugin.gui.utility.file_widget import fileWidget

from hhnk_threedi_plugin.gui.path_verification_functions import is_valid_model_path
from hhnk_threedi_plugin.error_messages.input_error_messages import invalid_model_path

from hhnk_threedi_plugin.gui.checks.bank_levels_widgets.proposed_changes_dialog import modelChangesDialog
import hhnk_threedi_plugin.tasks.task_bank_levels as task_bank_levels
Expand Down Expand Up @@ -69,25 +67,21 @@ def __init__(self, caller, parent=None):
def bank_level_test_execution(self):
update_button_background(button=self.start_bank_levels_btn, color="orange")
model_path=self.caller.input_data_dialog.model_selector.filePath()
if not is_valid_model_path(model_path):
message=invalid_model_path.format(model_path)
self.caller.iface.messageBar().pushMessage(message, Qgis.Critical)

try:
if (
self.results_widget is not None
and self.results_widget
and self.results_widget.isVisible()
):
self.results_widget.close()

self.run_bank_levels_test(model_path=model_path)
update_button_background(button=self.start_bank_levels_btn, color="green")
except Exception as e:
self.caller.iface.messageBar().pushMessage(str(e), Qgis.Critical)
update_button_background(button=self.start_bank_levels_btn, color="red")
else:
try:
if (
self.results_widget is not None
and self.results_widget
and self.results_widget.isVisible()
):
self.results_widget.close()

self.run_bank_levels_test(model_path=model_path)
update_button_background(button=self.start_bank_levels_btn, color="green")
except Exception as e:
self.caller.iface.messageBar().pushMessage(str(e), Qgis.Critical)
update_button_background(button=self.start_bank_levels_btn, color="red")
pass
pass


#Functionality controller
Expand Down
Loading