Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
{
"affiliation": "BFW",
"name": "Anna Wirbel"
"orcid": "0000-0001-7149-8625"
},
{
"affiliation": "BFW",
"name": "Matthias Tonnel"
"name": "Paula Spannring",
"orcid": "0009-0005-1843-264X"
},
{
"affiliation": "BFW",
Expand Down
20 changes: 20 additions & 0 deletions OpenNHMQGisConnector_commonFunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ def copyDEM(dem, targetDir):
pass


def copyCfgFile(sourcePath, targetDir, destFileName):
"""copies a config ini file to targetDir/Inputs/CFG/<destFileName>

Parameters
-----------
sourcePath: str
path to the source config file
targetDir: pathlib.Path
base avalanche target directory
destFileName: str
destination filename (e.g. 'com2ABCfg.ini')
"""
targetCFGPath = targetDir / "Inputs" / "CFG"
targetCFGPath.mkdir(parents=True, exist_ok=True)
try:
shutil.copy(sourcePath, targetCFGPath / destFileName)
except shutil.SameFileError:
pass


def copyRaster(raster, targetDir, suffix):
"""copies raster file to targetDir with suffix added to filename

Expand Down
4 changes: 4 additions & 0 deletions OpenNHMQGisConnector_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def find_python():
from .tools.avaframe.runCom7RegionalComputation_algorithm import runCom7RegionalComputationAlgorithm
from .tools.avaframe.runCom6Scarp_algorithm import runCom6ScarpAlgorithm
from .tools.avaframe.runIn1RelInfo_algorithm import runIn1RelInfoAlgorithm
from .tools.avaframe.getDefaultModuleIni_algorithm import getDefaultModuleIniAlgorithm
from .tools.avaframe.loadPeakFiles_algorithm import loadPeakFilesAlgorithm
from .tools.admin.getVersion_algorithm import getVersionAlgorithm
from .tools.admin.update_algorithm import updateAlgorithm

Expand Down Expand Up @@ -139,6 +141,8 @@ def loadAlgorithms(self):
self.addAlgorithm(getVersionAlgorithm())
self.addAlgorithm(updateAlgorithm())
self.addAlgorithm(runIn1RelInfoAlgorithm())
self.addAlgorithm(getDefaultModuleIniAlgorithm())
self.addAlgorithm(loadPeakFilesAlgorithm())

def id(self):
"""
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ qgis = ">=3.22"
numpy = "<2.0"
pixi-pycharm = "*"
black = "*"
pytest = "*"

[tool.pixi.feature.dev.pypi-dependencies]
avaframe = { path = "../AvaFrame/", editable = true }
Expand All @@ -67,8 +68,14 @@ avaframe = { path = "../AvaFrame/", editable = true }
[tool.pixi.feature.qgis.dependencies]
qgis = ">=3.22"

# Pytest
[tool.pytest.ini_options]
markers = [
"slow: tests that take several minutes (deselect with '-m \"not slow\"')",
]

# Environments
[tool.pixi.environments]
default = { features = ["dev"], solve-group = "default" }
dev = ["dev"]
qgis = ["qgis", "dev"]
qgis = ["qgis", "dev"]
Loading