LCOV - code coverage report
Current view: top level - src/pairinteraction_gui - __init__.py (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 13 46.2 %
Date: 2025-06-06 09:09:03 Functions: 0 2 0.0 %

          Line data    Source code
       1             : # SPDX-FileCopyrightText: 2025 Pairinteraction Developers
       2             : # SPDX-License-Identifier: LGPL-3.0-or-later
       3             : 
       4             : 
       5           1 : import multiprocessing
       6           1 : import sys
       7             : 
       8           1 : from pairinteraction_gui.app import Application
       9           1 : from pairinteraction_gui.main_window import MainWindow
      10             : 
      11           1 : __all__ = ["main"]
      12             : 
      13             : 
      14           1 : def main() -> int:
      15             :     """Run the PairInteraction GUI application.
      16             : 
      17             :     Returns:
      18             :         int: Application exit code
      19             : 
      20             :     """
      21             :     # Multithreading together with "fork" is not supported.
      22             :     # Furthermore, "spawn" will become the default in Python 3.14 on all platforms,
      23             :     # see also https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
      24             :     # Thus, we already now set the start method to "spawn" for all platforms.
      25           0 :     multiprocessing.set_start_method("spawn")
      26             : 
      27           0 :     app = Application(sys.argv)
      28           0 :     app.setApplicationName("PairInteraction")
      29             : 
      30           0 :     app.allow_ctrl_c()
      31             : 
      32           0 :     window = MainWindow()
      33           0 :     window.show()
      34             : 
      35           0 :     return app.exec()

Generated by: LCOV version 1.16