11 Commits

Author SHA1 Message Date
github-actions[bot]
7f01052aa5 chore(main): release 0.3.6 (#40)
🤖 I have created a release *beep* *boop*
---


## [0.3.6](https://github.com/shizand/statapp/compare/v0.3.5...v0.3.6)
(2023-09-29)


### Исправления

* добавляет иконку приложения
([#39](https://github.com/shizand/statapp/issues/39))
([d3cd358](d3cd3589a7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-29 12:23:53 +03:00
d3cd3589a7 fix: добавляет иконку приложения (#39)
Closes #38.

---------

Co-authored-by: MisterMLiL <eugenelazurenko@gmail.com>
2023-09-29 12:13:24 +03:00
github-actions[bot]
d71bd9843f chore(main): release 0.3.5 (#37)
🤖 I have created a release *beep* *boop*
---


## [0.3.5](https://github.com/shizand/statapp/compare/v0.3.4...v0.3.5)
(2023-09-28)


### Исправления

* исправлен выбор файла для загрузки (Linux)
([c1809a0](c1809a0bc7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Maxim Slipenko <no-reply@maxim.slipenko.com>
2023-09-28 23:01:25 +03:00
c1809a0bc7 fix: исправлена выбор файла для загрузки (Linux) 2023-09-28 22:55:59 +03:00
github-actions[bot]
83d9faeb85 chore(main): release 0.3.4 (#36)
🤖 I have created a release *beep* *boop*
---


## [0.3.4](https://github.com/shizand/statapp/compare/v0.3.3...v0.3.4)
(2023-09-28)


### Исправления

* исправлена ошибка, при СКО = 0 для фактора
([57dec07](57dec07000))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-28 22:50:15 +03:00
57dec07000 fix: исправлена ошибка, при СКО = 0 для фактора 2023-09-28 22:39:20 +03:00
github-actions[bot]
cca57740a2 chore(main): release 0.3.3 (#29)
🤖 I have created a release *beep* *boop*
---


## [0.3.3](https://github.com/shizand/statapp/compare/v0.3.2...v0.3.3)
(2023-09-28)


### Исправления

* удалена упаковка системных библиотек вместе с программой (Linux)
([b6e10c4](b6e10c4209))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-28 17:37:22 +03:00
b6e10c4209 fix: удалена упаковка системных библиотек вместе с программой (Linux) 2023-09-28 17:25:49 +03:00
github-actions[bot]
67958838fc chore(main): release 0.3.2 (#28)
🤖 I have created a release *beep* *boop*
---


## [0.3.2](https://github.com/shizand/statapp/compare/v0.3.1...v0.3.2)
(2023-09-28)


### Исправления

* исправлена загрузка данных из файла
([8b7fabf](8b7fabfa46))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-28 16:17:12 +03:00
8b7fabfa46 fix: исправлена загрузка данных из файла 2023-09-28 16:12:25 +03:00
f603a77130 ci: ubuntu-latest заменена ubuntu-latest 2023-09-28 16:08:20 +03:00
12 changed files with 99 additions and 16 deletions

View File

@@ -13,11 +13,16 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-20.04, windows-latest]
spec: [statapp-onefile, statapp] spec: [statapp-onefile, statapp]
arch: [x86, x64] arch: [x86, x64]
include:
- os: ubuntu-20.04
target: linux
- os: windows-latest
target: windows
exclude: exclude:
- os: ubuntu-latest - os: ubuntu-20.04
arch: x86 arch: x86
defaults: defaults:
run: run:
@@ -48,12 +53,12 @@ jobs:
with: with:
type: 'zip' type: 'zip'
directory: 'dist' directory: 'dist'
filename: "../${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.spec }}.zip" filename: "../${{ matrix.target }}-${{ matrix.arch }}-${{ matrix.spec }}.zip"
- name: Загрузка артефактов - name: Загрузка артефактов
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.spec }} name: ${{ matrix.target }}-${{ matrix.arch }}-${{ matrix.spec }}
path: '${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.spec }}.zip' path: '${{ matrix.target }}-${{ matrix.arch }}-${{ matrix.spec }}.zip'
release-please: release-please:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -1,5 +1,40 @@
# Changelog # Changelog
## [0.3.6](https://github.com/shizand/statapp/compare/v0.3.5...v0.3.6) (2023-09-29)
### Исправления
* добавляет иконку приложения ([#39](https://github.com/shizand/statapp/issues/39)) ([d3cd358](https://github.com/shizand/statapp/commit/d3cd3589a781df47e6d0e9d669a376aefd9090fe))
## [0.3.5](https://github.com/shizand/statapp/compare/v0.3.4...v0.3.5) (2023-09-28)
### Исправления
* исправлен выбор файла для загрузки (Linux) ([c1809a0](https://github.com/shizand/statapp/commit/c1809a0bc778fde52aa392fb6656b0fd2ffeabe5))
## [0.3.4](https://github.com/shizand/statapp/compare/v0.3.3...v0.3.4) (2023-09-28)
### Исправления
* исправлена ошибка, при СКО = 0 для фактора ([57dec07](https://github.com/shizand/statapp/commit/57dec07000e78d694986b1b90de42b84db14c1a7))
## [0.3.3](https://github.com/shizand/statapp/compare/v0.3.2...v0.3.3) (2023-09-28)
### Исправления
* удалена упаковка системных библиотек вместе с программой (Linux) ([b6e10c4](https://github.com/shizand/statapp/commit/b6e10c420958cf554c1953f30c4cfd9dcadebd1a))
## [0.3.2](https://github.com/shizand/statapp/compare/v0.3.1...v0.3.2) (2023-09-28)
### Исправления
* исправлена загрузка данных из файла ([8b7fabf](https://github.com/shizand/statapp/commit/8b7fabfa46d546b1969bdf9f4800cb0e06fa186a))
## [0.3.1](https://github.com/shizand/statapp/compare/v0.3.0...v0.3.1) (2023-09-28) ## [0.3.1](https://github.com/shizand/statapp/compare/v0.3.0...v0.3.1) (2023-09-28)

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "statapp" name = "statapp"
version = "0.3.1" version = "0.3.6"
description = "" description = ""
authors = [ authors = [
"Maxim Slipenko <statapp@maks1ms.addy.io>" "Maxim Slipenko <statapp@maks1ms.addy.io>"

View File

@@ -1,7 +1,18 @@
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
import sys
import typing
from pprint import pprint
if typing.TYPE_CHECKING:
from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ # noqa: F401
from PyInstaller.building.build_main import Analysis # noqa: F401
from PyInstaller.building.datastruct import TOC, Target, Tree # noqa: F401
from PyInstaller.building.osx import BUNDLE # noqa: F401
from PyInstaller.building.splash import Splash # noqa: F401
from PyInstaller.utils.hooks import copy_metadata from PyInstaller.utils.hooks import copy_metadata
datas = [('statapp/images/sticker.gif', 'images')] datas = [('statapp/ui/images/*', 'ui/images')]
datas += copy_metadata('statapp') datas += copy_metadata('statapp')
a = Analysis( a = Analysis(
@@ -16,6 +27,13 @@ a = Analysis(
excludes=[], excludes=[],
noarchive=False, noarchive=False,
) )
prev_binaries = set(a.binaries)
if sys.platform in ('linux', 'darwin'):
a.exclude_system_libraries(list_of_exceptions=[]) # glob expression
print('\n\nSTRIPPED SYSTEM LIBS')
pprint(sorted(set(prev_binaries) - set(a.binaries)))
pyz = PYZ(a.pure) pyz = PYZ(a.pure)
exe = EXE( exe = EXE(
@@ -37,4 +55,5 @@ exe = EXE(
target_arch=None, target_arch=None,
codesign_identity=None, codesign_identity=None,
entitlements_file=None, entitlements_file=None,
icon='statapp/ui/images/logo.ico',
) )

View File

@@ -1,7 +1,18 @@
# -*- mode: python ; coding: utf-8 -*- # -*- mode: python ; coding: utf-8 -*-
import sys
import typing
from pprint import pprint
if typing.TYPE_CHECKING:
from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ # noqa: F401
from PyInstaller.building.build_main import Analysis # noqa: F401
from PyInstaller.building.datastruct import TOC, Target, Tree # noqa: F401
from PyInstaller.building.osx import BUNDLE # noqa: F401
from PyInstaller.building.splash import Splash # noqa: F401
from PyInstaller.utils.hooks import copy_metadata from PyInstaller.utils.hooks import copy_metadata
datas = [('statapp/images/sticker.gif', 'images')] datas = [('statapp/ui/images/*', 'ui/images')]
datas += copy_metadata('statapp') datas += copy_metadata('statapp')
@@ -17,6 +28,13 @@ a = Analysis(
excludes=[], excludes=[],
noarchive=False, noarchive=False,
) )
prev_binaries = set(a.binaries)
if sys.platform in ('linux', 'darwin'):
a.exclude_system_libraries(list_of_exceptions=[]) # glob expression
print('\n\nSTRIPPED SYSTEM LIBS')
pprint(sorted(set(prev_binaries) - set(a.binaries)))
pyz = PYZ(a.pure) pyz = PYZ(a.pure)
exe = EXE( exe = EXE(
@@ -35,6 +53,7 @@ exe = EXE(
target_arch=None, target_arch=None,
codesign_identity=None, codesign_identity=None,
entitlements_file=None, entitlements_file=None,
icon='statapp/ui/images/logo.ico',
) )
coll = COLLECT( coll = COLLECT(
exe, exe,

View File

@@ -19,7 +19,7 @@ class AboutWindow(QMainWindow):
self.ui = Ui_AboutWindow() self.ui = Ui_AboutWindow()
self.ui.setupUi(self) self.ui.setupUi(self)
image_path = resource_path('images/sticker.gif') image_path = resource_path('ui/images/sticker.gif')
movie = QMovie(image_path) movie = QMovie(image_path)
self.ui.labelgif.setMovie(movie) self.ui.labelgif.setMovie(movie)
movie.start() movie.start()

View File

@@ -1,5 +1,6 @@
import numpy as np import numpy as np
from PySide2.QtCore import Slot, QLocale from PySide2.QtCore import Slot, QLocale, QSize
from PySide2.QtGui import QIcon
from PySide2.QtWidgets import QMainWindow, QMessageBox, QApplication from PySide2.QtWidgets import QMainWindow, QMessageBox, QApplication
from statapp.generate_factor_window import GenerateFactorWindow, INDIRECT_LINK from statapp.generate_factor_window import GenerateFactorWindow, INDIRECT_LINK
@@ -8,6 +9,7 @@ from statapp.generate_window import GenerateWindow
from statapp.about_window import AboutWindow from statapp.about_window import AboutWindow
from statapp.models.fileslc_model import FileSLCModel from statapp.models.fileslc_model import FileSLCModel
from statapp.ui.ui_main_window import Ui_MainWindow from statapp.ui.ui_main_window import Ui_MainWindow
from statapp.utils import resource_path
class MainWindow(QMainWindow): class MainWindow(QMainWindow):
@@ -17,6 +19,10 @@ class MainWindow(QMainWindow):
self.ui = Ui_MainWindow() self.ui = Ui_MainWindow()
self.ui.setupUi(self) self.ui.setupUi(self)
icon = QIcon()
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
self.setWindowIcon(icon)
self.isDataChanged = False self.isDataChanged = False
self.model = DataModel() self.model = DataModel()
self.fileModel = FileSLCModel() self.fileModel = FileSLCModel()
@@ -88,6 +94,8 @@ class MainWindow(QMainWindow):
k = 2 - 1 / k k = 2 - 1 / k
if gfw.typeConnection == INDIRECT_LINK: if gfw.typeConnection == INDIRECT_LINK:
k = 1 / k k = 1 / k
if gfw.deviation == 0:
k = 1
x = np.random.normal(gfw.mat * (k ** 3), gfw.deviation * k, size=1) x = np.random.normal(gfw.mat * (k ** 3), gfw.deviation * k, size=1)
x_arr = np.append(x_arr, x) x_arr = np.append(x_arr, x)

View File

@@ -16,8 +16,8 @@ class FileSLCModel:
return False return False
def loadFile(self): def loadFile(self):
self.file_name, _ = QFileDialog.getOpenFileName(None, "Загрузить файл", "", "Files (*.txt;*.csv)") self.file_name, _ = QFileDialog.getOpenFileName(None, "Загрузить файл", "", "Files (*.txt *.csv)")
if not self.file_name: if self.file_name:
try: try:
content = np.genfromtxt(self.file_name, delimiter=',', invalid_raise=True) content = np.genfromtxt(self.file_name, delimiter=',', invalid_raise=True)
except ValueError as e: except ValueError as e:
@@ -30,4 +30,4 @@ class FileSLCModel:
def closeFile(self): def closeFile(self):
self.file_name = None self.file_name = None
pass pass

BIN
statapp/ui/images/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

@@ -112,6 +112,5 @@
</property> </property>
</action> </action>
</widget> </widget>
<resources/>
<connections/> <connections/>
</ui> </ui>

View File

@@ -12,7 +12,6 @@ from PySide2.QtCore import *
from PySide2.QtGui import * from PySide2.QtGui import *
from PySide2.QtWidgets import * from PySide2.QtWidgets import *
class Ui_MainWindow(object): class Ui_MainWindow(object):
def setupUi(self, MainWindow): def setupUi(self, MainWindow):
if not MainWindow.objectName(): if not MainWindow.objectName():
@@ -97,4 +96,3 @@ class Ui_MainWindow(object):
self.modelmenu.setTitle(QCoreApplication.translate("MainWindow", u"\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435", None)) self.modelmenu.setTitle(QCoreApplication.translate("MainWindow", u"\u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435", None))
self.helpmenu.setTitle(QCoreApplication.translate("MainWindow", u"\u0421\u043f\u0440\u0430\u0432\u043a\u0430", None)) self.helpmenu.setTitle(QCoreApplication.translate("MainWindow", u"\u0421\u043f\u0440\u0430\u0432\u043a\u0430", None))
# retranslateUi # retranslateUi