more AI optimizations, reworked logger
This commit is contained in:
@@ -1,20 +1,12 @@
|
||||
import random
|
||||
import sys
|
||||
from typing import Any, Union
|
||||
|
||||
import loguru
|
||||
from PySide6 import QtCore, QtGui, QtWidgets
|
||||
from PySide6.QtCharts import QCategoryAxis, QChart, QChartView, QLineSeries, QValueAxis
|
||||
from PySide6.QtGui import QColor, QPainter, QPen
|
||||
|
||||
from src import LOG_DIR
|
||||
from src.logic.semester import Semester
|
||||
|
||||
log = loguru.logger
|
||||
log.remove()
|
||||
log.add(sys.stdout, level="INFO")
|
||||
log.add(f"{LOG_DIR}/application.log", rotation="1 MB", retention="10 days")
|
||||
|
||||
|
||||
def mergedicts(d1: dict[str, Any], d2: dict[str, Any]):
|
||||
res: dict[str, Any] = {}
|
||||
@@ -182,16 +174,3 @@ class DataQtGraph(QtWidgets.QWidget):
|
||||
# split the data back into x and y
|
||||
data = {"x": list(data.keys()), "y": list(data.values())}
|
||||
return data
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
graph_data = {"x": ["WiSe 25/26", "WiSe 24/25", "SoSe 25"], "y": [1, 2, 1]}
|
||||
widget = DataGraph(
|
||||
"ELSA Apparate pro Semester", graph_data, True, "Anzahl der Apparate"
|
||||
)
|
||||
widget.show()
|
||||
sys.exit(app.exec())
|
||||
|
||||
Reference in New Issue
Block a user