Skip to content

Commit

Permalink
tests for GRASS provider
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jun 21, 2021
1 parent 6e93efe commit a0945cf
Show file tree
Hide file tree
Showing 218 changed files with 1,849 additions and 349 deletions.
1 change: 1 addition & 0 deletions python/plugins/grassprovider/CMakeLists.txt
Expand Up @@ -3,6 +3,7 @@ file(GLOB OTHER_FILES grass7.txt metadata.txt)
file(GLOB DESCR_FILES description/*.txt)

add_subdirectory(ext)
add_subdirectory(tests)

PLUGIN_INSTALL(grassprovider . ${PY_FILES} ${OTHER_FILES})
PLUGIN_INSTALL(grassprovider ./description ${DESCR_FILES})
7 changes: 2 additions & 5 deletions python/plugins/grassprovider/Grass7Algorithm.py
Expand Up @@ -75,7 +75,7 @@

from processing.core.parameters import getParameterFromString

from .Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils

from processing.tools.system import isWindows, getTempFilename

Expand Down Expand Up @@ -141,7 +141,7 @@ def __init__(self, descriptionfile):
name = self.name().replace('.', '_')
try:
self.module = importlib.import_module(
'processing.algs.grass7.ext.{}'.format(name))
'grassprovider.ext.{}'.format(name))
except ImportError:
self.module = None

Expand Down Expand Up @@ -445,9 +445,6 @@ def processAlgorithm(self, original_parameters, context, feedback):
outName = out.name()
if outName in parameters:
if outName in self.fileOutputs:
print('ADD', outName)
print('VAL', parameters[outName])
print('VAL 2', self.fileOutputs[outName])
outputs[outName] = self.fileOutputs[outName]
else:
outputs[outName] = parameters[outName]
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/grassprovider/Grass7AlgorithmProvider.py
Expand Up @@ -31,8 +31,8 @@
QgsProcessingUtils,
QgsRuntimeProfiler)
from processing.core.ProcessingConfig import (ProcessingConfig, Setting)
from .Grass7Utils import Grass7Utils
from .Grass7Algorithm import Grass7Algorithm
from grassprovider.Grass7Utils import Grass7Utils
from grassprovider.Grass7Algorithm import Grass7Algorithm
from processing.tools.system import isWindows, isMac


Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/CMakeLists.txt
@@ -1,3 +1,3 @@
file(GLOB PY_FILES *.py)

PLUGIN_INSTALL(processing algs/grass7/ext ${PY_FILES})
PLUGIN_INSTALL(grassprovider ./ext ${PY_FILES})
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/i.py
Expand Up @@ -23,7 +23,7 @@

import os
from processing.tools.system import (isWindows, getTempFilename)
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils
from qgis.PyQt.QtCore import QDir
from qgis.core import QgsProcessingParameterString
from qgis.core import QgsMessageLog
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/grassprovider/ext/i_pansharpen.py
Expand Up @@ -22,9 +22,9 @@
__copyright__ = '(C) 2016, Médéric Ribreux'

import os
from processing.tools.system import getTempFilename
from processing.algs.grass7.Grass7Utils import Grass7Utils
from qgis.core import QgsProcessingParameterString
from processing.tools.system import getTempFilename
from grassprovider.Grass7Utils import Grass7Utils


def processCommand(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_blend_rgb.py
Expand Up @@ -22,7 +22,7 @@
__copyright__ = '(C) 2016, Médéric Ribreux'

import os
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def processInputs(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_category.py
Expand Up @@ -22,7 +22,7 @@
__copyright__ = '(C) 2016, Médéric Ribreux'

from processing.tools.system import getTempFilename
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def checkParameterValuesBeforeExecuting(alg, parameters, context):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_colors.py
Expand Up @@ -22,7 +22,7 @@
__copyright__ = '(C) 2016, Médéric Ribreux'

import os
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils
from processing.tools.system import getTempFilename


Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_colors_stddev.py
Expand Up @@ -21,7 +21,7 @@
__date__ = 'February 2016'
__copyright__ = '(C) 2016, Médéric Ribreux'

from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def processInputs(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_mask_rast.py
Expand Up @@ -21,7 +21,7 @@
__date__ = 'February 2016'
__copyright__ = '(C) 2016, Médéric Ribreux'

from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def processCommand(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_mask_vect.py
Expand Up @@ -21,7 +21,7 @@
__date__ = 'February 2016'
__copyright__ = '(C) 2016, Médéric Ribreux'

from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def processCommand(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_proj.py
Expand Up @@ -23,7 +23,7 @@

from qgis.core import QgsProcessingParameterString
from processing.tools.system import isWindows
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def processInputs(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_series_interp.py
Expand Up @@ -22,7 +22,7 @@
__copyright__ = '(C) 2016, Médéric Ribreux'

import os
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def checkParameterValuesBeforeExecuting(alg, parameters, context):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_statistics.py
Expand Up @@ -22,7 +22,7 @@
__copyright__ = '(C) 2017, Médéric Ribreux'

from qgis.core import QgsProcessingParameterString
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def processCommand(alg, parameters, context, feedback):
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/grassprovider/ext/r_stats_quantile_rast.py
Expand Up @@ -21,9 +21,9 @@
__date__ = 'February 2016'
__copyright__ = '(C) 2016, Médéric Ribreux'

from qgis.core import QgsProcessingParameterString
from processing.algs.grass7.Grass7Utils import Grass7Utils
import os
from qgis.core import QgsProcessingParameterString
from grassprovider.Grass7Utils import Grass7Utils


def processCommand(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/r_tileset.py
Expand Up @@ -21,7 +21,7 @@
__date__ = 'October 2017'
__copyright__ = '(C) 2017, Médéric Ribreux'

from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def processOutputs(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/v_proj.py
Expand Up @@ -22,7 +22,7 @@
__copyright__ = '(C) 2017, Médéric Ribreux'

from qgis.core import QgsProcessingParameterString
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils


def processInputs(alg, parameters, context, feedback):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/grassprovider/ext/v_rectify.py
Expand Up @@ -22,7 +22,7 @@
__copyright__ = '(C) 2016, Médéric Ribreux'

import os
from processing.algs.grass7.Grass7Utils import Grass7Utils
from grassprovider.Grass7Utils import Grass7Utils
from processing.tools.system import getTempFilename


Expand Down

0 comments on commit a0945cf

Please sign in to comment.