mirror of
https://github.com/shizand/statapp.git
synced 2025-10-08 05:03:27 +03:00
Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7497f71665 | ||
88ceabf019 | |||
|
15825c2200 | ||
fbf359e515 | |||
|
023a4a5142 | ||
|
3a655178d4 | ||
|
4854a14e70 | ||
86346b9c5b | |||
a3f7c1ac0b | |||
0779941dc9 | |||
0a32e4baee | |||
c77ed6a82f | |||
|
7f01052aa5 | ||
d3cd3589a7 | |||
|
d71bd9843f | ||
c1809a0bc7 | |||
|
83d9faeb85 | ||
57dec07000 | |||
|
cca57740a2 | ||
b6e10c4209 | |||
|
67958838fc | ||
8b7fabfa46 | |||
f603a77130 | |||
|
775c0887ab | ||
2b061bed2f | |||
48ae2644e8 | |||
|
930424dfb9 | ||
|
b73a3f5d3b | ||
2cd82354a1 | |||
|
16d8481700 | ||
37ea556ad2 | |||
c0fbc0fbd9 | |||
cb34931151 | |||
bdc530b2e0 |
17
.copyright.tmpl
Normal file
17
.copyright.tmpl
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Copyright (c) ${years} Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
|
||||||
|
This file is part of Statapp
|
||||||
|
(see https://github.com/shizand/statapp).
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
@@ -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:
|
||||||
@@ -42,22 +47,31 @@ jobs:
|
|||||||
- name: Установка зависимостей
|
- name: Установка зависимостей
|
||||||
run: poetry install
|
run: poetry install
|
||||||
- name: Сборка
|
- name: Сборка
|
||||||
run: poetry run pyinstaller ${{ matrix.spec }}.spec
|
run: poetry run pyinstaller ${{ matrix.spec }}.spec\
|
||||||
|
- name: Архивация
|
||||||
|
uses: thedoctor0/zip-release@0.7.1
|
||||||
|
with:
|
||||||
|
type: 'zip'
|
||||||
|
directory: 'dist'
|
||||||
|
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: ./dist/statapp*
|
path: '${{ matrix.target }}-${{ matrix.arch }}-${{ matrix.spec }}.zip'
|
||||||
|
|
||||||
release-please:
|
release-please:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
steps:
|
steps:
|
||||||
- uses: google-github-actions/release-please-action@v3
|
- uses: google-github-actions/release-please-action@v3
|
||||||
|
id: release
|
||||||
with:
|
with:
|
||||||
release-type: python
|
release-type: python
|
||||||
package-name: statapp
|
package-name: statapp
|
||||||
changelog-types: '[{"type":"feat","section":"Новые функции","hidden":false},{"type":"fix","section":"Исправления","hidden":false},{"type":"chore", "hidden":true}]'
|
changelog-types: '[{"type":"feat","section":"Новые функции","hidden":false},{"type":"fix","section":"Исправления","hidden":false},{"type":"chore", "hidden":true}]'
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
if: ${{ steps.release.outputs.release_created }}
|
||||||
- name: Скачивание артефактов
|
- name: Скачивание артефактов
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
if: ${{ steps.release.outputs.release_created }}
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
@@ -68,4 +82,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run:
|
run:
|
||||||
gh release upload ${{ steps.release.outputs.tag_name }} ./dist/*
|
gh release upload ${{ steps.release.outputs.tag_name }} ./dist/**/*.zip
|
||||||
|
@@ -8,3 +8,9 @@ repos:
|
|||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
|
- repo: https://github.com/johann-petrak/licenseheaders.git
|
||||||
|
rev: v0.8.8
|
||||||
|
hooks:
|
||||||
|
- id: licenseheaders
|
||||||
|
args: ["-t", ".copyright.tmpl", "-cy", "-f", "-d", "statapp"]
|
||||||
|
pass_filenames: false
|
||||||
|
74
CHANGELOG.md
74
CHANGELOG.md
@@ -1,5 +1,79 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.4.0](https://github.com/shizand/statapp/compare/v0.3.6...v0.4.0) (2023-10-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Новые функции
|
||||||
|
|
||||||
|
* добавлен дисперсионный анализ ([#46](https://github.com/shizand/statapp/issues/46)) ([c77ed6a](https://github.com/shizand/statapp/commit/c77ed6a82fefbbf8879ba87d62bd895ebfd1e6fa)), closes [#30](https://github.com/shizand/statapp/issues/30)
|
||||||
|
* добавлен Корреляционный анализ ([#54](https://github.com/shizand/statapp/issues/54)) ([3a65517](https://github.com/shizand/statapp/commit/3a655178d4e262c7df42b9c1567dcaf997c58071)), closes [#31](https://github.com/shizand/statapp/issues/31)
|
||||||
|
|
||||||
|
|
||||||
|
### Исправления
|
||||||
|
|
||||||
|
* добавлена иконка для окна "О программе" ([#55](https://github.com/shizand/statapp/issues/55)) ([023a4a5](https://github.com/shizand/statapp/commit/023a4a514221ab22bb29f87aeccd20b5595d1b2e))
|
||||||
|
* добавлены заголовки диалоговых окон ([#49](https://github.com/shizand/statapp/issues/49)) ([a3f7c1a](https://github.com/shizand/statapp/commit/a3f7c1ac0b1bd16a2954dce83996c2e3677a7164)), closes [#44](https://github.com/shizand/statapp/issues/44)
|
||||||
|
* исправлен баг "index 0 is out of bounds" ([#59](https://github.com/shizand/statapp/issues/59)) ([15825c2](https://github.com/shizand/statapp/commit/15825c22007baeceebee98d19515ff038c1c2ae4)), closes [#43](https://github.com/shizand/statapp/issues/43)
|
||||||
|
* исправлена генерация значений фактора ([#53](https://github.com/shizand/statapp/issues/53)) ([4854a14](https://github.com/shizand/statapp/commit/4854a14e709272fe92463ac43d29f9a73a5f9875)), closes [#50](https://github.com/shizand/statapp/issues/50)
|
||||||
|
* исправлены баги с отображением и считыванием исходных данных ([#58](https://github.com/shizand/statapp/issues/58)) ([fbf359e](https://github.com/shizand/statapp/commit/fbf359e515f962dd5e079d7a13b5b7dc39339764))
|
||||||
|
* ограничена генерация чисел до сотых ([#48](https://github.com/shizand/statapp/issues/48)) ([0779941](https://github.com/shizand/statapp/commit/0779941dc9d9e83c35aff9f07a563da31e5c62c4)), closes [#32](https://github.com/shizand/statapp/issues/32)
|
||||||
|
|
||||||
|
## [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)
|
||||||
|
|
||||||
|
|
||||||
|
### Исправления
|
||||||
|
|
||||||
|
* исправлена локализация стандартных кнопок ([2b061be](https://github.com/shizand/statapp/commit/2b061bed2f6343fc2feb87472afc4c9a051b30a9))
|
||||||
|
|
||||||
|
## [0.3.0](https://github.com/shizand/statapp/compare/v0.2.1...v0.3.0) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Новые функции
|
||||||
|
|
||||||
|
* добавлено чтение и запись исходных данных в файлы .txt, .csv ([#24](https://github.com/shizand/statapp/issues/24)) ([b73a3f5](https://github.com/shizand/statapp/commit/b73a3f5d3ba5707f0bdb816452ad7f59c0da8290))
|
||||||
|
|
||||||
|
## [0.2.1](https://github.com/shizand/statapp/compare/v0.2.0...v0.2.1) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Исправления
|
||||||
|
|
||||||
|
* обновлено окно "О программе" ([#21](https://github.com/shizand/statapp/issues/21)) ([37ea556](https://github.com/shizand/statapp/commit/37ea556ad20c7b2d3b346e0eafd583c60121d594))
|
||||||
|
|
||||||
## [0.2.0](https://github.com/shizand/statapp/compare/v0.1.0...v0.2.0) (2023-09-28)
|
## [0.2.0](https://github.com/shizand/statapp/compare/v0.1.0...v0.2.0) (2023-09-28)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "statapp"
|
name = "statapp"
|
||||||
version = "0.2.0"
|
version = "0.4.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = [
|
authors = [
|
||||||
"Maxim Slipenko <statapp@maks1ms.addy.io>"
|
"Maxim Slipenko <statapp@maks1ms.addy.io>"
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
poetry version "$@"
|
|
@@ -1,11 +1,25 @@
|
|||||||
# -*- 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
|
||||||
|
|
||||||
|
datas = [('statapp/ui/images/*', 'ui/images')]
|
||||||
|
datas += copy_metadata('statapp')
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['statapp/__main__.py'],
|
['statapp/__main__.py'],
|
||||||
pathex=[],
|
pathex=[],
|
||||||
binaries=[],
|
binaries=[],
|
||||||
datas=[],
|
datas=datas,
|
||||||
hiddenimports=[],
|
hiddenimports=[],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
hooksconfig={},
|
hooksconfig={},
|
||||||
@@ -13,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(
|
||||||
@@ -34,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',
|
||||||
)
|
)
|
||||||
|
27
statapp.spec
27
statapp.spec
@@ -1,11 +1,26 @@
|
|||||||
# -*- 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
|
||||||
|
|
||||||
|
datas = [('statapp/ui/images/*', 'ui/images')]
|
||||||
|
datas += copy_metadata('statapp')
|
||||||
|
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['statapp/__main__.py'],
|
['statapp/__main__.py'],
|
||||||
pathex=[],
|
pathex=[],
|
||||||
binaries=[],
|
binaries=[],
|
||||||
datas=[('statapp/images/sticker.gif', 'images')],
|
datas=datas,
|
||||||
hiddenimports=[],
|
hiddenimports=[],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
hooksconfig={},
|
hooksconfig={},
|
||||||
@@ -13,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(
|
||||||
@@ -25,12 +47,13 @@ exe = EXE(
|
|||||||
bootloader_ignore_signals=False,
|
bootloader_ignore_signals=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
console=True,
|
console=False,
|
||||||
disable_windowed_traceback=False,
|
disable_windowed_traceback=False,
|
||||||
argv_emulation=False,
|
argv_emulation=False,
|
||||||
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,
|
||||||
|
@@ -1,4 +1,25 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from PySide2 import QtCore
|
||||||
from PySide2.QtWidgets import QApplication
|
from PySide2.QtWidgets import QApplication
|
||||||
|
|
||||||
from statapp.main_window import MainWindow
|
from statapp.main_window import MainWindow
|
||||||
@@ -6,6 +27,13 @@ from statapp.main_window import MainWindow
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
|
translator = QtCore.QTranslator(app)
|
||||||
|
locale = QtCore.QLocale.system().name()
|
||||||
|
path = QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)
|
||||||
|
translator.load('qt_%s' % locale, path)
|
||||||
|
app.installTranslator(translator)
|
||||||
|
|
||||||
window = MainWindow()
|
window = MainWindow()
|
||||||
window.show()
|
window.show()
|
||||||
return app.exec_()
|
return app.exec_()
|
||||||
|
@@ -1,23 +1,49 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
import sys
|
||||||
from PySide2.QtGui import QMovie
|
from PySide2.QtGui import QMovie
|
||||||
from PySide2.QtWidgets import QMainWindow
|
from PySide2.QtWidgets import QMainWindow
|
||||||
|
|
||||||
from statapp.ui.ui_about_window import Ui_AboutWindow
|
from statapp.ui.ui_about_window import Ui_AboutWindow
|
||||||
from statapp.utils import resource_path
|
from statapp.utils import resource_path
|
||||||
|
|
||||||
|
if sys.version_info < (3, 8):
|
||||||
|
import importlib_metadata
|
||||||
|
else:
|
||||||
|
import importlib.metadata as importlib_metadata
|
||||||
|
|
||||||
|
|
||||||
class AboutWindow(QMainWindow):
|
class AboutWindow(QMainWindow):
|
||||||
pixmap = None
|
movie = None
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
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()
|
||||||
|
self.movie = movie
|
||||||
self.pixmap = movie
|
|
||||||
self.setFixedSize(self.size())
|
self.setFixedSize(self.size())
|
||||||
|
|
||||||
|
version = importlib_metadata.version(__package__ or __name__)
|
||||||
|
self.ui.versionLabel.setText(f"Версия: {version}")
|
||||||
|
51
statapp/calculations.py
Normal file
51
statapp/calculations.py
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
import numpy as np
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
DIRECT_LINK = 0
|
||||||
|
INDIRECT_LINK = 1
|
||||||
|
|
||||||
|
|
||||||
|
def generate_x_values(mean, std, typeConnection, y):
|
||||||
|
yMean = np.mean(y)
|
||||||
|
values = []
|
||||||
|
for cur_y in y:
|
||||||
|
raz = np.abs(mean - np.random.normal(mean, std))
|
||||||
|
if typeConnection == INDIRECT_LINK:
|
||||||
|
raz *= -1
|
||||||
|
if cur_y > yMean:
|
||||||
|
x = mean + raz
|
||||||
|
elif cur_y < yMean:
|
||||||
|
x = mean - raz
|
||||||
|
else:
|
||||||
|
x = mean
|
||||||
|
values.append(x)
|
||||||
|
return np.array(values)
|
||||||
|
|
||||||
|
|
||||||
|
def variance_analysis(data):
|
||||||
|
return np.array([
|
||||||
|
[np.mean(col), np.std(col), np.min(col), np.max(col)] for col in data.T
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
def correlation_analysis(data):
|
||||||
|
return pd.DataFrame(data).corr().to_numpy()
|
37
statapp/correlation_analysis.py
Normal file
37
statapp/correlation_analysis.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
from PySide2.QtWidgets import QDialog, QHeaderView
|
||||||
|
|
||||||
|
from statapp.calculations import correlation_analysis
|
||||||
|
from statapp.models.correlation_analysis_model import CorrelationAnalysisModel
|
||||||
|
from statapp.ui.ui_correlation_analysis_window import Ui_CorrelationAnalysisWindow
|
||||||
|
|
||||||
|
|
||||||
|
class СorrelationAnalysisWindow(QDialog):
|
||||||
|
def __init__(self, data):
|
||||||
|
super().__init__()
|
||||||
|
self.ui = Ui_CorrelationAnalysisWindow()
|
||||||
|
self.ui.setupUi(self)
|
||||||
|
|
||||||
|
res = correlation_analysis(data)
|
||||||
|
self.model = CorrelationAnalysisModel(res.round(2))
|
||||||
|
self.ui.tableView.setModel(self.model)
|
||||||
|
header = self.ui.tableView.horizontalHeader()
|
||||||
|
header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
@@ -1,3 +1,22 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
from PySide2.QtCore import Slot
|
from PySide2.QtCore import Slot
|
||||||
from PySide2.QtWidgets import QDialog
|
from PySide2.QtWidgets import QDialog
|
||||||
|
|
||||||
|
@@ -1,3 +1,22 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
from PySide2.QtCore import Slot
|
from PySide2.QtCore import Slot
|
||||||
from PySide2.QtWidgets import QDialog
|
from PySide2.QtWidgets import QDialog
|
||||||
|
|
||||||
|
@@ -1,66 +1,178 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from PySide2.QtCore import Slot
|
from PySide2.QtCore import Slot, QSize
|
||||||
from PySide2.QtWidgets import QMainWindow
|
from PySide2.QtGui import QIcon
|
||||||
|
from PySide2.QtWidgets import QMainWindow, QMessageBox, QAction
|
||||||
|
|
||||||
from statapp.generate_factor_window import GenerateFactorWindow, INDIRECT_LINK
|
from statapp.calculations import generate_x_values
|
||||||
from statapp.models.data_model import DataModel
|
from statapp.generate_factor_window import GenerateFactorWindow
|
||||||
|
from statapp.models.input_values_model import InputValuesModel
|
||||||
from statapp.generate_window import GenerateWindow
|
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.ui.ui_main_window import Ui_MainWindow
|
from statapp.ui.ui_main_window import Ui_MainWindow
|
||||||
|
from statapp.utils import resource_path, buildMessageBox
|
||||||
|
from statapp.variance_analysis import VarianceAnalysisWindow
|
||||||
|
from statapp.correlation_analysis import СorrelationAnalysisWindow
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QMainWindow):
|
class MainWindow(QMainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.ui = Ui_MainWindow()
|
self.ui = Ui_MainWindow()
|
||||||
self.ui.setupUi(self)
|
self.ui.setupUi(self)
|
||||||
|
|
||||||
self.model = DataModel()
|
icon = QIcon()
|
||||||
|
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||||
|
|
||||||
|
self.ui.generateXaction.setEnabled(False)
|
||||||
|
self.ui.varianceAnalysisAction.setEnabled(False)
|
||||||
|
self.ui.correlationAnalisisAction.setEnabled(False)
|
||||||
|
|
||||||
|
self.isDataChanged = False
|
||||||
|
self.model = InputValuesModel()
|
||||||
|
self.fileModel = FileSLCModel()
|
||||||
self.ui.tableView.setModel(self.model)
|
self.ui.tableView.setModel(self.model)
|
||||||
|
|
||||||
|
@Slot()
|
||||||
|
def on_openfileaction_triggered(self):
|
||||||
|
current_data = self.model.getData()
|
||||||
|
data = np.array([])
|
||||||
|
if current_data.size > 1:
|
||||||
|
file = ''
|
||||||
|
if self.fileModel.file_name:
|
||||||
|
file = '\nФайл сохранения: ' + self.fileModel.file_name
|
||||||
|
|
||||||
|
msgBox = buildMessageBox \
|
||||||
|
('Сохранение данных',
|
||||||
|
"Сохранить данные?" + file,
|
||||||
|
QMessageBox.Question,
|
||||||
|
QMessageBox.Yes | QMessageBox.No | QMessageBox.Cancel,
|
||||||
|
QMessageBox.Cancel)
|
||||||
|
|
||||||
|
reply = msgBox.exec_()
|
||||||
|
if reply == QMessageBox.StandardButton.Yes:
|
||||||
|
self.fileModel.saveFile(self.model.getData())
|
||||||
|
elif reply == QMessageBox.StandardButton.Cancel:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
data = self.fileModel.loadFile()
|
||||||
|
if data is not None and data.shape[0] > 0:
|
||||||
|
self.model.updateAllData(data)
|
||||||
|
self.isDataChanged = False
|
||||||
|
else:
|
||||||
|
data = self.fileModel.loadFile()
|
||||||
|
if data is not None and data.shape[0] > 0:
|
||||||
|
self.model.updateAllData(data)
|
||||||
|
self.isDataChanged = False
|
||||||
|
|
||||||
|
if data.shape[1] == 1:
|
||||||
|
self.ui.generateXaction.setEnabled(True)
|
||||||
|
self.ui.varianceAnalysisAction.setEnabled(False)
|
||||||
|
self.ui.correlationAnalisisAction.setEnabled(False)
|
||||||
|
elif data.shape[1] > 1:
|
||||||
|
self.ui.generateXaction.setEnabled(True)
|
||||||
|
self.ui.varianceAnalysisAction.setEnabled(True)
|
||||||
|
self.ui.correlationAnalisisAction.setEnabled(True)
|
||||||
|
else:
|
||||||
|
self.ui.generateXaction.setEnabled(False)
|
||||||
|
self.ui.varianceAnalysisAction.setEnabled(False)
|
||||||
|
self.ui.correlationAnalisisAction.setEnabled(False)
|
||||||
|
|
||||||
|
@Slot()
|
||||||
|
def on_savefileaction_triggered(self):
|
||||||
|
self.isDataChanged = not self.fileModel.saveFile(self.model.getData())
|
||||||
|
|
||||||
|
@Slot()
|
||||||
|
def on_closefileaction_triggered(self):
|
||||||
|
self.fileModel.closeFile()
|
||||||
|
self.isDataChanged = False
|
||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def on_generateYaction_triggered(self):
|
def on_generateYaction_triggered(self):
|
||||||
gw = GenerateWindow()
|
gw = GenerateWindow()
|
||||||
if gw.exec():
|
if gw.exec():
|
||||||
y = np.random.normal(gw.mat, gw.deviation, size=(gw.count, 1))
|
y = np.random.normal(gw.mat, gw.deviation, size=(gw.count, 1))
|
||||||
self.model.updateAllData(y)
|
self.model.updateAllData(y.round(2))
|
||||||
|
self.isDataChanged = True
|
||||||
|
self.generateXaction_action.setEnabled(True)
|
||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def on_generateXaction_triggered(self):
|
def on_generateXaction_triggered(self):
|
||||||
gfw = GenerateFactorWindow()
|
gfw = GenerateFactorWindow()
|
||||||
|
|
||||||
# dd = np.array([])
|
|
||||||
|
|
||||||
if gfw.exec():
|
if gfw.exec():
|
||||||
y = self.model.getY()
|
|
||||||
yMat = np.mean(y)
|
|
||||||
|
|
||||||
x_arr = np.array([])
|
|
||||||
|
|
||||||
for cur_y in y:
|
|
||||||
k = np.abs(cur_y / yMat)
|
|
||||||
if k > 1:
|
|
||||||
k = 2 - 1 / k
|
|
||||||
if gfw.typeConnection == INDIRECT_LINK:
|
|
||||||
k = 1 / k
|
|
||||||
|
|
||||||
x = np.random.normal(gfw.mat * (k ** 3), gfw.deviation * k, size=1)
|
|
||||||
x_arr = np.append(x_arr, x)
|
|
||||||
# if (x > gfw.mat and cur_y > yMat) or (x < gfw.mat and cur_y < yMat):
|
|
||||||
# dd = np.append(dd, 1)
|
|
||||||
# else:
|
|
||||||
# dd = np.append(dd, 0)
|
|
||||||
|
|
||||||
data = self.model.getData()
|
data = self.model.getData()
|
||||||
|
y = self.model.getY()
|
||||||
x_arr = x_arr.reshape(len(x_arr), 1)
|
x_arr = generate_x_values(gfw.mat, gfw.deviation, gfw.typeConnection, y)
|
||||||
|
x_arr = x_arr.reshape(len(x_arr), 1).round(2)
|
||||||
# dd = dd.reshape(len(dd), 1)
|
# dd = dd.reshape(len(dd), 1)
|
||||||
data = np.concatenate((data, x_arr), axis=1)
|
data = np.concatenate((data, x_arr), axis=1)
|
||||||
# data = np.concatenate((data, dd), axis=1)
|
|
||||||
self.model.updateAllData(data)
|
self.model.updateAllData(data)
|
||||||
|
self.varianceAnalysisAction_action.setEnabled(True)
|
||||||
|
self.correlationAnalisisAction_action.setEnabled(True)
|
||||||
|
self.isDataChanged = True
|
||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def on_aboutmenuaction_triggered(self):
|
def on_aboutmenuaction_triggered(self):
|
||||||
global about_window
|
global about_window
|
||||||
about_window = AboutWindow()
|
about_window = AboutWindow()
|
||||||
|
|
||||||
|
icon = QIcon()
|
||||||
|
icon.addFile(resource_path("ui/images/logo.ico"), QSize(), QIcon.Normal, QIcon.Off)
|
||||||
|
about_window.setWindowIcon(icon)
|
||||||
|
|
||||||
about_window.show()
|
about_window.show()
|
||||||
|
|
||||||
|
@Slot()
|
||||||
|
def on_varianceAnalysisAction_triggered(self):
|
||||||
|
dw = VarianceAnalysisWindow(self.model.getData())
|
||||||
|
dw.exec()
|
||||||
|
|
||||||
|
@Slot()
|
||||||
|
def on_correlationAnalisisAction_triggered(self):
|
||||||
|
dw = СorrelationAnalysisWindow(self.model.getData())
|
||||||
|
dw.exec()
|
||||||
|
|
||||||
|
def closeEvent(self, event):
|
||||||
|
if self.isDataChanged:
|
||||||
|
file = ''
|
||||||
|
if self.fileModel.file_name:
|
||||||
|
file = '\nФайл сохранения: ' + self.fileModel.file_name
|
||||||
|
|
||||||
|
msgBox = buildMessageBox \
|
||||||
|
('Завершение работы',
|
||||||
|
"Сохранить данные?" + file,
|
||||||
|
QMessageBox.Question,
|
||||||
|
QMessageBox.Yes | QMessageBox.No | QMessageBox.Cancel,
|
||||||
|
QMessageBox.Cancel)
|
||||||
|
|
||||||
|
reply = msgBox.exec_()
|
||||||
|
if reply == QMessageBox.StandardButton.Yes:
|
||||||
|
self.fileModel.saveFile(self.model.getData())
|
||||||
|
event.accept()
|
||||||
|
elif reply == QMessageBox.StandardButton.No:
|
||||||
|
event.accept()
|
||||||
|
else:
|
||||||
|
event.ignore()
|
||||||
|
else:
|
||||||
|
event.accept()
|
||||||
|
@@ -1,3 +1,22 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
from PySide2.QtCore import QAbstractListModel, Qt
|
from PySide2.QtCore import QAbstractListModel, Qt
|
||||||
|
|
||||||
|
|
||||||
|
42
statapp/models/correlation_analysis_model.py
Normal file
42
statapp/models/correlation_analysis_model.py
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
from PySide2.QtCore import QModelIndex, Qt
|
||||||
|
|
||||||
|
from statapp.models.ro_table_model import ROTableModel
|
||||||
|
from statapp.models.utils import yx_header
|
||||||
|
|
||||||
|
|
||||||
|
class CorrelationAnalysisModel(ROTableModel):
|
||||||
|
def __init__(self, data):
|
||||||
|
super().__init__(data)
|
||||||
|
|
||||||
|
def getHorizontalHeader(self):
|
||||||
|
return yx_header(self.columnCount(QModelIndex()))
|
||||||
|
|
||||||
|
def getVerticalHeader(self):
|
||||||
|
return yx_header(self.rowCount(QModelIndex()))
|
||||||
|
|
||||||
|
def data(self, index, role):
|
||||||
|
if role == Qt.DisplayRole:
|
||||||
|
if (index.column() <= index.row()):
|
||||||
|
return float(self._data[index.row(), index.column()])
|
||||||
|
else:
|
||||||
|
None
|
||||||
|
return None
|
@@ -1,59 +0,0 @@
|
|||||||
import numpy as np
|
|
||||||
from PySide2 import QtCore
|
|
||||||
from PySide2.QtCore import Qt
|
|
||||||
|
|
||||||
|
|
||||||
class DataModel(QtCore.QAbstractTableModel):
|
|
||||||
def __init__(self, data=np.array([[]], dtype=np.float32)):
|
|
||||||
super().__init__()
|
|
||||||
|
|
||||||
self._data = data
|
|
||||||
|
|
||||||
def updateAllData(self, data):
|
|
||||||
self.layoutAboutToBeChanged.emit()
|
|
||||||
self._data = data
|
|
||||||
self.layoutChanged.emit()
|
|
||||||
|
|
||||||
def rowCount(self, index):
|
|
||||||
return self._data.shape[0]
|
|
||||||
|
|
||||||
def columnCount(self, index):
|
|
||||||
return self._data.shape[1]
|
|
||||||
|
|
||||||
def headerData(self, section: int, orientation: Qt.Orientation, role: int = ...):
|
|
||||||
if role == Qt.DisplayRole:
|
|
||||||
# if orientation == Qt.Orientation.Horizontal:
|
|
||||||
|
|
||||||
if section == 0:
|
|
||||||
return 'Y'
|
|
||||||
|
|
||||||
return f'X{section}'
|
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
def flags(self, index):
|
|
||||||
return Qt.ItemIsSelectable | Qt.ItemIsEnabled | Qt.ItemIsEditable
|
|
||||||
|
|
||||||
def setData(self, index, value, role):
|
|
||||||
if role == Qt.EditRole:
|
|
||||||
try:
|
|
||||||
value = float(value)
|
|
||||||
except ValueError:
|
|
||||||
return False
|
|
||||||
self._data[index.row(), index.column()] = value
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def getData(self):
|
|
||||||
return self._data
|
|
||||||
|
|
||||||
def getY(self):
|
|
||||||
return self._data[:, 0]
|
|
||||||
|
|
||||||
|
|
||||||
def data(self, index, role):
|
|
||||||
if role == Qt.DisplayRole or role == Qt.EditRole:
|
|
||||||
# ?
|
|
||||||
return float(self._data[index.row(), index.column()])
|
|
||||||
|
|
||||||
return None
|
|
49
statapp/models/editable_table_model.py
Normal file
49
statapp/models/editable_table_model.py
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
import numpy as np
|
||||||
|
from PySide2.QtCore import Qt
|
||||||
|
|
||||||
|
from statapp.models.ro_table_model import ROTableModel
|
||||||
|
|
||||||
|
|
||||||
|
class EditableTableModel(ROTableModel):
|
||||||
|
def __init__(self, data=np.array([[]], dtype=np.float32)):
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
|
self._data = data
|
||||||
|
|
||||||
|
def flags(self, index):
|
||||||
|
return Qt.ItemIsSelectable | Qt.ItemIsEnabled | Qt.ItemIsEditable
|
||||||
|
|
||||||
|
def setData(self, index, value, role):
|
||||||
|
if role == Qt.EditRole:
|
||||||
|
try:
|
||||||
|
value = float(value)
|
||||||
|
except ValueError:
|
||||||
|
return False
|
||||||
|
self._data[index.row(), index.column()] = value
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
def data(self, index, role):
|
||||||
|
if role == Qt.DisplayRole or role == Qt.EditRole:
|
||||||
|
return float(self._data[index.row(), index.column()])
|
||||||
|
|
||||||
|
return None
|
53
statapp/models/fileslc_model.py
Normal file
53
statapp/models/fileslc_model.py
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
import numpy as np
|
||||||
|
from PySide2.QtWidgets import QFileDialog, QMessageBox
|
||||||
|
|
||||||
|
|
||||||
|
class FileSLCModel:
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self.file_name = None
|
||||||
|
|
||||||
|
def saveFile(self, data):
|
||||||
|
if not self.file_name:
|
||||||
|
self.file_name, _ = QFileDialog.getSaveFileName(None, "Сохранить файл", "", "Text Files (*.txt);;CSV Files (*.csv)")
|
||||||
|
if self.file_name:
|
||||||
|
np.savetxt(self.file_name, data, delimiter=",")
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
def loadFile(self):
|
||||||
|
self.file_name, _ = QFileDialog.getOpenFileName(None, "Загрузить файл", "", "Files (*.txt *.csv)")
|
||||||
|
if self.file_name:
|
||||||
|
try:
|
||||||
|
content = np.genfromtxt(self.file_name, delimiter=',', invalid_raise=True, ndmin=2)
|
||||||
|
except ValueError as e:
|
||||||
|
QMessageBox.warning \
|
||||||
|
(None,
|
||||||
|
'Ошибка',
|
||||||
|
"Ошибка чтения файла!\nФайл нельзя открыть или файл неверного формата")
|
||||||
|
self.file_name = None
|
||||||
|
return None
|
||||||
|
return content
|
||||||
|
|
||||||
|
def closeFile(self):
|
||||||
|
self.file_name = None
|
||||||
|
pass
|
35
statapp/models/input_values_model.py
Normal file
35
statapp/models/input_values_model.py
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
import numpy as np
|
||||||
|
from PySide2.QtCore import Qt, QModelIndex
|
||||||
|
|
||||||
|
from statapp.models.editable_table_model import EditableTableModel
|
||||||
|
from statapp.models.utils import yx_header
|
||||||
|
|
||||||
|
|
||||||
|
class InputValuesModel(EditableTableModel):
|
||||||
|
def __init__(self, data=np.array([[]], dtype=np.float32)):
|
||||||
|
super().__init__(data)
|
||||||
|
|
||||||
|
def getHorizontalHeader(self):
|
||||||
|
return yx_header(self.columnCount(QModelIndex()))
|
||||||
|
|
||||||
|
def getY(self):
|
||||||
|
return self._data[:, 0]
|
68
statapp/models/ro_table_model.py
Normal file
68
statapp/models/ro_table_model.py
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
import PySide2
|
||||||
|
import numpy as np
|
||||||
|
from PySide2 import QtCore
|
||||||
|
from PySide2.QtCore import Qt
|
||||||
|
|
||||||
|
from statapp.utils import safe_list_get
|
||||||
|
|
||||||
|
|
||||||
|
class ROTableModel(QtCore.QAbstractTableModel):
|
||||||
|
def __init__(self,
|
||||||
|
data=np.array([[]], dtype=np.float32),
|
||||||
|
):
|
||||||
|
super().__init__()
|
||||||
|
self._data = data
|
||||||
|
self._headers = {
|
||||||
|
Qt.Vertical: self.getVerticalHeader,
|
||||||
|
Qt.Horizontal: self.getHorizontalHeader,
|
||||||
|
}
|
||||||
|
|
||||||
|
def updateAllData(self, data):
|
||||||
|
self.layoutAboutToBeChanged.emit()
|
||||||
|
self._data = data
|
||||||
|
self.layoutChanged.emit()
|
||||||
|
|
||||||
|
def rowCount(self, index):
|
||||||
|
return self._data.shape[0]
|
||||||
|
|
||||||
|
def columnCount(self, index):
|
||||||
|
return self._data.shape[1]
|
||||||
|
|
||||||
|
def getVerticalHeader(self):
|
||||||
|
return []
|
||||||
|
|
||||||
|
def getHorizontalHeader(self):
|
||||||
|
return []
|
||||||
|
|
||||||
|
def headerData(self, section: int, orientation: Qt.Orientation, role: int = ...):
|
||||||
|
if role == Qt.DisplayRole:
|
||||||
|
return safe_list_get(self._headers[orientation](), section, None)
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def getData(self):
|
||||||
|
return self._data
|
||||||
|
|
||||||
|
def data(self, index, role):
|
||||||
|
if role == Qt.DisplayRole:
|
||||||
|
return float(self._data[index.row(), index.column()])
|
||||||
|
return None
|
21
statapp/models/utils.py
Normal file
21
statapp/models/utils.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
def yx_header(count):
|
||||||
|
return ['Y'] + [f'X{i}' for i in range(1, count)]
|
34
statapp/models/variance_analysis_model.py
Normal file
34
statapp/models/variance_analysis_model.py
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
from PySide2.QtCore import QModelIndex
|
||||||
|
|
||||||
|
from statapp.models.ro_table_model import ROTableModel
|
||||||
|
from statapp.models.utils import yx_header
|
||||||
|
|
||||||
|
|
||||||
|
class VarianceAnalysisModel(ROTableModel):
|
||||||
|
def __init__(self, data):
|
||||||
|
super().__init__(data)
|
||||||
|
|
||||||
|
def getHorizontalHeader(self):
|
||||||
|
return ['Мат. ожидание', 'Среднекв. отклонение', 'Минимум', 'Максимум']
|
||||||
|
|
||||||
|
def getVerticalHeader(self):
|
||||||
|
return yx_header(self.rowCount(QModelIndex()))
|
@@ -9,7 +9,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>476</width>
|
<width>483</width>
|
||||||
<height>543</height>
|
<height>543</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -23,70 +23,7 @@
|
|||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="4" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QLabel" name="labelowner">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<strikeout>false</strikeout>
|
|
||||||
<stylestrategy>PreferDefault</stylestrategy>
|
|
||||||
<kerning>true</kerning>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Донецкий Национальный Технический Университет</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="labeldevelopers">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<strikeout>false</strikeout>
|
|
||||||
<stylestrategy>PreferDefault</stylestrategy>
|
|
||||||
<kerning>true</kerning>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Разработчики: Слипенко М., Лазуренко Е.</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="labelbasegigamen">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>14</pointsize>
|
|
||||||
<italic>false</italic>
|
|
||||||
<bold>false</bold>
|
|
||||||
<underline>false</underline>
|
|
||||||
<strikeout>false</strikeout>
|
|
||||||
<stylestrategy>PreferDefault</stylestrategy>
|
|
||||||
<kerning>true</kerning>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Теоретический фундамент: Дмитрюк Т. Г.</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="labelgif">
|
<widget class="QLabel" name="labelgif">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -103,6 +40,7 @@
|
|||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>14</pointsize>
|
<pointsize>14</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
<italic>false</italic>
|
<italic>false</italic>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
<underline>false</underline>
|
<underline>false</underline>
|
||||||
@@ -122,6 +60,102 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QLabel" name="labelowner">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<strikeout>false</strikeout>
|
||||||
|
<stylestrategy>PreferDefault</stylestrategy>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Донецкий Национальный Технический Университет</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="labeldevelopers">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<strikeout>false</strikeout>
|
||||||
|
<stylestrategy>PreferDefault</stylestrategy>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Разработчики: Слипенко М., Лазуренко Е.</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="versionLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Версия:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="labelbasegigamen">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
|
<underline>false</underline>
|
||||||
|
<strikeout>false</strikeout>
|
||||||
|
<stylestrategy>PreferDefault</stylestrategy>
|
||||||
|
<kerning>true</kerning>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Теоретический фундамент: Дмитрюк Т. Г.</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="mainLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Statapp</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
28
statapp/ui/correlation_analysis_window.ui
Normal file
28
statapp/ui/correlation_analysis_window.ui
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CorrelationAnalysisWindow</class>
|
||||||
|
<widget class="QDialog" name="CorrelationAnalysisWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>630</width>
|
||||||
|
<height>400</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Корреляционный анализ</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTableView" name="tableView"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Генерация факторов</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Генерация откликов</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
BIN
statapp/ui/images/logo.ico
Normal file
BIN
statapp/ui/images/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 2.9 MiB After Width: | Height: | Size: 2.9 MiB |
@@ -40,13 +40,16 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>19</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="filemenu">
|
<widget class="QMenu" name="filemenu">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Файл</string>
|
<string>Файл</string>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="openfileaction"/>
|
||||||
|
<addaction name="savefileaction"/>
|
||||||
|
<addaction name="closefileaction"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="generatemenu">
|
<widget class="QMenu" name="generatemenu">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -59,6 +62,8 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Анализ данных</string>
|
<string>Анализ данных</string>
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="varianceAnalysisAction"/>
|
||||||
|
<addaction name="correlationAnalisisAction"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="modelmenu">
|
<widget class="QMenu" name="modelmenu">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -93,6 +98,31 @@
|
|||||||
<string>Генерация фактора</string>
|
<string>Генерация фактора</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="openfileaction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Открыть</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="savefileaction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Сохранить</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="closefileaction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Закрыть</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="varianceAnalysisAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Дисперсионный анализ</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="correlationAnalisisAction">
|
||||||
|
<property name="text">
|
||||||
|
<string>Корреляционный анализ</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
82
statapp/ui/ui_about_window.py
generated
82
statapp/ui/ui_about_window.py
generated
@@ -1,4 +1,24 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Form generated from reading UI file 'about_window.ui'
|
## Form generated from reading UI file 'about_window.ui'
|
||||||
@@ -18,7 +38,7 @@ class Ui_AboutWindow(object):
|
|||||||
if not AboutWindow.objectName():
|
if not AboutWindow.objectName():
|
||||||
AboutWindow.setObjectName(u"AboutWindow")
|
AboutWindow.setObjectName(u"AboutWindow")
|
||||||
AboutWindow.setEnabled(True)
|
AboutWindow.setEnabled(True)
|
||||||
AboutWindow.resize(476, 543)
|
AboutWindow.resize(483, 543)
|
||||||
AboutWindow.setAutoFillBackground(False)
|
AboutWindow.setAutoFillBackground(False)
|
||||||
self.centralwidget = QWidget(AboutWindow)
|
self.centralwidget = QWidget(AboutWindow)
|
||||||
self.centralwidget.setObjectName(u"centralwidget")
|
self.centralwidget.setObjectName(u"centralwidget")
|
||||||
@@ -26,44 +46,72 @@ class Ui_AboutWindow(object):
|
|||||||
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||||
self.gridLayout = QGridLayout()
|
self.gridLayout = QGridLayout()
|
||||||
self.gridLayout.setObjectName(u"gridLayout")
|
self.gridLayout.setObjectName(u"gridLayout")
|
||||||
self.labelowner = QLabel(self.centralwidget)
|
self.labelgif = QLabel(self.centralwidget)
|
||||||
self.labelowner.setObjectName(u"labelowner")
|
self.labelgif.setObjectName(u"labelgif")
|
||||||
|
self.labelgif.setMinimumSize(QSize(50, 50))
|
||||||
|
self.labelgif.setMaximumSize(QSize(500, 600))
|
||||||
font = QFont()
|
font = QFont()
|
||||||
font.setPointSize(14)
|
font.setPointSize(14)
|
||||||
font.setBold(False)
|
font.setBold(False)
|
||||||
font.setItalic(False)
|
font.setItalic(False)
|
||||||
font.setUnderline(False)
|
font.setUnderline(False)
|
||||||
|
font.setWeight(50)
|
||||||
font.setStrikeOut(False)
|
font.setStrikeOut(False)
|
||||||
font.setKerning(True)
|
font.setKerning(True)
|
||||||
font.setStyleStrategy(QFont.PreferDefault)
|
font.setStyleStrategy(QFont.PreferDefault)
|
||||||
self.labelowner.setFont(font)
|
self.labelgif.setFont(font)
|
||||||
|
self.labelgif.setFrameShape(QFrame.NoFrame)
|
||||||
|
self.labelgif.setAlignment(Qt.AlignCenter)
|
||||||
|
|
||||||
|
self.gridLayout.addWidget(self.labelgif, 5, 1, 1, 1)
|
||||||
|
|
||||||
|
self.labelowner = QLabel(self.centralwidget)
|
||||||
|
self.labelowner.setObjectName(u"labelowner")
|
||||||
|
font1 = QFont()
|
||||||
|
font1.setPointSize(12)
|
||||||
|
font1.setBold(False)
|
||||||
|
font1.setItalic(False)
|
||||||
|
font1.setUnderline(False)
|
||||||
|
font1.setWeight(50)
|
||||||
|
font1.setStrikeOut(False)
|
||||||
|
font1.setKerning(True)
|
||||||
|
font1.setStyleStrategy(QFont.PreferDefault)
|
||||||
|
self.labelowner.setFont(font1)
|
||||||
self.labelowner.setAlignment(Qt.AlignCenter)
|
self.labelowner.setAlignment(Qt.AlignCenter)
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.labelowner, 4, 1, 1, 1)
|
self.gridLayout.addWidget(self.labelowner, 6, 1, 1, 1)
|
||||||
|
|
||||||
self.labeldevelopers = QLabel(self.centralwidget)
|
self.labeldevelopers = QLabel(self.centralwidget)
|
||||||
self.labeldevelopers.setObjectName(u"labeldevelopers")
|
self.labeldevelopers.setObjectName(u"labeldevelopers")
|
||||||
self.labeldevelopers.setFont(font)
|
self.labeldevelopers.setFont(font)
|
||||||
self.labeldevelopers.setAlignment(Qt.AlignCenter)
|
self.labeldevelopers.setAlignment(Qt.AlignCenter)
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.labeldevelopers, 0, 1, 1, 1)
|
self.gridLayout.addWidget(self.labeldevelopers, 2, 1, 1, 1)
|
||||||
|
|
||||||
|
self.versionLabel = QLabel(self.centralwidget)
|
||||||
|
self.versionLabel.setObjectName(u"versionLabel")
|
||||||
|
font2 = QFont()
|
||||||
|
font2.setPointSize(12)
|
||||||
|
self.versionLabel.setFont(font2)
|
||||||
|
self.versionLabel.setAlignment(Qt.AlignCenter)
|
||||||
|
|
||||||
|
self.gridLayout.addWidget(self.versionLabel, 1, 1, 1, 1)
|
||||||
|
|
||||||
self.labelbasegigamen = QLabel(self.centralwidget)
|
self.labelbasegigamen = QLabel(self.centralwidget)
|
||||||
self.labelbasegigamen.setObjectName(u"labelbasegigamen")
|
self.labelbasegigamen.setObjectName(u"labelbasegigamen")
|
||||||
self.labelbasegigamen.setFont(font)
|
self.labelbasegigamen.setFont(font)
|
||||||
self.labelbasegigamen.setAlignment(Qt.AlignCenter)
|
self.labelbasegigamen.setAlignment(Qt.AlignCenter)
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.labelbasegigamen, 1, 1, 1, 1)
|
self.gridLayout.addWidget(self.labelbasegigamen, 3, 1, 1, 1)
|
||||||
|
|
||||||
self.labelgif = QLabel(self.centralwidget)
|
self.mainLabel = QLabel(self.centralwidget)
|
||||||
self.labelgif.setObjectName(u"labelgif")
|
self.mainLabel.setObjectName(u"mainLabel")
|
||||||
self.labelgif.setMinimumSize(QSize(50, 50))
|
font3 = QFont()
|
||||||
self.labelgif.setMaximumSize(QSize(500, 600))
|
font3.setPointSize(20)
|
||||||
self.labelgif.setFont(font)
|
self.mainLabel.setFont(font3)
|
||||||
self.labelgif.setFrameShape(QFrame.NoFrame)
|
self.mainLabel.setAlignment(Qt.AlignCenter)
|
||||||
self.labelgif.setAlignment(Qt.AlignCenter)
|
|
||||||
|
|
||||||
self.gridLayout.addWidget(self.labelgif, 2, 1, 1, 1)
|
self.gridLayout.addWidget(self.mainLabel, 0, 1, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||||
@@ -77,8 +125,10 @@ class Ui_AboutWindow(object):
|
|||||||
|
|
||||||
def retranslateUi(self, AboutWindow):
|
def retranslateUi(self, AboutWindow):
|
||||||
AboutWindow.setWindowTitle(QCoreApplication.translate("AboutWindow", u"\u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0435", None))
|
AboutWindow.setWindowTitle(QCoreApplication.translate("AboutWindow", u"\u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0435", None))
|
||||||
|
self.labelgif.setText("")
|
||||||
self.labelowner.setText(QCoreApplication.translate("AboutWindow", u"\u0414\u043e\u043d\u0435\u0446\u043a\u0438\u0439 \u041d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442", None))
|
self.labelowner.setText(QCoreApplication.translate("AboutWindow", u"\u0414\u043e\u043d\u0435\u0446\u043a\u0438\u0439 \u041d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442", None))
|
||||||
self.labeldevelopers.setText(QCoreApplication.translate("AboutWindow", u"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438: \u0421\u043b\u0438\u043f\u0435\u043d\u043a\u043e \u041c., \u041b\u0430\u0437\u0443\u0440\u0435\u043d\u043a\u043e \u0415.", None))
|
self.labeldevelopers.setText(QCoreApplication.translate("AboutWindow", u"\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438: \u0421\u043b\u0438\u043f\u0435\u043d\u043a\u043e \u041c., \u041b\u0430\u0437\u0443\u0440\u0435\u043d\u043a\u043e \u0415.", None))
|
||||||
|
self.versionLabel.setText(QCoreApplication.translate("AboutWindow", u"\u0412\u0435\u0440\u0441\u0438\u044f:", None))
|
||||||
self.labelbasegigamen.setText(QCoreApplication.translate("AboutWindow", u"\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442: \u0414\u043c\u0438\u0442\u0440\u044e\u043a \u0422. \u0413.", None))
|
self.labelbasegigamen.setText(QCoreApplication.translate("AboutWindow", u"\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442: \u0414\u043c\u0438\u0442\u0440\u044e\u043a \u0422. \u0413.", None))
|
||||||
self.labelgif.setText("")
|
self.mainLabel.setText(QCoreApplication.translate("AboutWindow", u"Statapp", None))
|
||||||
# retranslateUi
|
# retranslateUi
|
||||||
|
61
statapp/ui/ui_correlation_analysis_window.py
generated
Normal file
61
statapp/ui/ui_correlation_analysis_window.py
generated
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Form generated from reading UI file 'correlation_analysis_window.ui'
|
||||||
|
##
|
||||||
|
## Created by: Qt User Interface Compiler version 5.15.2
|
||||||
|
##
|
||||||
|
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
from PySide2.QtCore import *
|
||||||
|
from PySide2.QtGui import *
|
||||||
|
from PySide2.QtWidgets import *
|
||||||
|
|
||||||
|
|
||||||
|
class Ui_CorrelationAnalysisWindow(object):
|
||||||
|
def setupUi(self, CorrelationAnalysisWindow):
|
||||||
|
if not CorrelationAnalysisWindow.objectName():
|
||||||
|
CorrelationAnalysisWindow.setObjectName(u"CorrelationAnalysisWindow")
|
||||||
|
CorrelationAnalysisWindow.resize(630, 400)
|
||||||
|
self.gridLayout_2 = QGridLayout(CorrelationAnalysisWindow)
|
||||||
|
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||||
|
self.gridLayout = QGridLayout()
|
||||||
|
self.gridLayout.setObjectName(u"gridLayout")
|
||||||
|
self.tableView = QTableView(CorrelationAnalysisWindow)
|
||||||
|
self.tableView.setObjectName(u"tableView")
|
||||||
|
|
||||||
|
self.gridLayout.addWidget(self.tableView, 0, 0, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
|
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
|
self.retranslateUi(CorrelationAnalysisWindow)
|
||||||
|
|
||||||
|
QMetaObject.connectSlotsByName(CorrelationAnalysisWindow)
|
||||||
|
# setupUi
|
||||||
|
|
||||||
|
def retranslateUi(self, CorrelationAnalysisWindow):
|
||||||
|
CorrelationAnalysisWindow.setWindowTitle(QCoreApplication.translate("CorrelationAnalysisWindow", u"\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437", None))
|
||||||
|
# retranslateUi
|
22
statapp/ui/ui_generate_factor_window.py
generated
22
statapp/ui/ui_generate_factor_window.py
generated
@@ -1,4 +1,24 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Form generated from reading UI file 'generate_factor_window.ui'
|
## Form generated from reading UI file 'generate_factor_window.ui'
|
||||||
@@ -79,7 +99,7 @@ class Ui_GenerateFactorWindow(object):
|
|||||||
# setupUi
|
# setupUi
|
||||||
|
|
||||||
def retranslateUi(self, GenerateFactorWindow):
|
def retranslateUi(self, GenerateFactorWindow):
|
||||||
GenerateFactorWindow.setWindowTitle(QCoreApplication.translate("GenerateFactorWindow", u"Dialog", None))
|
GenerateFactorWindow.setWindowTitle(QCoreApplication.translate("GenerateFactorWindow", u"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432", None))
|
||||||
self.label.setText(QCoreApplication.translate("GenerateFactorWindow", u"\u0422\u0438\u043f \u0441\u0432\u044f\u0437\u0438", None))
|
self.label.setText(QCoreApplication.translate("GenerateFactorWindow", u"\u0422\u0438\u043f \u0441\u0432\u044f\u0437\u0438", None))
|
||||||
self.label_3.setText(QCoreApplication.translate("GenerateFactorWindow", u"\u0421\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435", None))
|
self.label_3.setText(QCoreApplication.translate("GenerateFactorWindow", u"\u0421\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435", None))
|
||||||
self.generatePushButton.setText(QCoreApplication.translate("GenerateFactorWindow", u"\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c", None))
|
self.generatePushButton.setText(QCoreApplication.translate("GenerateFactorWindow", u"\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c", None))
|
||||||
|
22
statapp/ui/ui_generate_window.py
generated
22
statapp/ui/ui_generate_window.py
generated
@@ -1,4 +1,24 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Form generated from reading UI file 'generate_window.ui'
|
## Form generated from reading UI file 'generate_window.ui'
|
||||||
@@ -77,7 +97,7 @@ class Ui_GenerateWindow(object):
|
|||||||
# setupUi
|
# setupUi
|
||||||
|
|
||||||
def retranslateUi(self, GenerateWindow):
|
def retranslateUi(self, GenerateWindow):
|
||||||
GenerateWindow.setWindowTitle(QCoreApplication.translate("GenerateWindow", u"Dialog", None))
|
GenerateWindow.setWindowTitle(QCoreApplication.translate("GenerateWindow", u"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u043e\u0432", None))
|
||||||
self.generatePushButton.setText(QCoreApplication.translate("GenerateWindow", u"\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c", None))
|
self.generatePushButton.setText(QCoreApplication.translate("GenerateWindow", u"\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c", None))
|
||||||
self.label_2.setText(QCoreApplication.translate("GenerateWindow", u"\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435", None))
|
self.label_2.setText(QCoreApplication.translate("GenerateWindow", u"\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435", None))
|
||||||
self.label_3.setText(QCoreApplication.translate("GenerateWindow", u"\u0421\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435", None))
|
self.label_3.setText(QCoreApplication.translate("GenerateWindow", u"\u0421\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435", None))
|
||||||
|
42
statapp/ui/ui_main_window.py
generated
42
statapp/ui/ui_main_window.py
generated
@@ -1,4 +1,24 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
## Form generated from reading UI file 'main_window.ui'
|
## Form generated from reading UI file 'main_window.ui'
|
||||||
@@ -24,6 +44,16 @@ class Ui_MainWindow(object):
|
|||||||
self.generateYaction.setObjectName(u"generateYaction")
|
self.generateYaction.setObjectName(u"generateYaction")
|
||||||
self.generateXaction = QAction(MainWindow)
|
self.generateXaction = QAction(MainWindow)
|
||||||
self.generateXaction.setObjectName(u"generateXaction")
|
self.generateXaction.setObjectName(u"generateXaction")
|
||||||
|
self.openfileaction = QAction(MainWindow)
|
||||||
|
self.openfileaction.setObjectName(u"openfileaction")
|
||||||
|
self.savefileaction = QAction(MainWindow)
|
||||||
|
self.savefileaction.setObjectName(u"savefileaction")
|
||||||
|
self.closefileaction = QAction(MainWindow)
|
||||||
|
self.closefileaction.setObjectName(u"closefileaction")
|
||||||
|
self.varianceAnalysisAction = QAction(MainWindow)
|
||||||
|
self.varianceAnalysisAction.setObjectName(u"varianceAnalysisAction")
|
||||||
|
self.correlationAnalisisAction = QAction(MainWindow)
|
||||||
|
self.correlationAnalisisAction.setObjectName(u"correlationAnalisisAction")
|
||||||
self.centralwidget = QWidget(MainWindow)
|
self.centralwidget = QWidget(MainWindow)
|
||||||
self.centralwidget.setObjectName(u"centralwidget")
|
self.centralwidget.setObjectName(u"centralwidget")
|
||||||
self.gridLayout = QGridLayout(self.centralwidget)
|
self.gridLayout = QGridLayout(self.centralwidget)
|
||||||
@@ -43,7 +73,7 @@ class Ui_MainWindow(object):
|
|||||||
MainWindow.setCentralWidget(self.centralwidget)
|
MainWindow.setCentralWidget(self.centralwidget)
|
||||||
self.menubar = QMenuBar(MainWindow)
|
self.menubar = QMenuBar(MainWindow)
|
||||||
self.menubar.setObjectName(u"menubar")
|
self.menubar.setObjectName(u"menubar")
|
||||||
self.menubar.setGeometry(QRect(0, 0, 800, 19))
|
self.menubar.setGeometry(QRect(0, 0, 800, 21))
|
||||||
self.filemenu = QMenu(self.menubar)
|
self.filemenu = QMenu(self.menubar)
|
||||||
self.filemenu.setObjectName(u"filemenu")
|
self.filemenu.setObjectName(u"filemenu")
|
||||||
self.generatemenu = QMenu(self.menubar)
|
self.generatemenu = QMenu(self.menubar)
|
||||||
@@ -64,8 +94,13 @@ class Ui_MainWindow(object):
|
|||||||
self.menubar.addAction(self.analyzemenu.menuAction())
|
self.menubar.addAction(self.analyzemenu.menuAction())
|
||||||
self.menubar.addAction(self.modelmenu.menuAction())
|
self.menubar.addAction(self.modelmenu.menuAction())
|
||||||
self.menubar.addAction(self.helpmenu.menuAction())
|
self.menubar.addAction(self.helpmenu.menuAction())
|
||||||
|
self.filemenu.addAction(self.openfileaction)
|
||||||
|
self.filemenu.addAction(self.savefileaction)
|
||||||
|
self.filemenu.addAction(self.closefileaction)
|
||||||
self.generatemenu.addAction(self.generateYaction)
|
self.generatemenu.addAction(self.generateYaction)
|
||||||
self.generatemenu.addAction(self.generateXaction)
|
self.generatemenu.addAction(self.generateXaction)
|
||||||
|
self.analyzemenu.addAction(self.varianceAnalysisAction)
|
||||||
|
self.analyzemenu.addAction(self.correlationAnalisisAction)
|
||||||
self.helpmenu.addAction(self.aboutmenuaction)
|
self.helpmenu.addAction(self.aboutmenuaction)
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
self.retranslateUi(MainWindow)
|
||||||
@@ -78,6 +113,11 @@ class Ui_MainWindow(object):
|
|||||||
self.aboutmenuaction.setText(QCoreApplication.translate("MainWindow", u"\u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435", None))
|
self.aboutmenuaction.setText(QCoreApplication.translate("MainWindow", u"\u041e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435", None))
|
||||||
self.generateYaction.setText(QCoreApplication.translate("MainWindow", u"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430", None))
|
self.generateYaction.setText(QCoreApplication.translate("MainWindow", u"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430", None))
|
||||||
self.generateXaction.setText(QCoreApplication.translate("MainWindow", u"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u0430", None))
|
self.generateXaction.setText(QCoreApplication.translate("MainWindow", u"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0430\u043a\u0442\u043e\u0440\u0430", None))
|
||||||
|
self.openfileaction.setText(QCoreApplication.translate("MainWindow", u"\u041e\u0442\u043a\u0440\u044b\u0442\u044c", None))
|
||||||
|
self.savefileaction.setText(QCoreApplication.translate("MainWindow", u"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c", None))
|
||||||
|
self.closefileaction.setText(QCoreApplication.translate("MainWindow", u"\u0417\u0430\u043a\u0440\u044b\u0442\u044c", None))
|
||||||
|
self.varianceAnalysisAction.setText(QCoreApplication.translate("MainWindow", u"\u0414\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437", None))
|
||||||
|
self.correlationAnalisisAction.setText(QCoreApplication.translate("MainWindow", u"\u041a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437", None))
|
||||||
self.label.setText(QCoreApplication.translate("MainWindow", u"\u0421\u0422\u0410\u0422\u0418\u0421\u0422\u0418\u0427\u0415\u0421\u041a\u0418\u0415 \u0414\u0410\u041d\u041d\u042b\u0415", None))
|
self.label.setText(QCoreApplication.translate("MainWindow", u"\u0421\u0422\u0410\u0422\u0418\u0421\u0422\u0418\u0427\u0415\u0421\u041a\u0418\u0415 \u0414\u0410\u041d\u041d\u042b\u0415", None))
|
||||||
self.filemenu.setTitle(QCoreApplication.translate("MainWindow", u"\u0424\u0430\u0439\u043b", None))
|
self.filemenu.setTitle(QCoreApplication.translate("MainWindow", u"\u0424\u0430\u0439\u043b", None))
|
||||||
self.generatemenu.setTitle(QCoreApplication.translate("MainWindow", u"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439", None))
|
self.generatemenu.setTitle(QCoreApplication.translate("MainWindow", u"\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439", None))
|
||||||
|
61
statapp/ui/ui_variance_analysis_window.py
generated
Normal file
61
statapp/ui/ui_variance_analysis_window.py
generated
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Form generated from reading UI file 'variance_analysis_window.ui'
|
||||||
|
##
|
||||||
|
## Created by: Qt User Interface Compiler version 5.15.2
|
||||||
|
##
|
||||||
|
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
from PySide2.QtCore import *
|
||||||
|
from PySide2.QtGui import *
|
||||||
|
from PySide2.QtWidgets import *
|
||||||
|
|
||||||
|
|
||||||
|
class Ui_VarianceAnalysisWindow(object):
|
||||||
|
def setupUi(self, VarianceAnalysisWindow):
|
||||||
|
if not VarianceAnalysisWindow.objectName():
|
||||||
|
VarianceAnalysisWindow.setObjectName(u"VarianceAnalysisWindow")
|
||||||
|
VarianceAnalysisWindow.resize(630, 400)
|
||||||
|
self.gridLayout_2 = QGridLayout(VarianceAnalysisWindow)
|
||||||
|
self.gridLayout_2.setObjectName(u"gridLayout_2")
|
||||||
|
self.gridLayout = QGridLayout()
|
||||||
|
self.gridLayout.setObjectName(u"gridLayout")
|
||||||
|
self.tableView = QTableView(VarianceAnalysisWindow)
|
||||||
|
self.tableView.setObjectName(u"tableView")
|
||||||
|
|
||||||
|
self.gridLayout.addWidget(self.tableView, 0, 0, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
|
self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
|
self.retranslateUi(VarianceAnalysisWindow)
|
||||||
|
|
||||||
|
QMetaObject.connectSlotsByName(VarianceAnalysisWindow)
|
||||||
|
# setupUi
|
||||||
|
|
||||||
|
def retranslateUi(self, VarianceAnalysisWindow):
|
||||||
|
VarianceAnalysisWindow.setWindowTitle(QCoreApplication.translate("VarianceAnalysisWindow", u"\u0414\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437", None))
|
||||||
|
# retranslateUi
|
28
statapp/ui/variance_analysis_window.ui
Normal file
28
statapp/ui/variance_analysis_window.ui
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>VarianceAnalysisWindow</class>
|
||||||
|
<widget class="QDialog" name="VarianceAnalysisWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>630</width>
|
||||||
|
<height>400</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Дисперсионный анализ</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTableView" name="tableView"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
@@ -1,6 +1,27 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from PySide2.QtWidgets import QMessageBox
|
||||||
|
|
||||||
|
|
||||||
def resource_path(relative):
|
def resource_path(relative):
|
||||||
if getattr(sys, 'frozen', False):
|
if getattr(sys, 'frozen', False):
|
||||||
@@ -9,3 +30,22 @@ def resource_path(relative):
|
|||||||
# we are running in a normal Python environment
|
# we are running in a normal Python environment
|
||||||
bundle_dir = os.path.dirname(os.path.abspath(__file__))
|
bundle_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
return os.path.join(bundle_dir, relative)
|
return os.path.join(bundle_dir, relative)
|
||||||
|
|
||||||
|
|
||||||
|
def safe_list_get(l, idx, default):
|
||||||
|
try:
|
||||||
|
return l[idx]
|
||||||
|
except IndexError:
|
||||||
|
return default
|
||||||
|
|
||||||
|
|
||||||
|
def buildMessageBox(title, text, icon, buttons, defaultButton):
|
||||||
|
msgBox = QMessageBox()
|
||||||
|
|
||||||
|
msgBox.setIcon(icon)
|
||||||
|
msgBox.setWindowTitle(title)
|
||||||
|
msgBox.setText(text)
|
||||||
|
msgBox.setStandardButtons(buttons)
|
||||||
|
msgBox.setDefaultButton(defaultButton)
|
||||||
|
|
||||||
|
return msgBox
|
||||||
|
37
statapp/variance_analysis.py
Normal file
37
statapp/variance_analysis.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2023 Maxim Slipenko, Eugene Lazurenko.
|
||||||
|
#
|
||||||
|
# This file is part of Statapp
|
||||||
|
# (see https://github.com/shizand/statapp).
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
from PySide2.QtWidgets import QDialog, QHeaderView
|
||||||
|
|
||||||
|
from statapp.calculations import variance_analysis
|
||||||
|
from statapp.models.variance_analysis_model import VarianceAnalysisModel
|
||||||
|
from statapp.ui.ui_variance_analysis_window import Ui_VarianceAnalysisWindow
|
||||||
|
|
||||||
|
|
||||||
|
class VarianceAnalysisWindow(QDialog):
|
||||||
|
def __init__(self, data):
|
||||||
|
super().__init__()
|
||||||
|
self.ui = Ui_VarianceAnalysisWindow()
|
||||||
|
self.ui.setupUi(self)
|
||||||
|
|
||||||
|
res = variance_analysis(data)
|
||||||
|
self.model = VarianceAnalysisModel(res.round(2))
|
||||||
|
self.ui.tableView.setModel(self.model)
|
||||||
|
header = self.ui.tableView.horizontalHeader()
|
||||||
|
header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
Reference in New Issue
Block a user