Skip to content

Commit 030c3a2

Browse files
danpejoboDaniel
andauthored
v.3.1.1 (#11)
* Configure and dd dev-environment * try to get testing to work * testfile * add workflow_dispatch to action * add pycodestyle to makefile * remove qgis 3_22 * trying tests again * test * update action * try another pth * update path in github action * edit path * edit variable * add debug step * add directory * edit paths * edit paths * update import statement and tests * update tests * add _init__ to submodule in github action * edit path * update test paths * edit paths * add submodule * tests update * update test * edit test * tests * test import error * update tests * edit test * update test * test case * short only * test case * run test on main/dev on push/pull-req * add test calls * error in yml file * edit tests * update testcase * edit test case * try cp testfiles * edit steps * edit test and settings * edit test * update test * restructure repo * restructure repo * update readme * update readme * edit readme * update readme * edit makefile to reflect new repo structure * update paths in github actions * edit action and test * change name on utils to utilities * edit github action * edit check plugin load * edit tests, add badge to readme * edit tests * update test * try to fix import. relative to absolute * edit docstring * update docstring * update docstring * update test * edit test * update test * update test * update test * update test * update test * update testing * update test * test update * update test, add feedback if exception * change to absolute import * edit test * edit test * update text for output feature name variable * update test * update test and add test badge to readme * add issue templates * update test * change testcase CRS * exclude long-term from test * update test * remove redundant logger * edit util reproject raster "TARGET_CRS" * edit test * edit test * add context to temp folder * add prefix to logging and feedback in @reproject_layers * try to use postprocessing * edit test * remove intermediate option * remove intermediate laayers #2 * edit algorithm to postprocess * add QgsProcessingException * edit param input for reproject * edit reproject * edit begrensskade * update test * edit post-process * try to edit the addlayerstask * edit test and log values to reproject * edit reproject * is child added * try with reproject raster change input and source_crs * try postprocess with addlayerstask class * add tests and test data * format code * edit add layers class * add docstring to postprocess * edit tests for excavation module * update testcase * remove tricky "lower()" call to raster path. * edit wrong testnumber * add tests to impact map * edit tests * update test. error in calling alg. * update parameters - test for tunnel * update readme * update readme * update testcase * edit copyright dates * edit sub-processes parameters * v.3.0.0 * fix bug in vulnerability analysis: optional fields input allowed * update test with coverage * test - try with coverage * test w/o coverage * edit test_suite * v.3.1.0 * Edit excavation algorithm where a layer had same name. Fix bug in labels in styles * v.3.1.1 * Add versioning to the algorithms @ prep v.3.1.1 * v.3.1.1 changelog --------- Co-authored-by: Daniel <[email protected]>
1 parent 7507774 commit 030c3a2

File tree

7 files changed

+38
-8
lines changed

7 files changed

+38
-8
lines changed

geovita_processing_plugin/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
__date__ = '2024-01-17'
2727
__copyright__ = '(C) 2024 by DPE'
2828

29-
__version__ = "3.1.0"
29+
__version__ = "3.1.1"
3030

3131
import sys
3232
from pathlib import Path

geovita_processing_plugin/algorithms/BegrensSkadeExcavation.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,17 @@ def __init__(self):
108108
"BegrensSkadeII_QGIS_EXCAVATION.log",
109109
"EXCAVATION_LOGGER",
110110
).get_logger()
111-
self.logger.info("__INIT__ - Finished initialize BegrensSkadeExcavation ")
111+
112+
# Retrieve version number from BaseAlgorithm class "GvBaseProcessingAlgorithms"
113+
self.version = self.getVersion()
114+
self.logger.info(f"__INIT__ - VERSION: {self.version} ")
112115

113116
# instanciate variables used in postprocessing to add layers to GUI
114117
self.feature_name = None # Default value
115118
self.layers_info = {}
116119
self.styles_dir_path = Path()
117120
self.add_layers_task = AddLayersTask()
121+
self.logger.info("__INIT__ - Finished initialize BegrensSkadeExcavation ")
118122

119123
def tr(self, string):
120124
return QCoreApplication.translate("Processing", string)
@@ -482,6 +486,9 @@ def processAlgorithm(self, parameters, context, feedback):
482486
Here is where the processing itself takes place.
483487
"""
484488
self.logger.info("PROCESS - Starting the processing")
489+
feedback.pushInfo(
490+
f"PROCESS - Version: {self.version}"
491+
)
485492
# Retrieve the feature source and sink. The 'dest_id' variable is used
486493
# to uniquely identify the feature sink, and must be included in the
487494
# dictionary returned by the processAlgorithm function.
@@ -849,7 +856,7 @@ def processAlgorithm(self, parameters, context, feedback):
849856
"shape_path": output_shapefiles[0],
850857
"style_name": "BUILDING-TOTAL-RISK-SELLMENT_risk_tots.qml",
851858
},
852-
"BUILDING-TOTAL-ANGLE": {
859+
"BUILDING-RISK-ANGLE": {
853860
"shape_path": output_shapefiles[0],
854861
"style_name": "BUILDING-TOTAL-RISK-ANGLE_risk_angle.qml",
855862
},

geovita_processing_plugin/algorithms/BegrensSkadeImpactMap.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,17 @@ def __init__(self):
107107
self.logger = CustomLogger(
108108
log_dir_path, "BegrensSkadeII_QGIS_IMPACTMAP.log", "IMPACTMAP_LOGGER"
109109
).get_logger()
110-
self.logger.info("__INIT__ - Finished initialize BegrensSkadeImpactMap ")
110+
111+
# Retrieve version number from BaseAlgorithm class "GvBaseProcessingAlgorithms"
112+
self.version = self.getVersion()
113+
self.logger.info(f"__INIT__ - VERSION: {self.version} ")
111114

112115
# instanciate variables used in postprocessing to add layers to GUI
113116
self.feature_name = None # Default value
114117
self.layers_info = {}
115118
self.styles_dir_path = Path()
116119
self.add_layers_task = AddLayersTask()
120+
self.logger.info("__INIT__ - Finished initialize BegrensSkadeImpactMap ")
117121

118122
def name(self):
119123
"""
@@ -397,6 +401,9 @@ def processAlgorithm(self, parameters, context, feedback):
397401
"""
398402
Here is where the processing itself takes place.
399403
"""
404+
feedback.pushInfo(
405+
f"PROCESS - Version: {self.version}"
406+
)
400407
bShortterm = self.parameterAsBoolean(
401408
parameters, self.SHORT_TERM_SETTLEMENT[0], context
402409
)

geovita_processing_plugin/algorithms/BegrensSkadeTunnel.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,17 @@ def __init__(self):
108108
self.logger = CustomLogger(
109109
log_dir_path, "BegrensSkadeII_QGIS_TUNNEL.log", "TUNNEL_LOGGER"
110110
).get_logger()
111-
self.logger.info("__INIT__ - Finished initialize BegrensSkadeTunnel ")
111+
112+
# Retrieve version number from BaseAlgorithm class "GvBaseProcessingAlgorithms"
113+
self.version = self.getVersion()
114+
self.logger.info(f"__INIT__ - VERSION: {self.version} ")
112115

113116
# instanciate variables used in postprocessing to add layers to GUI
114117
self.feature_name = None # Default value
115118
self.layers_info = {}
116119
self.styles_dir_path = Path()
117120
self.add_layers_task = AddLayersTask()
121+
self.logger.info("__INIT__ - Finished initialize BegrensSkadeTunnel ")
118122

119123
def name(self):
120124
"""
@@ -501,6 +505,9 @@ def processAlgorithm(self, parameters, context, feedback):
501505
"""
502506
Here is where the processing itself takes place.
503507
"""
508+
feedback.pushInfo(
509+
f"PROCESS - Version: {self.version}"
510+
)
504511
bShortterm = self.parameterAsBoolean(
505512
parameters, self.SHORT_TERM_SETTLEMENT[0], context
506513
)

geovita_processing_plugin/algorithms/base_algorithm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@
3232

3333
from qgis.core import (QgsProcessingAlgorithm)
3434

35+
from geovita_processing_plugin import __version__ # Import version from package's __init__.py
36+
3537

3638
class GvBaseProcessingAlgorithms(QgsProcessingAlgorithm):
3739
"""
3840
Base class for Geovita algorithms.
39-
"""
41+
"""
42+
def getVersion(self):
43+
return __version__

geovita_processing_plugin/metadata.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name=Geovita GIS Processing provider
77
qgisMinimumVersion=3.28
88
qgisMaximumVersion=3.99
99
description=This plugin adds different Geovita custom processing algorithms to QGIS
10-
version=3.1.0
10+
version=3.1.1
1111
author=DPE
1212
1313

@@ -28,7 +28,12 @@ repository=https://github.com/danpejobo/geovita_processing_plugin
2828

2929
hasProcessingProvider=yes
3030
# Uncomment the following line and add your changelog:
31-
changelog=v.3.1.0 (14.02.2024)
31+
changelog=v.3.1.1 (04.03.2024)
32+
- Add version logging and feedback.
33+
- Fix for two layers having the same name in the excavation algorithm (thus only one showing in TOC)
34+
- Fix "label" attributes for the styles to the excavation and tunnel algorithms
35+
36+
v.3.1.0 (14.02.2024)
3237
- Minor fix in vulnerability analysis for excavation and tunnel. Fields can be omitted (i.e corresponding analysis are dropped). Any combination of the three vulnerability fields can be assessed.
3338

3439
v.3.0.0 (09.02.2024)
-11 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)