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

nens / ThreeDiToolbox / #2631

28 Nov 2025 05:48PM UTC coverage: 36.534% (-0.02%) from 36.554%
#2631

push

coveralls-python

web-flow
Merge 86de4b147 into 18c57d6c2

13 of 77 new or added lines in 22 files covered. (16.88%)

3 existing lines in 3 files now uncovered.

5262 of 14403 relevant lines covered (36.53%)

0.37 hits per line

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

82.14
/misc_tools.py
1
# (c) Nelen & Schuurmans, see LICENSE.rst.
2
"""
1✔
3
Miscellaneous tools.
4
"""
5
from qgis.PyQt.QtCore import pyqtSignal
1✔
6
from threedi_results_analysis.utils.qlogging import FileHandler
1✔
7
from threedi_results_analysis.utils.user_messages import pop_up_info
1✔
8
from threedi_results_analysis.threedi_plugin_tool import ThreeDiPluginTool
1✔
9

10
import logging
1✔
11
import os
1✔
12

13

14
logger = logging.getLogger(__name__)
1✔
15

16

17
class ShowLogfile(ThreeDiPluginTool):
1✔
18
    """Show link to the logfile."""
19

20
    def __init__(self, iface):
1✔
21
        super().__init__()
1✔
22
        self.iface = iface
1✔
23
        self.icon_path = os.path.join(os.path.dirname(__file__), "icons", "icon_logfile.png")
1✔
24
        # ^^^ logo: LGPL, made by Oxygen Team, see
25
        # http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/
26
        self.menu_text = "Show Rana Results Analysis log file (for debugging purposes)"
1✔
27

28
    def run(self):
1✔
29
        """Show dialog with a simple clickable link to the logfile.
30

31
        Later on, we could also show the entire logfile inside the dialog. Or
32
        suggest an email. The clickable link is OK for now.
33

34
        Note: such a link does not work within the development docker.
35

36
        """
37
        title = "Show Rana Results Analysis log file (for debugging purposes)"
1✔
38
        location = FileHandler.get_filename()
1✔
39
        message = "Log file location: <a href='file:///%s'>%s</a>" % (location, location)
1✔
40
        pop_up_info(message, title, self.iface.mainWindow())
1✔
41

42

43
class ToggleResultsManager(ThreeDiPluginTool):
1✔
44
    """Add Rana logo and about info."""
45
    triggered = pyqtSignal()
1✔
46

47
    def __init__(self, iface):
1✔
48
        super().__init__()
×
49
        self.iface = iface
×
NEW
50
        self.icon_path = os.path.join(os.path.dirname(__file__), "icons", "icon_panel.svg")
×
NEW
51
        self.menu_text = "Simulation Results Manager"
×
52

53
    def run(self):
1✔
54
        """Shows dialog with version information."""
55
        self.triggered.emit()
×
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