Skip to content

app

Full documentation pages are generated for docstring reference only and may contain symbols imported from other modules. Imported symbols are not distinguished from locally defined symbols and will appear in any module that they are imported into. For better information on where symbols should be imported from, review the sourcecode on the github.

FoSpy._dev.testing.app

install_dependencies

install_dependencies()
Source code in FoSpy/_dev/testing/app.py
def install_dependencies():
    print("\nPLEASE NOTE: For changes to take effect, you must exit the testing suite and wait for packages to install before restarting.")
    input("Press any key to continue...")
    subprocess.Popen(
        [sys.executable, "-m", "pip", "install", "-e", ".[DEV-TEST, app]"],
        creationflags=subprocess.CREATE_NEW_PROCESS_GROUP | subprocess.DETACHED_PROCESS
    )

    return False

run

run()
Source code in FoSpy/_dev/testing/app.py
def run():
    from ...ui import app, available
    try:
        app._import_gate()
        subprocess.check_call(
            [sys.executable, "-m", "FoSpy.ui.app"],
        )
        return True
    except available.UINotAvailable:
        if input("Do you want to install additional dependencies for the GUI app? (y/n) ").lower() == "y":
            return install_dependencies()

        return True
    except (SystemExit, Exception):  # noqa: BLE001
        from PySide6.QtWidgets import QApplication
        app = QApplication.instance()
        if app is not None:
            app.quit()
            app.deleteLater()

        return True