Skip to content

Commit

Permalink
Add a GUI script entry point (fix #12)
Browse files Browse the repository at this point in the history
  • Loading branch information
musicinmybrain committed Nov 22, 2021
1 parent f0fe8e6 commit d470cf4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AppData/io.github.lukapecnik.niaaml_gui.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Comment=A basic graphical user interface intended for users of the NiaAML Python
Categories=Science;ArtificialIntelligence;

Icon=niaaml-gui
Exec=main.py
Exec=NiaAML-GUI
Terminal=false
7 changes: 5 additions & 2 deletions niaaml_gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ def __setOptimizationV1View(self):
def __setUsePipelineView(self):
self.setCentralWidget(UsePipelineWidget(self))

if __name__ == '__main__':
def run():
app = QtWidgets.QApplication(sys.argv)
app.setStyle('Fusion')
mainWin = MainAppWindow()
mainWin.show()
sys.exit(app.exec_())
sys.exit(app.exec_())

if __name__ == '__main__':
run()
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ niaaml = "^1.1.1rc2"
[tool.poetry.dev-dependencies]
pytest = "^5.2"

[tool.poetry.scripts]
NiaAML-GUI = 'niaaml_gui.main:run'

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit d470cf4

Please sign in to comment.