Compare commits
No commits in common. "45a267c8c72d49ad7762616e5e72eb718aafd333" and "dd3e0d045d1c6b08f97e1b871a0ac0477c0d65a2" have entirely different histories.
45a267c8c7
...
dd3e0d045d
Binary file not shown.
@ -3,20 +3,7 @@ name = "pyrelacs"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Relaxed ELectrophysiology Acquisition, Control, and Stimulation in python"
|
description = "Relaxed ELectrophysiology Acquisition, Control, and Stimulation in python"
|
||||||
authors = ["wendtalexander <wendtalexander@protonmail.com>"]
|
authors = ["wendtalexander <wendtalexander@protonmail.com>"]
|
||||||
repository = "https://whale.am28.uni-tuebingen.de/git/awendt/pyrelacs"
|
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "MIT"
|
|
||||||
organization = "de.uni-tuebingen.neuroetho"
|
|
||||||
classifiers = [
|
|
||||||
"Topic :: Scientific/Engineering",
|
|
||||||
"Intended Audience :: Science/Research",
|
|
||||||
"Intended Audience :: End Users/Desktop",
|
|
||||||
]
|
|
||||||
copyright = "(c) 2020, Neuroethology lab, Uni Tuebingen"
|
|
||||||
|
|
||||||
include = [
|
|
||||||
{ path = "pyproject.toml" }
|
|
||||||
]
|
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.12"
|
python = "^3.12"
|
||||||
@ -26,11 +13,8 @@ matplotlib = "^3.9.2"
|
|||||||
numpy = "^2.1.1"
|
numpy = "^2.1.1"
|
||||||
pyqt6 = "^6.7.1"
|
pyqt6 = "^6.7.1"
|
||||||
tomli = "^2.0.1"
|
tomli = "^2.0.1"
|
||||||
tomlkit = "^0.13.2"
|
|
||||||
scipy = "^1.14.1"
|
scipy = "^1.14.1"
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
|
||||||
pyrelacs = "pyrelacs.app:main"
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
|
@ -2,7 +2,7 @@ from PyQt6.QtGui import QAction
|
|||||||
import sys
|
import sys
|
||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
from PyQt6.QtCore import QProcess, QSize, QThreadPool, Qt, QSettings
|
from PyQt6.QtCore import QProcess, QSize, QThreadPool, Qt
|
||||||
from PyQt6.QtWidgets import (
|
from PyQt6.QtWidgets import (
|
||||||
QApplication,
|
QApplication,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
@ -17,7 +17,6 @@ from IPython import embed
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from pyrelacs.util.logging import config_logging
|
from pyrelacs.util.logging import config_logging
|
||||||
import pyrelacs.info as info
|
|
||||||
from pyrelacs.worker import Worker
|
from pyrelacs.worker import Worker
|
||||||
from pyrelacs.repros.repros import Repro
|
from pyrelacs.repros.repros import Repro
|
||||||
|
|
||||||
@ -95,35 +94,8 @@ class PyRelacs(QMainWindow):
|
|||||||
self.text.appendPlainText(f"started Repro {n}, {fn}")
|
self.text.appendPlainText(f"started Repro {n}, {fn}")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
if __name__ == "__main__":
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
app.setApplicationName(info.NAME)
|
|
||||||
app.setApplicationVersion(str(info.VERSION))
|
|
||||||
app.setOrganizationDomain(info.ORGANIZATION)
|
|
||||||
|
|
||||||
# read window settings
|
|
||||||
settings = QSettings(info.ORGANIZATION, info.NAME)
|
|
||||||
width = int(settings.value("app/width", 1024))
|
|
||||||
height = int(settings.value("app/height", 768))
|
|
||||||
x = int(settings.value("app/pos_x", 100))
|
|
||||||
y = int(settings.value("app/pos_y", 100))
|
|
||||||
|
|
||||||
window = PyRelacs()
|
window = PyRelacs()
|
||||||
window.setMinimumWidth(200)
|
|
||||||
window.setMinimumHeight(200)
|
|
||||||
window.resize(width, height)
|
|
||||||
window.move(x, y)
|
|
||||||
window.show()
|
window.show()
|
||||||
app.exec()
|
app.exec()
|
||||||
|
|
||||||
# store window position and size
|
|
||||||
pos = window.pos()
|
|
||||||
settings.setValue("app/width", window.width())
|
|
||||||
settings.setValue("app/height", window.height())
|
|
||||||
settings.setValue("app/pos_x", pos.x())
|
|
||||||
settings.setValue("app/pos_y", pos.y())
|
|
||||||
sys.exit(exit_code)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
@ -1,37 +0,0 @@
|
|||||||
import tomlkit
|
|
||||||
import pathlib
|
|
||||||
|
|
||||||
def load_project_settings(project_root):
|
|
||||||
# Read the pyproject.toml file
|
|
||||||
with open(pathlib.Path.joinpath(project_root, 'pyproject.toml'), 'r') as f:
|
|
||||||
pyproject_content = f.read()
|
|
||||||
|
|
||||||
# Parse the toml content
|
|
||||||
pyproject = tomlkit.parse(pyproject_content)
|
|
||||||
|
|
||||||
# Access project settings
|
|
||||||
return {
|
|
||||||
'name': pyproject['tool']['poetry']['name'],
|
|
||||||
'version': pyproject['tool']['poetry']['version'],
|
|
||||||
'description': pyproject['tool']['poetry']['description'],
|
|
||||||
'authors': pyproject['tool']['poetry']['authors'],
|
|
||||||
'readme': pyproject['tool']['poetry']['authors'],
|
|
||||||
'licence': pyproject['tool']['poetry']['license'],
|
|
||||||
'organization': pyproject['tool']['poetry']['organization'],
|
|
||||||
'classifiers': pyproject['tool']['poetry']['classifiers'],
|
|
||||||
'copyright': pyproject['tool']['poetry']['copyright'],
|
|
||||||
"repository": pyproject['tool']['poetry']['repository'],
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
_root = pathlib.Path(__file__).parent.parent
|
|
||||||
_infodict = load_project_settings(_root)
|
|
||||||
|
|
||||||
NAME = _infodict["name"]
|
|
||||||
VERSION = _infodict["version"]
|
|
||||||
AUTHORS = _infodict["authors"]
|
|
||||||
COPYRIGHT = _infodict["copyright"]
|
|
||||||
HOMEPAGE = _infodict["repository"]
|
|
||||||
CLASSIFIERS = _infodict["classifiers"]
|
|
||||||
DESCRIPTION = _infodict["description"]
|
|
||||||
ORGANIZATION = _infodict["organization"]
|
|
Loading…
Reference in New Issue
Block a user