• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nens / ThreeDiToolbox / #2600

01 Oct 2025 08:42AM UTC coverage: 34.793% (-0.3%) from 35.131%
#2600

push

coveralls-python

web-flow
Fat improvements (#1143)

* qt6 stub

* qt6

* qt5 -> qt6

* convert

* fix

* FAT: Toggle items on/off with space bar

* basic color changing, still need to save in project

* lint

* Switching stacked or volume mode takes selection into account

* Fraction Analysis Tool: substances are listed alphabetically (#1133)

* CHANGES

* Qt6 fixes

* Plot highlighting (#1132)

* Stub plot highlighting

* stub plot highlighting

* Optimizations

* stub value marker

* Closest curve is now pixel-based

* Make coverals non-blocking for PRs GA

* optimiziation

* Proper highlighting of fills

* proper highlighting of bottom fill (uses fillLevel)

* lint

* refactor

* FAT: curve marker has same color as closest line

82 of 406 new or added lines in 42 files covered. (20.2%)

9 existing lines in 6 files now uncovered.

4878 of 14020 relevant lines covered (34.79%)

0.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

43.18
/processing/gpkg_conversion_algorithm.py
1
from collections import OrderedDict
1✔
2
from qgis.PyQt.QtCore import QCoreApplication
1✔
3
from qgis.core import (
1✔
4
    QgsProcessingAlgorithm,
5
    QgsProcessingException,
6
    QgsProcessingParameterFile,
7
    QgsProcessingParameterFileDestination,
8
)
9
from threedi_results_analysis.processing.processing_utils import gridadmin2geopackage, load_computational_layers
1✔
10

11

12
class ThreeDiConvertToGpkgAlgorithm(QgsProcessingAlgorithm):
1✔
13
    """Convert gridadmin.h5 to GeoPackage with vector layers and add subset of those layers to the map canvas."""
14

15
    INPUT = "INPUT"
1✔
16
    OUTPUT = "OUTPUT"
1✔
17
    LAYERS_TO_ADD = OrderedDict()
1✔
18

19
    def flags(self):
1✔
NEW
20
        return super().flags() | QgsProcessingAlgorithm.Flag.FlagNoThreading
×
21

22
    def tr(self, string):
1✔
23
        return QCoreApplication.translate("Processing", string)
×
24

25
    def createInstance(self):
1✔
26
        return ThreeDiConvertToGpkgAlgorithm()
×
27

28
    def name(self):
1✔
29
        return "threedi_convert_gridadmin_to_gpkg"
×
30

31
    def displayName(self):
1✔
32
        return self.tr("Computational grid from gridadmin.h5 file")
×
33

34
    def group(self):
1✔
35
        return self.tr("Computational Grid")
×
36

37
    def groupId(self):
1✔
38
        return "computational_grid"
×
39

40
    def shortHelpString(self):
1✔
41
        return self.tr("Create computational grid from gridadmin.h5 file")
×
42

43
    def initAlgorithm(self, config=None):
1✔
44

45
        self.addParameter(
×
46
            QgsProcessingParameterFile(
47
                self.INPUT, self.tr("Gridadmin.h5 file"), extension="h5",
48
            )
49
        )
50

51
        self.addParameter(
×
52
            QgsProcessingParameterFileDestination(
53
                self.OUTPUT, self.tr("Output GeoPackage file"), fileFilter="*.gpkg",
54
            )
55
        )
56

57
    def processAlgorithm(self, parameters, context, feedback):
1✔
58
        input_gridadmin = self.parameterAsString(parameters, self.INPUT, context)
×
59
        if input_gridadmin is None:
×
60
            raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT))
×
61

62
        gpkg_path = self.parameterAsFileOutput(parameters, self.OUTPUT, context)
×
63
        if gpkg_path is None:
×
64
            raise QgsProcessingException(self.invalidSourceError(parameters, self.OUTPUT))
×
65
        if gpkg_path.endswith(".file"):
×
66
            gpkg_path = gpkg_path.rsplit(".", 1)[0] + ".gpkg"
×
67

68
        gpkg_layers = gridadmin2geopackage(input_gridadmin, gpkg_path, context, feedback)
×
69
        self.LAYERS_TO_ADD.update(gpkg_layers)
×
70

71
        return {}
×
72

73
    def postProcessAlgorithm(self, context, feedback):
1✔
74
        project = context.project()
×
75
        load_computational_layers(self.LAYERS_TO_ADD, project)
×
76
        self.LAYERS_TO_ADD.clear()
×
77
        return {}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc