def setUpClass(cls): start_app() cls.provider = Grass7AlgorithmProvider() QgsApplication.processingRegistry().addProvider(cls.provider) cls.cleanup_paths = [] assert Grass7Utils.installedVersion()
def setUpClass(cls): start_app() cls.provider = Grass7AlgorithmProvider() QgsApplication.processingRegistry().addProvider(cls.provider) cls.cleanup_paths = [] cls.temp_dir = tempfile.mkdtemp() cls.cleanup_paths.append(cls.temp_dir) assert Grass7Utils.installedVersion()
def loadAlgorithms(self): version = Grass7Utils.installedVersion(True) if version is None: QgsMessageLog.logMessage( self. tr('Problem with GRASS installation: GRASS was not found or is not correctly installed' ), self.tr('Processing'), Qgis.Critical) return self.algs = self.createAlgsList() for a in self.algs: self.addAlgorithm(a)
def longName(self): version = Grass7Utils.installedVersion() return 'GRASS GIS ({})'.format( version) if version is not None else "GRASS GIS"