diff --git a/charon_vna/gui.py b/charon_vna/gui.py index a5cda73..a561353 100644 --- a/charon_vna/gui.py +++ b/charon_vna/gui.py @@ -5,7 +5,6 @@ from typing import Callable, List, Tuple import matplotlib as mpl import numpy as np import xarray as xr -from gui_helpers import FlowLayout from matplotlib import pyplot as plt from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg from matplotlib.ticker import EngFormatter @@ -23,7 +22,9 @@ from PySide6.QtWidgets import ( QWidget, ) from skrf import plotting as rf_plt -from util import db20, s2vswr + +from charon_vna.gui_helpers import FlowLayout +from charon_vna.util import db20, s2vswr # from vna import Charon @@ -201,9 +202,14 @@ class MainWindow(QMainWindow): # TODO: load config -app = QApplication(sys.argv) +def main() -> None: + app = QApplication(sys.argv) -window = MainWindow() -window.show() + window = MainWindow() + window.show() -app.exec() + app.exec() + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml index 9cb9d09..5d3043c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,8 @@ dynamic = ["version"] homepage = "https://git.brendanhaines.com/brendanhaines/charon" [project.scripts] -# charon = "charon.charon:main" +# charon-cli = "charon_vna.cli:main" +charon-gui = "charon_vna.gui:main" [tool.setuptools_scm] version_file = "charon_vna/_version.py"