示例#1
0
    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()
示例#3
0
    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)
示例#4
0
 def longName(self):
     version = Grass7Utils.installedVersion()
     return 'GRASS GIS ({})'.format(
         version) if version is not None else "GRASS GIS"