MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / show_debug_report_dialog

Function show_debug_report_dialog

deeplabcut/gui/dialogs/debug_dialog.py:237–280  ·  view source on GitHub ↗

Open (or reuse) the full diagnostic report dialog. If ``recorder`` is not provided, this function tries to reuse an existing recorder for the given logger namespace and installs one if missing.

(
    *,
    parent: QWidget,
    recorder: InMemoryDebugRecorder | None = None,
    logger_name: str = "deeplabcut",
    libraries: Iterable[LibrarySpec | str] | None = None,
    executables: Iterable[ExecutableSpec | str] | None = None,
    include_module_paths: bool = False,
    include_executable_paths: bool = True,
    log_limit: int = 300,
    dialog_attr_name: str = "_dlc_debug_dialog",
)

Source from the content-addressed store, hash-verified

235
236
237def show_debug_report_dialog(
238 *,
239 parent: QWidget,
240 recorder: InMemoryDebugRecorder | None = None,
241 logger_name: str = "deeplabcut",
242 libraries: Iterable[LibrarySpec | str] | None = None,
243 executables: Iterable[ExecutableSpec | str] | None = None,
244 include_module_paths: bool = False,
245 include_executable_paths: bool = True,
246 log_limit: int = 300,
247 dialog_attr_name: str = "_dlc_debug_dialog",
248) -> DebugTextDialog:
249 """
250 Open (or reuse) the full diagnostic report dialog.
251
252 If ``recorder`` is not provided, this function tries to reuse an existing
253 recorder for the given logger namespace and installs one if missing.
254 """
255 if recorder is None:
256 recorder = get_debug_recorder(logger_name=logger_name)
257 if recorder is None:
258 recorder = install_debug_recorder(logger_name=logger_name)
259
260 provider = make_issue_report_provider(
261 recorder=recorder,
262 libraries=libraries,
263 executables=executables,
264 include_module_paths=include_module_paths,
265 include_executable_paths=include_executable_paths,
266 log_limit=log_limit,
267 )
268
269 dlg = _get_or_create_debug_dialog(
270 parent=parent,
271 title="DeepLabCut debug log",
272 text_provider=provider,
273 text_hint=("Diagnostic report for issue reporting. Use Refresh to update, then Copy to clipboard."),
274 attr_name=dialog_attr_name,
275 )
276 # dlg.refresh_text() # redundant
277 dlg.show()
278 dlg.raise_()
279 dlg.activateWindow()
280 return dlg
281
282
283def create_generate_debug_log_action(

Callers 1

_open_dialogFunction · 0.85

Calls 5

get_debug_recorderFunction · 0.90
install_debug_recorderFunction · 0.90
showMethod · 0.80

Tested by

no test coverage detected