Commit a14cd05f authored by Georgiy Yankovskiy's avatar Georgiy Yankovskiy

Poetry: project structure, toml, lock, README.md edit

parent d2930daf
...@@ -7,12 +7,13 @@ Use the following commands in UNIX shell: ...@@ -7,12 +7,13 @@ Use the following commands in UNIX shell:
```shell ```shell
# Prepare and activate virtual environment # Prepare and activate virtual environment
python -m venv .venv python -m pip install --user pipx
source .venv/bin/activate python -m pipx ensurepath
pipx install poetry
# Install requirements # Install requirements
pip install -r requirements.txt poetry install
# Run # Run
python src/main.py poetry run main
``` ```
\ No newline at end of file
import sys import sys
from pathlib import Path from pathlib import Path
from PySide6.QtGui import QGuiApplication from PySide6.QtGui import QGuiApplication
from PySide6.QtQml import QQmlApplicationEngine from PySide6.QtQml import QQmlApplicationEngine
from ingame.models.App import App
from ingame.models.GamesModel import GamesModel
from models.App import App
from models.GamesModel import GamesModel
# TODO: add VirtualKeyboard # TODO: add VirtualKeyboard
if __name__ == "__main__": def main():
app = QGuiApplication(sys.argv) app = QGuiApplication(sys.argv)
qml_file = Path(__file__).resolve().parent / "../qml/qml.qml" qml_file = Path(__file__).resolve().parent / "../qml/qml.qml"
engine = QQmlApplicationEngine() engine = QQmlApplicationEngine()
...@@ -23,3 +22,7 @@ if __name__ == "__main__": ...@@ -23,3 +22,7 @@ if __name__ == "__main__":
sys.exit(-1) sys.exit(-1)
sys.exit(app.exec()) sys.exit(app.exec())
if __name__ == "__main__":
main()
import threading import threading
import glob
import os.path
import subprocess
from time import sleep from time import sleep
from pathlib import Path
from PySide6 import QtCore from PySide6 import QtCore
from os.path import expanduser from os.path import expanduser
import glob
from desktop_parser import DesktopFile from desktop_parser import DesktopFile
import os.path from ingame.models.GamesModel import Game, GamesModel
from pathlib import Path
from PySide6.QtCore import Property, Signal, Slot, QObject, Qt from PySide6.QtCore import Property, Signal, Slot, QObject, Qt
from models.GamesModel import Game, GamesModel
import subprocess
class GameShortcut: class GameShortcut:
...@@ -51,10 +50,10 @@ class App(QtCore.QObject): ...@@ -51,10 +50,10 @@ class App(QtCore.QObject):
_icon = entry['Icon'] _icon = entry['Icon']
assert (isinstance(_name, str) assert (isinstance(_name, str)
and isinstance(exec, str) and isinstance(_exec, str)
and isinstance(_icon, str)) and isinstance(_icon, str))
exec_split = exec.split(' ') exec_split = _exec.split(' ')
# Ignore extra non-related desktop entries # Ignore extra non-related desktop entries
if (len(exec_split) <= 1 or if (len(exec_split) <= 1 or
......
import typing import typing
from dataclasses import dataclass, fields from dataclasses import dataclass, fields
from PySide6.QtCore import QAbstractListModel, QModelIndex, Qt, QByteArray from PySide6.QtCore import QAbstractListModel, QModelIndex, Qt, QByteArray
......
This diff is collapsed. Click to expand it.
[tool.poetry]
name = "ingame"
version = "0.1.0"
description = ""
authors = ["Mikhail Tergoev <57610802+castro-fidel@users.noreply.github.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.11,<3.13"
PySide6 = "^6.7.0"
PySide6-Essentials = "^6.7.0"
PySide6-Addons = "^6.7.0"
shiboken6 = "^6.7.0"
pyqtgraph = "^0.13.6"
requests = "^2.31.0"
desktop-parser = "^0.1.1"
[tool.poetry.group.dev.dependencies]
mypy = "^1.9.0"
[tool.poetry.scripts]
main = 'ingame.main:main'
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment