File tree Expand file tree Collapse file tree
src/petab_gui/controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Classes for the controllers of the tables in the GUI."""
22
3+ import logging
34import re
45from collections .abc import Sequence
56from pathlib import Path
2223 PandasTableModel ,
2324)
2425from ..settings_manager import settings_manager
25- from ..utils import ConditionInputDialog , get_selected , process_file
26+ from ..utils import (
27+ CaptureLogHandler ,
28+ ConditionInputDialog ,
29+ get_selected ,
30+ process_file ,
31+ )
2632from ..views .other_views import DoseTimeDialog
2733from ..views .table_view import (
2834 ColumnSuggestionDelegate ,
@@ -1325,4 +1331,13 @@ def check_petab_lint(
13251331 ):
13261332 """Check a number of rows of the model with petablint."""
13271333 problem = self .mother_controller .get_current_problem ()
1328- return petab .visualize .validate_visualization_df (problem )
1334+ capture_handler = CaptureLogHandler ()
1335+ logger_vis = logging .getLogger ("petab.v1.visualize.lint" )
1336+ logger_vis .addHandler (capture_handler )
1337+ errors = petab .visualize .lint .validate_visualization_df (problem )
1338+ if not errors :
1339+ return not errors
1340+ captured_output = "<br> " .join (
1341+ capture_handler .get_formatted_messages ()
1342+ )
1343+ raise ValueError (captured_output )
You can’t perform that action at this time.
0 commit comments