Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Фикс сборки
Browse files Browse the repository at this point in the history
  • Loading branch information
rkolovanov committed Dec 5, 2023
1 parent 4a3c22b commit cfdb5b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
with:
python-version: 3.11
- run: pip install -r requirements.txt pyinstaller
- run: pyuic -o optimization_methods/gui/MainWindowUi.py optimization_methods/gui/MainWindow.ui
- run: pyinstaller --noconsole --onefile --icon=etc/icon.ico --add-data="optimization_methods/gui/MainWindow.ui;." --name optimization_methods optimization_methods/__main__.py
- uses: actions/upload-artifact@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
venv
optimization_methods/gui/MainWindowUi.py
9 changes: 3 additions & 6 deletions optimization_methods/gui/MainWindow.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import numpy as np
from pathlib import Path
from PyQt5 import uic
from PyQt5.QtWidgets import QMainWindow
from optimization_methods.common import Function
from optimization_methods.common import GradientDescentMethod, NewtonMethod, ConjugateGradientsMethod
from .MainWindowUi import Ui_MainWindow


class MainWindow(QMainWindow):
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self):
super().__init__()
self._setup_ui()

def _setup_ui(self):
ui_filepath = str(Path(__file__).parent.absolute().joinpath(f"{self.__class__.__name__}.ui"))
uic.loadUi(ui_filepath, self)

self.setupUi(self)
self.startButton.pressed.connect(self._start_method_execution)

def _set_results(self, results: str):
Expand Down

0 comments on commit cfdb5b9

Please sign in to comment.