Last active
December 7, 2017 15:14
-
-
Save ghtmtt/1c3cada5d079e22fff29509627c46c76 to your computer and use it in GitHub Desktop.
Processing tests missing list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing | |
import yaml | |
# get QGIS algorithm list by name | |
qgis_algs = [i.name() for i in QgsApplication.processingRegistry().providerById("qgis").algorithms()] | |
# get NATIVE algorithm list by name | |
native_algs = [i.name() for i in QgsApplication.processingRegistry().providerById("native").algorithms()] | |
# total algorithms of QGIS provider in Processing | |
total_algs = qgis_algs + native_algs | |
# catch the done tests from the local file of the repository | |
done_qgis = [] | |
path = 'https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml' | |
with open(path) as f: | |
m_qgis = yaml.safe_load(f) | |
for k, v in m_qgis.items(): | |
for i in v: | |
done_qgis.append(i['algorithm'].split(':')[1]) | |
done_qgis = list(set(done_qgis)) | |
done_qgis.sort() | |
# missing list of tests | |
missing_qgis = [] | |
for i in total_algs: | |
if i not in done_qgis: | |
missing_qgis.append(i) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment