Compare commits
14 Commits
4f0703e7af
...
512242c732
| Author | SHA1 | Date |
|---|---|---|
|
|
512242c732 | 1 month ago |
|
|
b8a4718704 | 1 month ago |
|
|
01871d8bb9 | 1 month ago |
|
|
d6fa6d1542 | 1 month ago |
|
|
66587b1872 | 1 month ago |
|
|
dc9a71a6af | 1 month ago |
|
|
f9b021e9e9 | 1 month ago |
|
|
dd33107308 | 1 month ago |
|
|
caf2ed0478 | 1 month ago |
|
|
187c3be89c | 1 month ago |
|
|
bb3edb3b8b | 1 month ago |
|
|
e09431c3b8 | 1 month ago |
|
|
609951942f | 1 month ago |
|
|
abb2835434 | 1 month ago |
@ -0,0 +1,4 @@ |
||||
.venv/ |
||||
__pycache__/ |
||||
*.pyc |
||||
.pytest_cache/ |
||||
@ -0,0 +1 @@ |
||||
3.12 |
||||
@ -0,0 +1,26 @@ |
||||
# TuringSmartScreen |
||||
|
||||
Projekt zur Ansteuerung eines per USB angeschlossenen Turing Smart Screen 3.5". |
||||
Ausführliche Recherche, Protokoll und Quellen: [docs/recherche.md](docs/recherche.md). |
||||
|
||||
## Hardware-Eckdaten |
||||
- Turing Smart Screen 3.5", Upstream-Revision **A**, 320×480 (nativ Hochformat), RGB565 little-endian |
||||
- USB `1a86:5722`, Seriennummer `USB35INCHIPSV2`, CDC-ACM → `/dev/ttyACM0` |
||||
- Stabiler Pfad: **`/dev/turing-screen`** (eigene udev-Regel `/etc/udev/rules.d/99-turing-smart-screen.rules`) |
||||
- Vollbild-Update dauert ~2 s → nur geänderte Bereiche neu senden |
||||
- Helligkeit niedrig halten (Rev. A wird heiß), Upstream-Default 20 % |
||||
|
||||
## Umgebung |
||||
- Ubuntu 24.04, Python 3.12, `uv` vorhanden; `pyserial` nicht systemweit → venv nutzen |
||||
- ModemManager (Snap) wird per udev-Regel (`ID_MM_DEVICE_IGNORE=1`) vom Display ferngehalten – eingerichtet |
||||
|
||||
## Referenz |
||||
- Upstream-Bibliothek/System-Monitor: https://github.com/mathoudebine/turing-smart-screen-python (GPL-3.0) |
||||
Treiber für dieses Gerät: `library/lcd/lcd_comm_rev_a.py` (`LcdCommRevA`) |
||||
|
||||
## RAM-Monitor (`src/ramscreen`) |
||||
- Läuft als User-Dienst: `systemctl --user status|restart|stop ramscreen` |
||||
- Logs: `journalctl --user -u ramscreen -f` |
||||
- Einstellungen: `config.toml` (danach `systemctl --user restart ramscreen`) |
||||
- Tests: `uv run pytest` |
||||
- Spec/Plan: `docs/superpowers/specs/2026-10-14-ram-monitor-design.md`, `docs/superpowers/plans/2026-10-14-ram-monitor.md` |
||||
@ -0,0 +1,12 @@ |
||||
# Konfiguration des RAM-Monitors. Fehlende Schlüssel nehmen den Standardwert. |
||||
|
||||
port = "/dev/turing-screen" # Gerätepfad (udev-Symlink) |
||||
brightness = 20 # Helligkeit in Prozent (Rev. A wird bei hoher Helligkeit heiß) |
||||
rotate_180 = false # Anzeige auf den Kopf stellen |
||||
|
||||
warn_free_percent = 20 # gelb, wenn weniger als so viel Prozent RAM frei sind |
||||
crit_free_percent = 10 # rot mit Rahmen, wenn weniger als so viel Prozent frei sind |
||||
top_n = 5 # Anzahl angezeigter Programme (1–5) |
||||
|
||||
memory_interval = 2 # Sekunden zwischen RAM-/Swap-Aktualisierungen |
||||
apps_interval = 10 # Sekunden zwischen Aktualisierungen der Programmliste |
||||
|
After Width: | Height: | Size: 44 KiB |
@ -0,0 +1,109 @@ |
||||
# Turing Smart Screen – Bestandsaufnahme & Recherche |
||||
|
||||
Stand: 14.10.2026 |
||||
|
||||
## 1. Angeschlossene Hardware |
||||
|
||||
| Eigenschaft | Wert | |
||||
|---|---| |
||||
| Modell | Turing Smart Screen 3.5" (IPS, 320×480, Hochformat nativ) | |
||||
| Hardware-Revision (Upstream-Bezeichnung) | **A** | |
||||
| Sub-Revision | `TURING_3_5` (antwortet nicht auf `HELLO`, das ist bei diesem Modell normal) | |
||||
| USB VID:PID | `1a86:5722` (QinHeng/WCH, Produkt „UsbMonitor“, Hersteller „Turing“) | |
||||
| USB-Seriennummer | `USB35INCHIPSV2` | |
||||
| Controller | WCH CH552T (USB 2.0 Full Speed, CDC-ACM) | |
||||
| Linux-Gerät | `/dev/ttyACM0`, stabil: `/dev/serial/by-id/usb-Turing_UsbMonitor_USB35INCHIPSV2-if00` | |
||||
| Treiber | `cdc_acm` (Kernel, kein Zusatztreiber nötig) | |
||||
| Stromaufnahme (Deskriptor) | 500 mA, bus-powered | |
||||
| Zugriff | User `matthias` ist in `dialout` → Zugriff ohne root funktioniert | |
||||
|
||||
### Verbindungstest (14.10.2026) |
||||
- Kommunikation funktioniert: Helligkeit, Ausrichtung und ein Vollbild-Testbild wurden erfolgreich gesendet. |
||||
- **Vollbild (480×320, RGB565) dauert ca. 2,0 s** (~150 KB/s). Für flüssige Anzeigen also nur |
||||
geänderte Bildbereiche (Teil-Updates) senden, nie ständig ganze Frames. |
||||
|
||||
## 2. Host-System |
||||
|
||||
- Ubuntu 24.04.5 LTS, Python 3.12.3, `uv` und `pipx` vorhanden, Pillow 12.1.1 systemweit. |
||||
- `pyserial` ist **nicht** systemweit installiert → eigenes venv verwenden. |
||||
- **ModemManager (Snap 1.20, `--filter-policy=STRICT`) läuft** und hat das Display beim Einstecken |
||||
mit AT-Befehlen abgetastet (Log: `couldn't check support for device … 3-6.1.3.3: not supported by any plugin`). |
||||
Das Display meldet sich als CDC-ACM mit Protokoll „AT-commands“ und ist daher `ID_MM_CANDIDATE=1`. |
||||
Das kann die Kommunikation in den ersten Sekunden nach dem Einstecken bzw. nach jedem Reset stören. |
||||
Abhilfe (udev-Regel, ab MM 1.12 auch bei STRICT wirksam): |
||||
|
||||
``` |
||||
# /etc/udev/rules.d/99-turing-smart-screen.rules |
||||
ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5722", ENV{ID_MM_DEVICE_IGNORE}="1" |
||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5722", SYMLINK+="turing-screen" |
||||
``` |
||||
Danach `sudo udevadm control --reload-rules` und Display neu einstecken. |
||||
**Eingerichtet am 14.10.2026**: `ID_MM_DEVICE_IGNORE=1` wirkt, ModemManager ignoriert das Display, |
||||
Symlink `/dev/turing-screen` existiert und funktioniert. |
||||
|
||||
## 3. Protokoll (Revision A) |
||||
|
||||
Seriell über CDC-ACM (die Baudrate ist bei USB-CDC egal). Jeder Befehl besteht aus 6 Bytes: |
||||
Koordinaten `x, y, ex, ey` (je 10 Bit, bit-gepackt in 5 Bytes) + 1 Byte Befehlscode. |
||||
|
||||
``` |
||||
b[0] = x >> 2 |
||||
b[1] = ((x & 3) << 6) + (y >> 4) |
||||
b[2] = ((y & 15) << 4) + (ex >> 6) |
||||
b[3] = ((ex & 63) << 2) + (ey >> 8) |
||||
b[4] = ey & 255 |
||||
b[5] = cmd |
||||
``` |
||||
|
||||
| Code | Befehl | Hinweis | |
||||
|---|---|---| |
||||
| 101 | RESET | Gerät meldet sich am USB neu an (Port kann wechseln, ~5 s warten) | |
||||
| 102 | CLEAR | weiß; nur korrekt in Hochformat → vorher Ausrichtung auf Portrait | |
||||
| 103 | TO_BLACK | ungetestet | |
||||
| 108 / 109 | SCREEN_OFF / SCREEN_ON | | |
||||
| 110 | SET_BRIGHTNESS | `x` = 0 (hellste) … 255 (dunkel) – **invertiert** | |
||||
| 121 | SET_ORIENTATION | 16-Byte-Paket: Byte 6 = Orientierung+100, Bytes 7–10 = Breite/Höhe | |
||||
| 197 | DISPLAY_BITMAP | danach Pixeldaten RGB565 **little-endian**, Rechteck `x,y → ex,ey` | |
||||
| 69 | HELLO | nur UsbMonitor-Klone antworten; echte Turing 3.5" schweigen | |
||||
| 122 / 195 | SET_MIRROR / DISPLAY_PIXELS | nur neuere Geräte | |
||||
|
||||
Orientierungen: Portrait 0, Landscape 2, Reverse Portrait 1, Reverse Landscape 3 |
||||
(Upstream-Enum `Orientation`). |
||||
|
||||
Bekannte Eigenheiten Rev. A: |
||||
- Wird bei hoher Helligkeit **heiß** → Upstream-Default 20 %. |
||||
- `RESET_ON_STARTUP: true` lässt das Gerät neu enumerieren; bei manchen Rev.-A-Varianten (separates |
||||
Mainboard) kommt es danach nicht zurück → dann `false` setzen. |
||||
- Keine Video-/Speicherfunktion, das Display zeigt nur an, was der Host schickt. Ohne Host bleibt das |
||||
letzte Bild bzw. das Hersteller-Startbild stehen. |
||||
|
||||
## 4. Software-Ökosystem |
||||
|
||||
### turing-smart-screen-python (Referenzprojekt) |
||||
- https://github.com/mathoudebine/turing-smart-screen-python – GPL-3.0, ~2.100 Sterne, aktiv gepflegt. |
||||
- Neueste Version **3.10.0** (12.04.2026), letzter Commit am 04.09.2026. Python 3.9+ (3.14 außer Windows). |
||||
- Zwei Nutzungsarten: |
||||
1. **System-Monitor** (`main.py` + `config.yaml` + Themes in `res/themes/`, z. B. `3.5inchTheme2`), |
||||
Konfig-GUI `configure.py`, Theme-Editor `theme-editor.py`, systemd-Unit in `tools/`. |
||||
2. **Bibliothek** (`library/lcd/lcd_comm_rev_a.py` → `LcdCommRevA`): Bilder, Text, Fortschrittsbalken |
||||
(linear/radial), Helligkeit, Ausrichtung, An/Aus. Beispiel: `simple-program.py`. |
||||
- Simulationsmodus `REVISION: SIMU` schreibt `screencap.png` – praktisch zum Entwickeln ohne Hardware. |
||||
- Vorsicht bei der systemd-Unit: `ProtectHome=read-only` verhindert das Schreiben von `log.log`, |
||||
wenn das Programm im Home-Verzeichnis liegt. |
||||
- Abhängigkeiten (Auszug): pyserial, Pillow, numpy, psutil, PyYAML, pystray, GPUtil (Fork für Py ≥3.12). |
||||
|
||||
### Weitere |
||||
- Fork mit Wetter-App und Kamera-Viewer: https://github.com/PhazerTech/turing-smart-screen-python-weather-app |
||||
- .NET-Bibliothek: usausa/turing-smart-screen |
||||
- Unraid-/Docker-Image des Python-Projekts (Device-Pfad, Theme, Helligkeit konfigurierbar). |
||||
- Hersteller-Software (TURZX/„UsbMonitor“) nur für Windows; AIDA64 unterstützt das Gerät nicht. |
||||
|
||||
## 5. Quellen |
||||
|
||||
- https://github.com/mathoudebine/turing-smart-screen-python |
||||
- https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions |
||||
- https://github.com/mathoudebine/turing-smart-screen-python/wiki/Troubleshooting |
||||
- https://github.com/mathoudebine/turing-smart-screen-python/releases |
||||
- https://www.cnx-software.com/2022/04/29/turing-smart-screen-a-low-cost-3-5-inch-usb-type-c-information-display/ |
||||
- https://distributions.freedesktop.org/software/ModemManager/api/latest/ModemManager-Common-udev-tags.html |
||||
- https://forums.aida64.com/topic/10204-turing-smart-screen-no-support/ |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,155 @@ |
||||
# RAM-Monitor für den Turing Smart Screen – Design |
||||
|
||||
Datum: 14.10.2026 · Status: zur Freigabe |
||||
|
||||
## 1. Ziel |
||||
|
||||
Der Arbeitsspeicher des Laptops läuft regelmäßig voll. Das Display soll auf einen Blick zeigen, |
||||
**ob** der RAM knapp wird und **wer** ihn belegt, damit rechtzeitig reagiert werden kann. |
||||
|
||||
Erfolgskriterien: |
||||
- RAM- und Swap-Belegung sind aus normaler Sitzentfernung ablesbar und höchstens ~3 s alt. |
||||
- Die 5 größten Programme sind sichtbar, mehrere Prozesse eines Programms zusammengefasst. |
||||
- Knapper RAM fällt durch Farbe auf (gelb/rot, rot zusätzlich mit Rahmen). |
||||
- Die Anzeige startet automatisch bei der Anmeldung und übersteht Ab-/Anstecken des Displays. |
||||
|
||||
Nicht-Ziele: Verlauf/Kurve, Festplatte, CPU/GPU, Touch/Bedienung, Windows/macOS, |
||||
Upstream-Themes, Home-Assistant-Anbindung, Helligkeitsänderung je Warnstufe. |
||||
|
||||
## 2. Hardware-Rahmen |
||||
|
||||
- Turing Smart Screen 3.5", Revision A, nativ 320×480 (Hochformat), Pixel RGB565 little-endian. |
||||
- Gerätepfad `/dev/turing-screen` (udev-Symlink, siehe `docs/recherche.md`). |
||||
- Ausrichtung: Gerät bleibt in nativer **PORTRAIT**-Ausrichtung (mit dem Nutzer geprüft: richtig herum). |
||||
Optionale 180°-Drehung erfolgt in Software (`Image.rotate(180)`), nicht über den Gerätebefehl. |
||||
- Helligkeit Standard 20 % (Rev. A wird bei hoher Helligkeit heiß). |
||||
- Vollbild-Übertragung ≈ 2 s → es werden nur geänderte Bildbereiche gesendet. |
||||
- Kein `RESET` beim Start (führt zu Neu-Enumeration, bei Rev. A teils problematisch). |
||||
|
||||
## 3. Layout (320×480, dunkler Hintergrund) |
||||
|
||||
Referenz-Mockup: `docs/mockup-hochformat.png`. |
||||
|
||||
| Bereich | Inhalt | Position (y) | |
||||
|---|---|---| |
||||
| Kopf | „ARBEITSSPEICHER“ links (grau), Uhrzeit `HH:MM` rechts (grau) | 10 | |
||||
| Hauptzahl | belegt in Prozent, zentriert, Statusfarbe, Noto Sans Bold 84 | Mitte 80 | |
||||
| Detail 1 | „12,9 von 15,3 GiB belegt“, zentriert, hell | Mitte 140 | |
||||
| Detail 2 | „2,4 GiB frei“, zentriert, Statusfarbe | Mitte 168 | |
||||
| RAM-Balken | volle Breite (Rand 14 px), 26 px hoch, Füllung in Statusfarbe | 192–218 | |
||||
| Swap-Zeile | „Swap“ links, „1,9 / 1,9 GiB“ rechts | 232 | |
||||
| Swap-Balken | volle Breite, 12 px; grau, **rot ab > 90 %** belegt | 256–268 | |
||||
| Trennlinie | | 284 | |
||||
| Top-Programme | 5 Zeilen à 36 px (Balken 30 px): Name links (max. 20 Zeichen), Größe rechts (Mono), Hintergrundbalken = Anteil am Gesamt-RAM | ab 294 | |
||||
| Rahmen | 4 px in Rot, nur im Zustand „kritisch“ | Rand | |
||||
|
||||
Farben: Hintergrund `#0E1014`, Text `#EBEEF2`, gedimmt `#8C929C`, Balkenspur `#2A2E36`, |
||||
Programmbalken `#20242C`; Status ok `#2ECC71`, knapp `#F1C40F`, kritisch `#E74C3C`. |
||||
Schriften: Noto Sans Regular/Bold, DejaVu Sans Mono (Systempfade); fehlt eine Schrift → Pillow-Standardschrift. |
||||
Zahlen mit deutschem Dezimalkomma, eine Nachkommastelle, Einheit GiB (2^30). |
||||
|
||||
### Endbildschirm |
||||
Beim Beenden: dunkler Hintergrund, zentriert in Grau „Monitor beendet“ und darunter die Uhrzeit des |
||||
Beendens (`HH:MM`), damit kein veralteter Stand stehen bleibt. |
||||
|
||||
## 4. Messwerte |
||||
|
||||
Quelle ist ausschließlich `/proc` (keine psutil-Abhängigkeit). |
||||
|
||||
- **RAM/Swap:** `/proc/meminfo` → `MemTotal`, `MemAvailable`, `SwapTotal`, `SwapFree`. |
||||
belegt = `MemTotal − MemAvailable`. |
||||
- **Warnstufe** nach Anteil frei = `MemAvailable / MemTotal`: |
||||
`ok` ≥ 20 %, `knapp` < 20 %, `kritisch` < 10 % (Schwellen konfigurierbar). |
||||
- **Top-Programme:** für jeden Prozess |
||||
- Name = Basename von `/proc/<pid>/exe`; nicht lesbar → `/proc/<pid>/comm`. |
||||
- Größe = `Pss` aus `/proc/<pid>/smaps_rollup`; nicht lesbar → `VmRSS` aus `/proc/<pid>/status`. |
||||
- Summe je Name, absteigend sortiert, die ersten N (Standard 5). |
||||
- Verschwindende Prozesse während des Scans werden still übersprungen. |
||||
- **Intervalle:** RAM/Swap alle 2 s, Top-Programme alle 10 s (Scan ≈ 160 ms → < 2 % eines Kerns). |
||||
|
||||
## 5. Komponenten |
||||
|
||||
``` |
||||
src/ramscreen/ |
||||
lcd.py Treiber Rev. A |
||||
meminfo.py Messwerte aus /proc |
||||
render.py Messwerte → PIL-Bild |
||||
diff.py altes/neues Bild → geänderte Rechtecke |
||||
config.py config.toml laden (tomllib), Standardwerte |
||||
__main__.py Hauptschleife, Signale, Wiederverbinden |
||||
``` |
||||
|
||||
### lcd.py – `Lcd` |
||||
- `open()` / `close()`: `serial.Serial(path, 115200, timeout=1, rtscts=True, write_timeout=5)` |
||||
(wie Upstream; zusätzlich `write_timeout`, damit ein hängendes Gerät als Fehler erkannt wird statt |
||||
die Schleife zu blockieren). |
||||
- `set_orientation_portrait()`: 16-Byte-Paket wie Upstream (Header mit Befehl 121, Byte 6 = 100, |
||||
Bytes 7–10 = Breite 320 / Höhe 480 big-endian). |
||||
- `set_brightness(prozent)`: Befehl 110, `x = int(255 − prozent/100·255)`. |
||||
- `show(image, x, y)`: Befehl 197 mit Rechteck `(x, y, x+w−1, y+h−1)`, danach Pixel als RGB565 LE |
||||
(numpy), geschrieben in Blöcken à `320·8` Bytes. |
||||
- Header-Kodierung (6 Byte): `[x>>2, ((x&3)<<6)+(y>>4), ((y&15)<<4)+(ex>>6), ((ex&63)<<2)+(ey>>8), ey&255, cmd]`. |
||||
- Fehler beim Schreiben (`OSError`, `SerialException`, `SerialTimeoutException`) werden nicht im Treiber |
||||
behandelt, sondern nach oben gereicht; das Wiederverbinden macht die Hauptschleife. |
||||
|
||||
### meminfo.py |
||||
- `read_memory() -> Memory(total, available, swap_total, swap_free)` (Bytes). |
||||
- `top_apps(n) -> list[App(name, bytes)]`. |
||||
- `level(memory, warn, crit) -> "ok" | "knapp" | "kritisch"`. |
||||
- Parser nehmen optional einen Pfad/Text entgegen, damit Tests mit Beispieldaten laufen. |
||||
|
||||
### render.py |
||||
- `render(memory, apps, now, cfg) -> Image` (320×480, RGB), reine Funktion. |
||||
- `render_stopped(now) -> Image`. |
||||
|
||||
### diff.py |
||||
- `changed_rects(old, new) -> list[(x, y, w, h)]`; `old is None` → ganzes Bild. |
||||
- Verfahren: Bild in waagerechte Bänder à 16 px; je Band Bounding-Box der Differenz |
||||
(`ImageChops.difference(...).getbbox()`); direkt aufeinanderfolgende geänderte Bänder werden zu einem |
||||
Rechteck vereinigt (x-Bereich = Vereinigung). |
||||
|
||||
### config.py / config.toml |
||||
```toml |
||||
port = "/dev/turing-screen" |
||||
brightness = 20 # Prozent |
||||
rotate_180 = false |
||||
warn_free_percent = 20 |
||||
crit_free_percent = 10 |
||||
top_n = 5 |
||||
memory_interval = 2 # Sekunden |
||||
apps_interval = 10 # Sekunden |
||||
``` |
||||
Fehlende Datei oder fehlende Schlüssel → Standardwerte. Pfad per Argument `--config` überschreibbar, |
||||
Standard: `config.toml` im Projektordner. |
||||
|
||||
### __main__.py – Ablauf |
||||
1. Konfiguration laden, Signale SIGTERM/SIGINT abfangen (setzt Stopp-Flag). |
||||
2. Verbinden: `open()`, Ausrichtung, Helligkeit, `last_frame = None`. |
||||
3. Schleife alle `memory_interval` s: Messwerte holen (Apps nur, wenn `apps_interval` abgelaufen), |
||||
rendern, ggf. drehen, `changed_rects` → je Rechteck `show(ausschnitt, x, y)`, `last_frame` merken. |
||||
4. Schreibfehler → loggen, `close()`, 5 s warten, zurück zu Schritt 2 (bis Stopp-Flag). |
||||
5. Stopp-Flag → Endbildschirm vollständig senden (Fehler ignorieren), `close()`, Exit 0. |
||||
|
||||
Logging über `logging` auf stdout (landet im Journal), INFO für Verbinden/Trennen, keine Ausgabe pro Frame. |
||||
|
||||
## 6. Betrieb |
||||
|
||||
- uv-Projekt (`pyproject.toml`, `requires-python >= 3.12`), Abhängigkeiten `pyserial`, `pillow`, `numpy`; |
||||
dev: `pytest`. Virtuelle Umgebung `.venv` im Projektordner. |
||||
- systemd-User-Unit `systemd/ramscreen.service`, installiert per Symlink nach `~/.config/systemd/user/`: |
||||
`ExecStart=%h/code/TuringSmartScreen/.venv/bin/python -m ramscreen`, `WorkingDirectory=%h/code/TuringSmartScreen`, |
||||
`Restart=always`, `RestartSec=5`, `WantedBy=default.target`. |
||||
- Start bei Anmeldung; `systemctl --user enable --now ramscreen`. |
||||
|
||||
## 7. Tests (pytest) |
||||
|
||||
- `lcd`: Header-Kodierung für Beispielwerte stimmt mit der Upstream-Formel überein; Orientierungs- |
||||
und Helligkeitspakete byte-genau; RGB565-Umrechnung für bekannte Farben (Weiß, Rot, Grün, Blau); |
||||
`show` schreibt Header + korrekte Datenmenge (Fake-Serial). |
||||
- `meminfo`: Parsen einer Beispiel-`/proc/meminfo`; Warnstufen an den Grenzen (genau 20 %, 10 %); |
||||
Gruppierung/Sortierung der Apps mit einem Fake-`/proc`-Baum (inkl. PSS-Fallback auf RSS). |
||||
- `diff`: identische Bilder → keine Rechtecke; `None` → Vollbild; Änderung in zwei getrennten Bereichen |
||||
→ zwei Rechtecke; Änderung über Bandgrenze → ein vereinigtes Rechteck. |
||||
- `render`: liefert 320×480 RGB für alle drei Warnstufen; roter Rahmen nur bei „kritisch“. |
||||
- `config`: Standardwerte bei fehlender Datei, Überschreiben einzelner Schlüssel. |
||||
- Hardware: manuelle Sichtprüfung am Display (Start, Warnfarben, Abziehen/Anstecken, Beenden). |
||||
@ -0,0 +1,23 @@ |
||||
[project] |
||||
name = "ramscreen" |
||||
version = "0.1.0" |
||||
description = "RAM-Monitor für den Turing Smart Screen 3.5\" (Rev. A)" |
||||
requires-python = ">=3.12" |
||||
dependencies = [ |
||||
"pyserial>=3.5", |
||||
"pillow>=10.1", |
||||
"numpy>=1.26", |
||||
] |
||||
|
||||
[dependency-groups] |
||||
dev = ["pytest>=8"] |
||||
|
||||
[build-system] |
||||
requires = ["hatchling"] |
||||
build-backend = "hatchling.build" |
||||
|
||||
[tool.hatch.build.targets.wheel] |
||||
packages = ["src/ramscreen"] |
||||
|
||||
[tool.pytest.ini_options] |
||||
testpaths = ["tests"] |
||||
@ -0,0 +1 @@ |
||||
"""RAM-Monitor für den Turing Smart Screen 3.5" (Revision A).""" |
||||
@ -0,0 +1,102 @@ |
||||
"""Hauptprogramm: Messwerte zyklisch rendern und geänderte Bereiche an das Display senden.""" |
||||
|
||||
import argparse |
||||
import logging |
||||
import signal |
||||
import sys |
||||
import threading |
||||
import time |
||||
from datetime import datetime |
||||
from pathlib import Path |
||||
|
||||
from PIL import Image |
||||
|
||||
from ramscreen import meminfo |
||||
from ramscreen.config import Config, load_config |
||||
from ramscreen.diff import changed_rects |
||||
from ramscreen.lcd import Lcd |
||||
from ramscreen.render import render, render_stopped |
||||
|
||||
log = logging.getLogger("ramscreen") |
||||
|
||||
RECONNECT_DELAY = 5.0 |
||||
DEFAULT_CONFIG = Path(__file__).resolve().parents[2] / "config.toml" |
||||
|
||||
|
||||
def _orient(frame: Image.Image, cfg: Config) -> Image.Image: |
||||
return frame.rotate(180) if cfg.rotate_180 else frame |
||||
|
||||
|
||||
def run( |
||||
cfg: Config, |
||||
lcd, |
||||
stop: threading.Event, |
||||
*, |
||||
read_memory=meminfo.read_memory, |
||||
top_apps=meminfo.top_apps, |
||||
now=datetime.now, |
||||
monotonic=time.monotonic, |
||||
reconnect_delay: float = RECONNECT_DELAY, |
||||
) -> None: |
||||
connected = False |
||||
failure_reported = False |
||||
last_frame = None |
||||
apps: list[meminfo.App] = [] |
||||
next_apps_at = float("-inf") |
||||
|
||||
# finally: auch bei einem unerwarteten Fehler den Endbildschirm zeigen statt den letzten Stand einzufrieren |
||||
try: |
||||
while not stop.is_set(): |
||||
try: |
||||
if not connected: |
||||
lcd.open() |
||||
lcd.set_orientation_portrait() |
||||
lcd.set_brightness(cfg.brightness) |
||||
connected, failure_reported, last_frame = True, False, None |
||||
log.info("Display verbunden (%s)", cfg.port) |
||||
|
||||
t = monotonic() |
||||
if t >= next_apps_at: |
||||
apps = top_apps(cfg.top_n) |
||||
next_apps_at = t + cfg.apps_interval |
||||
|
||||
frame = _orient(render(read_memory(), apps, now(), cfg), cfg) |
||||
for x, y, w, h in changed_rects(last_frame, frame): |
||||
lcd.show(frame.crop((x, y, x + w, y + h)), x, y) |
||||
last_frame = frame |
||||
stop.wait(cfg.memory_interval) |
||||
except OSError as exc: |
||||
if connected or not failure_reported: |
||||
log.warning("Display nicht erreichbar (%s), neuer Versuch in %.0f s", exc, reconnect_delay) |
||||
failure_reported = True |
||||
lcd.close() |
||||
connected = False |
||||
stop.wait(reconnect_delay) |
||||
finally: |
||||
if connected: |
||||
try: |
||||
lcd.show(_orient(render_stopped(now()), cfg), 0, 0) |
||||
except OSError as exc: |
||||
log.warning("Endbildschirm konnte nicht gesendet werden: %s", exc) |
||||
lcd.close() |
||||
log.info("Beendet") |
||||
|
||||
|
||||
def main(argv: list[str] | None = None) -> int: |
||||
parser = argparse.ArgumentParser(prog="ramscreen", description="RAM-Monitor für den Turing Smart Screen") |
||||
parser.add_argument("--config", type=Path, default=DEFAULT_CONFIG, help="Pfad zur config.toml") |
||||
args = parser.parse_args(argv) |
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(message)s") |
||||
cfg = load_config(args.config) |
||||
|
||||
stop = threading.Event() |
||||
for sig in (signal.SIGTERM, signal.SIGINT): |
||||
signal.signal(sig, lambda *_: stop.set()) |
||||
|
||||
run(cfg, Lcd(cfg.port), stop) |
||||
return 0 |
||||
|
||||
|
||||
if __name__ == "__main__": |
||||
sys.exit(main()) |
||||
@ -0,0 +1,37 @@ |
||||
"""Konfiguration aus config.toml laden.""" |
||||
|
||||
import logging |
||||
import tomllib |
||||
from dataclasses import dataclass, fields |
||||
from pathlib import Path |
||||
|
||||
log = logging.getLogger(__name__) |
||||
|
||||
MAX_TOP_N = 5 # mehr Zeilen passen nicht auf das Display |
||||
|
||||
|
||||
@dataclass(frozen=True) |
||||
class Config: |
||||
port: str = "/dev/turing-screen" |
||||
brightness: int = 20 |
||||
rotate_180: bool = False |
||||
warn_free_percent: float = 20 |
||||
crit_free_percent: float = 10 |
||||
top_n: int = 5 |
||||
memory_interval: float = 2 |
||||
apps_interval: float = 10 |
||||
|
||||
|
||||
def load_config(path: Path) -> Config: |
||||
if not path.exists(): |
||||
return Config() |
||||
data = tomllib.loads(path.read_text(encoding="utf-8")) |
||||
known = {f.name for f in fields(Config)} |
||||
for key in sorted(data.keys() - known): |
||||
log.warning("Unbekannter Schlüssel in %s ignoriert: %s", path, key) |
||||
cfg = Config(**{key: value for key, value in data.items() if key in known}) |
||||
if not 0 <= cfg.brightness <= 100: |
||||
raise ValueError(f"brightness muss zwischen 0 und 100 liegen, ist {cfg.brightness}") |
||||
if not 1 <= cfg.top_n <= MAX_TOP_N: |
||||
raise ValueError(f"top_n muss zwischen 1 und {MAX_TOP_N} liegen, ist {cfg.top_n}") |
||||
return cfg |
||||
@ -0,0 +1,32 @@ |
||||
"""Ermittelt, welche Bildbereiche sich geändert haben (das Display ist langsam: ~2 s pro Vollbild).""" |
||||
|
||||
from PIL import Image, ImageChops |
||||
|
||||
BAND_HEIGHT = 16 |
||||
|
||||
Rect = tuple[int, int, int, int] # x, y, Breite, Höhe |
||||
|
||||
|
||||
def changed_rects(old: Image.Image | None, new: Image.Image) -> list[Rect]: |
||||
width, height = new.size |
||||
if old is None or old.size != new.size: |
||||
return [(0, 0, width, height)] |
||||
|
||||
diff = ImageChops.difference(old.convert("RGB"), new.convert("RGB")) |
||||
boxes: list[list[int]] = [] # [x0, y0, x1, y1], x1/y1 exklusiv |
||||
current: list[int] | None = None |
||||
for top in range(0, height, BAND_HEIGHT): |
||||
bbox = diff.crop((0, top, width, min(top + BAND_HEIGHT, height))).getbbox() |
||||
if bbox is None: |
||||
if current is not None: |
||||
boxes.append(current) |
||||
current = None |
||||
continue |
||||
x0, y0, x1, y1 = bbox[0], top + bbox[1], bbox[2], top + bbox[3] |
||||
if current is None: |
||||
current = [x0, y0, x1, y1] |
||||
else: |
||||
current = [min(current[0], x0), current[1], max(current[2], x1), y1] |
||||
if current is not None: |
||||
boxes.append(current) |
||||
return [(x0, y0, x1 - x0, y1 - y0) for x0, y0, x1, y1 in boxes] |
||||
@ -0,0 +1,99 @@ |
||||
"""Treiber für den Turing Smart Screen 3.5" (Revision A). |
||||
|
||||
Protokoll nach turing-smart-screen-python (library/lcd/lcd_comm_rev_a.py), siehe docs/recherche.md. |
||||
""" |
||||
|
||||
from collections.abc import Callable |
||||
from enum import IntEnum |
||||
|
||||
import numpy as np |
||||
import serial |
||||
from PIL import Image |
||||
|
||||
WIDTH, HEIGHT = 320, 480 |
||||
BAUDRATE = 115200 |
||||
CHUNK_SIZE = WIDTH * 8 |
||||
PORTRAIT = 0 |
||||
|
||||
|
||||
class Cmd(IntEnum): |
||||
SET_BRIGHTNESS = 110 |
||||
SET_ORIENTATION = 121 |
||||
DISPLAY_BITMAP = 197 |
||||
|
||||
|
||||
def encode_header(cmd: int, x: int, y: int, ex: int, ey: int) -> bytes: |
||||
return bytes([ |
||||
x >> 2, |
||||
((x & 3) << 6) + (y >> 4), |
||||
((y & 15) << 4) + (ex >> 6), |
||||
((ex & 63) << 2) + (ey >> 8), |
||||
ey & 255, |
||||
cmd, |
||||
]) |
||||
|
||||
|
||||
def encode_orientation_portrait() -> bytes: |
||||
packet = bytearray(16) |
||||
packet[0:6] = encode_header(Cmd.SET_ORIENTATION, 0, 0, 0, 0) |
||||
packet[6] = PORTRAIT + 100 |
||||
packet[7:9] = WIDTH.to_bytes(2, "big") |
||||
packet[9:11] = HEIGHT.to_bytes(2, "big") |
||||
return bytes(packet) |
||||
|
||||
|
||||
def encode_brightness(percent: int) -> bytes: |
||||
if not 0 <= percent <= 100: |
||||
raise ValueError(f"Helligkeit muss zwischen 0 und 100 liegen, ist {percent}") |
||||
# Das Display erwartet 0 = am hellsten … 255 = dunkel |
||||
return encode_header(Cmd.SET_BRIGHTNESS, int(255 - percent / 100 * 255), 0, 0, 0) |
||||
|
||||
|
||||
def to_rgb565le(image: Image.Image) -> bytes: |
||||
rgb = np.asarray(image.convert("RGB"), dtype=np.uint16) |
||||
r = (rgb[..., 0] >> 3) << 11 |
||||
g = (rgb[..., 1] >> 2) << 5 |
||||
b = rgb[..., 2] >> 3 |
||||
return (r | g | b).astype("<u2").tobytes() |
||||
|
||||
|
||||
class Lcd: |
||||
def __init__(self, port: str, serial_factory: Callable[..., serial.Serial] = serial.Serial): |
||||
self.port = port |
||||
self._serial_factory = serial_factory |
||||
self._serial = None |
||||
|
||||
def open(self) -> None: |
||||
self.close() |
||||
# exclusive: eine zweite Instanz darf nicht dazwischenschreiben (verstümmelt sonst die Anzeige) |
||||
self._serial = self._serial_factory( |
||||
self.port, BAUDRATE, timeout=1, rtscts=True, write_timeout=5, exclusive=True |
||||
) |
||||
|
||||
def close(self) -> None: |
||||
if self._serial is not None: |
||||
try: |
||||
self._serial.close() |
||||
except OSError: |
||||
pass |
||||
self._serial = None |
||||
|
||||
def set_orientation_portrait(self) -> None: |
||||
self._write(encode_orientation_portrait()) |
||||
|
||||
def set_brightness(self, percent: int) -> None: |
||||
self._write(encode_brightness(percent)) |
||||
|
||||
def show(self, image: Image.Image, x: int, y: int) -> None: |
||||
w, h = image.size |
||||
if x < 0 or y < 0 or w <= 0 or h <= 0 or x + w > WIDTH or y + h > HEIGHT: |
||||
raise ValueError(f"Bildbereich außerhalb des Displays: x={x} y={y} {w}x{h}") |
||||
self._write(encode_header(Cmd.DISPLAY_BITMAP, x, y, x + w - 1, y + h - 1)) |
||||
data = to_rgb565le(image) |
||||
for start in range(0, len(data), CHUNK_SIZE): |
||||
self._write(data[start:start + CHUNK_SIZE]) |
||||
|
||||
def _write(self, data: bytes) -> None: |
||||
if self._serial is None: |
||||
raise OSError("Display nicht verbunden") |
||||
self._serial.write(data) |
||||
@ -0,0 +1,99 @@ |
||||
"""RAM-, Swap- und Programm-Messwerte direkt aus /proc.""" |
||||
|
||||
import os |
||||
from collections import Counter |
||||
from dataclasses import dataclass |
||||
from pathlib import Path |
||||
|
||||
DELETED_SUFFIX = " (deleted)" |
||||
|
||||
|
||||
@dataclass(frozen=True) |
||||
class Memory: |
||||
total: int |
||||
available: int |
||||
swap_total: int |
||||
swap_free: int |
||||
|
||||
@property |
||||
def used(self) -> int: |
||||
return self.total - self.available |
||||
|
||||
|
||||
@dataclass(frozen=True) |
||||
class App: |
||||
name: str |
||||
size: int |
||||
|
||||
|
||||
def parse_meminfo(text: str) -> Memory: |
||||
values = {} |
||||
for line in text.splitlines(): |
||||
key, _, rest = line.partition(":") |
||||
if rest: |
||||
values[key] = int(rest.split()[0]) * 1024 |
||||
return Memory( |
||||
total=values["MemTotal"], |
||||
available=values["MemAvailable"], |
||||
swap_total=values["SwapTotal"], |
||||
swap_free=values["SwapFree"], |
||||
) |
||||
|
||||
|
||||
def read_memory(path: Path = Path("/proc/meminfo")) -> Memory: |
||||
return parse_meminfo(path.read_text()) |
||||
|
||||
|
||||
def level(memory: Memory, warn_free_percent: float, crit_free_percent: float) -> str: |
||||
# Multiplizieren statt dividieren: keine Rundungsfehler genau an der Schwelle |
||||
free = memory.available * 100 |
||||
if free < crit_free_percent * memory.total: |
||||
return "kritisch" |
||||
if free < warn_free_percent * memory.total: |
||||
return "knapp" |
||||
return "ok" |
||||
|
||||
|
||||
def _app_name(pid_dir: Path) -> str: |
||||
try: |
||||
name = os.path.basename(os.readlink(pid_dir / "exe")) |
||||
name = name.removesuffix(DELETED_SUFFIX) |
||||
# Versionsdateien wie ".../versions/2.1.276" sagen nichts aus → dann comm |
||||
if any(c.isalpha() for c in name): |
||||
return name |
||||
except OSError: |
||||
pass |
||||
# errors="replace": der Kernel kürzt comm byteweise, auch mitten in einem UTF-8-Zeichen |
||||
return (pid_dir / "comm").read_text(errors="replace").strip() |
||||
|
||||
|
||||
def _field_kb(path: Path, field: str) -> int | None: |
||||
try: |
||||
for line in path.read_text(errors="replace").splitlines(): |
||||
if line.startswith(field): |
||||
return int(line.split()[1]) |
||||
except OSError: |
||||
pass |
||||
return None |
||||
|
||||
|
||||
def _app_size(pid_dir: Path) -> int | None: |
||||
kb = _field_kb(pid_dir / "smaps_rollup", "Pss:") |
||||
if kb is None: |
||||
kb = _field_kb(pid_dir / "status", "VmRSS:") |
||||
return None if kb is None else kb * 1024 |
||||
|
||||
|
||||
def top_apps(n: int, proc: Path = Path("/proc")) -> list[App]: |
||||
sizes: Counter[str] = Counter() |
||||
for pid_dir in proc.iterdir(): |
||||
if not pid_dir.name.isdigit(): |
||||
continue |
||||
try: |
||||
name = _app_name(pid_dir) |
||||
except OSError: |
||||
continue # Prozess während des Scans verschwunden |
||||
size = _app_size(pid_dir) |
||||
if size: |
||||
sizes[name] += size |
||||
return [App(name, size) for name, size in sizes.most_common(n)] |
||||
@ -0,0 +1,101 @@ |
||||
"""Messwerte → Bild (320×480, Hochformat). Layout siehe docs/mockup-hochformat.png.""" |
||||
|
||||
from datetime import datetime |
||||
|
||||
from PIL import Image, ImageDraw, ImageFont |
||||
|
||||
from ramscreen.config import MAX_TOP_N, Config |
||||
from ramscreen.lcd import HEIGHT, WIDTH |
||||
from ramscreen.meminfo import App, Memory, level |
||||
|
||||
BG = (14, 16, 20) |
||||
FG = (235, 238, 242) |
||||
DIM = (140, 146, 156) |
||||
TRACK = (42, 46, 54) |
||||
APP_BAR = (32, 36, 44) |
||||
STATE_COLORS = {"ok": (46, 204, 113), "knapp": (241, 196, 15), "kritisch": (231, 76, 60)} |
||||
|
||||
MARGIN = 14 |
||||
NAME_MAX = 20 |
||||
ROW_HEIGHT = 36 |
||||
|
||||
_SANS = "/usr/share/fonts/truetype/noto/NotoSans-" |
||||
_MONO = "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf" |
||||
|
||||
|
||||
def _font(path: str, size: int) -> ImageFont.FreeTypeFont: |
||||
try: |
||||
return ImageFont.truetype(path, size) |
||||
except OSError: |
||||
return ImageFont.load_default(size=size) |
||||
|
||||
|
||||
F_TITLE = _font(_SANS + "Bold.ttf", 18) |
||||
F_BIG = _font(_SANS + "Bold.ttf", 84) |
||||
F_MID = _font(_SANS + "Regular.ttf", 20) |
||||
F_SMALL = _font(_SANS + "Regular.ttf", 16) |
||||
F_ROW = _font(_SANS + "Regular.ttf", 18) |
||||
F_MONO = _font(_MONO, 16) |
||||
|
||||
|
||||
def format_gib(n_bytes: int) -> str: |
||||
return f"{n_bytes / 2**30:.1f}".replace(".", ",") |
||||
|
||||
|
||||
def render(memory: Memory, apps: list[App], now: datetime, cfg: Config) -> Image.Image: |
||||
state = level(memory, cfg.warn_free_percent, cfg.crit_free_percent) |
||||
color = STATE_COLORS[state] |
||||
used_frac = memory.used / memory.total |
||||
x0, x1 = MARGIN, WIDTH - MARGIN |
||||
|
||||
img = Image.new("RGB", (WIDTH, HEIGHT), BG) |
||||
d = ImageDraw.Draw(img) |
||||
|
||||
# Kopf |
||||
d.text((x0, 10), "ARBEITSSPEICHER", font=F_TITLE, fill=DIM) |
||||
d.text((x1, 10), now.strftime("%H:%M"), font=F_TITLE, fill=DIM, anchor="ra") |
||||
|
||||
# Hauptzahl und Details |
||||
d.text((WIDTH // 2, 80), f"{round(used_frac * 100)} %", font=F_BIG, fill=color, anchor="mm") |
||||
d.text((WIDTH // 2, 140), f"{format_gib(memory.used)} von {format_gib(memory.total)} GiB belegt", |
||||
font=F_MID, fill=FG, anchor="mm") |
||||
d.text((WIDTH // 2, 168), f"{format_gib(memory.available)} GiB frei", font=F_MID, fill=color, anchor="mm") |
||||
|
||||
# RAM-Balken |
||||
d.rounded_rectangle((x0, 192, x1, 218), 7, fill=TRACK) |
||||
d.rounded_rectangle((x0, 192, x0 + max(14, int((x1 - x0) * used_frac)), 218), 7, fill=color) |
||||
|
||||
# Swap |
||||
d.text((x0, 232), "Swap", font=F_SMALL, fill=DIM) |
||||
d.rounded_rectangle((x0, 256, x1, 268), 4, fill=TRACK) |
||||
if memory.swap_total > 0: |
||||
swap_used = memory.swap_total - memory.swap_free |
||||
swap_frac = swap_used / memory.swap_total |
||||
d.text((x1, 232), f"{format_gib(swap_used)} / {format_gib(memory.swap_total)} GiB", |
||||
font=F_SMALL, fill=FG, anchor="ra") |
||||
swap_color = STATE_COLORS["kritisch"] if swap_frac > 0.9 else DIM |
||||
d.rounded_rectangle((x0, 256, x0 + max(8, int((x1 - x0) * swap_frac)), 268), 4, fill=swap_color) |
||||
else: |
||||
d.text((x1, 232), "keiner", font=F_SMALL, fill=DIM, anchor="ra") |
||||
|
||||
# Top-Programme |
||||
d.line((x0, 284, x1, 284), fill=TRACK, width=1) |
||||
y = 294 |
||||
for app in apps[:MAX_TOP_N]: |
||||
frac = app.size / memory.total |
||||
d.rounded_rectangle((x0, y, x0 + max(10, int((x1 - x0) * frac)), y + 30), 5, fill=APP_BAR) |
||||
d.text((x0 + 8, y + 15), app.name[:NAME_MAX], font=F_ROW, fill=FG, anchor="lm") |
||||
d.text((x1 - 8, y + 15), f"{format_gib(app.size)} GiB", font=F_MONO, fill=FG, anchor="rm") |
||||
y += ROW_HEIGHT |
||||
|
||||
if state == "kritisch": |
||||
d.rectangle((0, 0, WIDTH - 1, HEIGHT - 1), outline=color, width=4) |
||||
return img |
||||
|
||||
|
||||
def render_stopped(now: datetime) -> Image.Image: |
||||
img = Image.new("RGB", (WIDTH, HEIGHT), BG) |
||||
d = ImageDraw.Draw(img) |
||||
d.text((WIDTH // 2, HEIGHT // 2 - 16), "Monitor beendet", font=F_MID, fill=DIM, anchor="mm") |
||||
d.text((WIDTH // 2, HEIGHT // 2 + 16), now.strftime("%H:%M"), font=F_MID, fill=DIM, anchor="mm") |
||||
return img |
||||
@ -0,0 +1,12 @@ |
||||
[Unit] |
||||
Description=RAM-Monitor auf dem Turing Smart Screen |
||||
|
||||
[Service] |
||||
Type=simple |
||||
WorkingDirectory=%h/code/TuringSmartScreen |
||||
ExecStart=%h/code/TuringSmartScreen/.venv/bin/python -m ramscreen |
||||
Restart=always |
||||
RestartSec=5 |
||||
|
||||
[Install] |
||||
WantedBy=default.target |
||||
@ -0,0 +1,46 @@ |
||||
import logging |
||||
from pathlib import Path |
||||
|
||||
import pytest |
||||
|
||||
from ramscreen.config import Config, load_config |
||||
|
||||
|
||||
def test_fehlende_datei_liefert_standardwerte(tmp_path: Path): |
||||
cfg = load_config(tmp_path / "gibt-es-nicht.toml") |
||||
assert cfg == Config() |
||||
assert cfg.port == "/dev/turing-screen" |
||||
assert cfg.brightness == 20 |
||||
assert cfg.rotate_180 is False |
||||
assert cfg.warn_free_percent == 20 |
||||
assert cfg.crit_free_percent == 10 |
||||
assert cfg.top_n == 5 |
||||
assert cfg.memory_interval == 2 |
||||
assert cfg.apps_interval == 10 |
||||
|
||||
|
||||
def test_einzelne_schluessel_ueberschreiben(tmp_path: Path): |
||||
path = tmp_path / "config.toml" |
||||
path.write_text('brightness = 35\nrotate_180 = true\nport = "/dev/ttyACM1"\n', encoding="utf-8") |
||||
cfg = load_config(path) |
||||
assert cfg.brightness == 35 |
||||
assert cfg.rotate_180 is True |
||||
assert cfg.port == "/dev/ttyACM1" |
||||
assert cfg.top_n == 5 # nicht gesetzt → Standard |
||||
|
||||
|
||||
def test_unbekannter_schluessel_wird_ignoriert_und_gewarnt(tmp_path: Path, caplog): |
||||
path = tmp_path / "config.toml" |
||||
path.write_text("helligkeit = 50\n", encoding="utf-8") |
||||
with caplog.at_level(logging.WARNING): |
||||
cfg = load_config(path) |
||||
assert cfg == Config() |
||||
assert "helligkeit" in caplog.text |
||||
|
||||
|
||||
@pytest.mark.parametrize("text", ["brightness = 101\n", "brightness = -1\n", "top_n = 0\n", "top_n = 6\n"]) |
||||
def test_ungueltige_werte_werden_abgelehnt(tmp_path: Path, text: str): |
||||
path = tmp_path / "config.toml" |
||||
path.write_text(text, encoding="utf-8") |
||||
with pytest.raises(ValueError): |
||||
load_config(path) |
||||
@ -0,0 +1,55 @@ |
||||
from PIL import Image, ImageDraw |
||||
|
||||
from ramscreen.diff import changed_rects |
||||
|
||||
BG = (14, 16, 20) |
||||
|
||||
|
||||
def blank(): |
||||
return Image.new("RGB", (320, 480), BG) |
||||
|
||||
|
||||
def test_ohne_vorbild_ganzes_bild(): |
||||
assert changed_rects(None, blank()) == [(0, 0, 320, 480)] |
||||
|
||||
|
||||
def test_andere_groesse_ganzes_bild(): |
||||
assert changed_rects(Image.new("RGB", (480, 320)), blank()) == [(0, 0, 320, 480)] |
||||
|
||||
|
||||
def test_identisch_keine_rechtecke(): |
||||
assert changed_rects(blank(), blank()) == [] |
||||
|
||||
|
||||
def test_zwei_getrennte_bereiche(): |
||||
new = blank() |
||||
d = ImageDraw.Draw(new) |
||||
d.rectangle((10, 5, 19, 9), fill=(255, 0, 0)) # Band 0 |
||||
d.rectangle((100, 200, 149, 209), fill=(255, 0, 0)) # Bänder 192–208 und 208–224 |
||||
assert changed_rects(blank(), new) == [(10, 5, 10, 5), (100, 200, 50, 10)] |
||||
|
||||
|
||||
def test_ueber_bandgrenze_ein_rechteck(): |
||||
new = blank() |
||||
ImageDraw.Draw(new).rectangle((0, 14, 4, 17), fill=(255, 255, 255)) |
||||
assert changed_rects(blank(), new) == [(0, 14, 5, 4)] |
||||
|
||||
|
||||
def test_aufeinanderfolgende_baender_vereinigen_x_bereich(): |
||||
new = blank() |
||||
d = ImageDraw.Draw(new) |
||||
d.rectangle((0, 10, 4, 15), fill=(255, 255, 255)) # Band 0 |
||||
d.rectangle((50, 16, 59, 19), fill=(255, 255, 255)) # Band 1 |
||||
assert changed_rects(blank(), new) == [(0, 10, 60, 10)] |
||||
|
||||
|
||||
def test_aenderung_nur_im_blaukanal_wird_erkannt(): |
||||
new = blank() |
||||
new.putpixel((5, 7), (BG[0], BG[1], BG[2] + 1)) |
||||
assert changed_rects(blank(), new) == [(5, 7, 1, 1)] |
||||
|
||||
|
||||
def test_letzte_zeile(): |
||||
new = blank() |
||||
new.putpixel((319, 479), (255, 255, 255)) |
||||
assert changed_rects(blank(), new) == [(319, 479, 1, 1)] |
||||
@ -0,0 +1,153 @@ |
||||
import pytest |
||||
from PIL import Image |
||||
|
||||
from ramscreen.lcd import ( |
||||
CHUNK_SIZE, |
||||
HEIGHT, |
||||
WIDTH, |
||||
Lcd, |
||||
encode_brightness, |
||||
encode_header, |
||||
encode_orientation_portrait, |
||||
to_rgb565le, |
||||
) |
||||
|
||||
|
||||
class FakeSerial: |
||||
def __init__(self, port, baudrate, **kwargs): |
||||
self.port = port |
||||
self.baudrate = baudrate |
||||
self.kwargs = kwargs |
||||
self.writes: list[bytes] = [] |
||||
self.closed = False |
||||
|
||||
def write(self, data): |
||||
self.writes.append(bytes(data)) |
||||
return len(data) |
||||
|
||||
def close(self): |
||||
self.closed = True |
||||
|
||||
|
||||
def make_lcd(): |
||||
created = [] |
||||
|
||||
def factory(port, baudrate, **kwargs): |
||||
s = FakeSerial(port, baudrate, **kwargs) |
||||
created.append(s) |
||||
return s |
||||
|
||||
return Lcd("/dev/test", serial_factory=factory), created |
||||
|
||||
|
||||
def test_header_vollbild(): |
||||
assert encode_header(197, 0, 0, 319, 479) == bytes([0, 0, 4, 253, 223, 197]) |
||||
|
||||
|
||||
def test_header_beliebiges_rechteck(): |
||||
assert encode_header(197, 10, 20, 100, 200) == bytes([2, 129, 65, 144, 200, 197]) |
||||
|
||||
|
||||
@pytest.mark.parametrize( |
||||
("percent", "expected"), |
||||
[ |
||||
(20, [51, 0, 0, 0, 0, 110]), |
||||
(100, [0, 0, 0, 0, 0, 110]), |
||||
(0, [63, 192, 0, 0, 0, 110]), |
||||
], |
||||
) |
||||
def test_helligkeit_ist_invertiert(percent, expected): |
||||
assert encode_brightness(percent) == bytes(expected) |
||||
|
||||
|
||||
@pytest.mark.parametrize("percent", [-1, 101]) |
||||
def test_helligkeit_ausserhalb_bereich(percent): |
||||
with pytest.raises(ValueError): |
||||
encode_brightness(percent) |
||||
|
||||
|
||||
def test_ausrichtung_portrait(): |
||||
assert encode_orientation_portrait() == bytes([0, 0, 0, 0, 0, 121, 100, 1, 64, 1, 224, 0, 0, 0, 0, 0]) |
||||
|
||||
|
||||
@pytest.mark.parametrize( |
||||
("rgb", "expected"), |
||||
[ |
||||
((255, 255, 255), b"\xff\xff"), |
||||
((255, 0, 0), b"\x00\xf8"), |
||||
((0, 255, 0), b"\xe0\x07"), |
||||
((0, 0, 255), b"\x1f\x00"), |
||||
((0, 0, 0), b"\x00\x00"), |
||||
], |
||||
) |
||||
def test_rgb565_little_endian(rgb, expected): |
||||
assert to_rgb565le(Image.new("RGB", (1, 1), rgb)) == expected |
||||
|
||||
|
||||
def test_rgb565_zeilenweise_reihenfolge(): |
||||
img = Image.new("RGB", (2, 1)) |
||||
img.putpixel((0, 0), (255, 0, 0)) |
||||
img.putpixel((1, 0), (0, 0, 255)) |
||||
assert to_rgb565le(img) == b"\x00\xf8\x1f\x00" |
||||
|
||||
|
||||
def test_open_nutzt_serielle_parameter(): |
||||
lcd, created = make_lcd() |
||||
lcd.open() |
||||
s = created[0] |
||||
assert s.port == "/dev/test" |
||||
assert s.baudrate == 115200 |
||||
assert s.kwargs == {"timeout": 1, "rtscts": True, "write_timeout": 5, "exclusive": True} |
||||
|
||||
|
||||
def test_show_vollbild_header_und_datenmenge(): |
||||
lcd, created = make_lcd() |
||||
lcd.open() |
||||
lcd.show(Image.new("RGB", (WIDTH, HEIGHT)), 0, 0) |
||||
writes = created[0].writes |
||||
assert writes[0] == bytes([0, 0, 4, 253, 223, 197]) |
||||
data = b"".join(writes[1:]) |
||||
assert len(data) == WIDTH * HEIGHT * 2 |
||||
assert all(len(chunk) <= CHUNK_SIZE for chunk in writes[1:]) |
||||
assert len(writes) == 1 + (WIDTH * HEIGHT * 2) // CHUNK_SIZE |
||||
|
||||
|
||||
def test_show_ausschnitt(): |
||||
lcd, created = make_lcd() |
||||
lcd.open() |
||||
lcd.show(Image.new("RGB", (10, 5), (255, 255, 255)), 10, 20) |
||||
writes = created[0].writes |
||||
assert writes[0] == encode_header(197, 10, 20, 19, 24) |
||||
assert b"".join(writes[1:]) == b"\xff\xff" * 50 |
||||
|
||||
|
||||
@pytest.mark.parametrize(("x", "y", "size"), [(311, 0, (10, 10)), (0, 471, (10, 10)), (-1, 0, (5, 5))]) |
||||
def test_show_ausserhalb_display(x, y, size): |
||||
lcd, _ = make_lcd() |
||||
lcd.open() |
||||
with pytest.raises(ValueError): |
||||
lcd.show(Image.new("RGB", size), x, y) |
||||
|
||||
|
||||
def test_schreiben_ohne_verbindung_ist_oserror(): |
||||
lcd, _ = make_lcd() |
||||
with pytest.raises(OSError): |
||||
lcd.set_brightness(20) |
||||
|
||||
|
||||
def test_close_schliesst_und_ist_wiederholbar(): |
||||
lcd, created = make_lcd() |
||||
lcd.open() |
||||
lcd.close() |
||||
lcd.close() |
||||
assert created[0].closed |
||||
with pytest.raises(OSError): |
||||
lcd.set_orientation_portrait() |
||||
|
||||
|
||||
def test_befehle_landen_auf_der_schnittstelle(): |
||||
lcd, created = make_lcd() |
||||
lcd.open() |
||||
lcd.set_orientation_portrait() |
||||
lcd.set_brightness(20) |
||||
assert created[0].writes == [encode_orientation_portrait(), encode_brightness(20)] |
||||
@ -0,0 +1,160 @@ |
||||
import threading |
||||
import time |
||||
from datetime import datetime |
||||
|
||||
import pytest |
||||
from PIL import ImageChops |
||||
|
||||
from ramscreen.__main__ import run |
||||
from ramscreen.config import Config |
||||
from ramscreen.meminfo import App, Memory |
||||
from ramscreen.render import render, render_stopped |
||||
|
||||
GIB = 2**30 |
||||
MEM = Memory(total=16 * GIB, available=8 * GIB, swap_total=2 * GIB, swap_free=GIB) |
||||
APPS = [App("firefox", GIB)] |
||||
NOW = datetime(2026, 10, 14, 12, 0) |
||||
FAST = Config(memory_interval=0, apps_interval=10) |
||||
|
||||
|
||||
class FakeLcd: |
||||
def __init__(self, open_failures=0, show_failures=()): |
||||
self.calls = [] |
||||
self.shown = [] # (x, y, Bild) |
||||
self.open_failures = open_failures |
||||
self.show_failures = set(show_failures) |
||||
self._show_count = 0 |
||||
|
||||
def open(self): |
||||
self.calls.append("open") |
||||
if self.open_failures > 0: |
||||
self.open_failures -= 1 |
||||
raise OSError("kein Gerät") |
||||
|
||||
def close(self): |
||||
self.calls.append("close") |
||||
|
||||
def set_orientation_portrait(self): |
||||
self.calls.append("orientation") |
||||
|
||||
def set_brightness(self, percent): |
||||
self.calls.append(("brightness", percent)) |
||||
|
||||
def show(self, image, x, y): |
||||
index = self._show_count |
||||
self._show_count += 1 |
||||
if index in self.show_failures: |
||||
raise OSError("Schreibfehler") |
||||
self.calls.append("show") |
||||
self.shown.append((x, y, image)) |
||||
|
||||
|
||||
def stop_after(stop, iterations): |
||||
count = 0 |
||||
|
||||
def read_memory(): |
||||
nonlocal count |
||||
count += 1 |
||||
if count >= iterations: |
||||
stop.set() |
||||
return MEM |
||||
|
||||
return read_memory |
||||
|
||||
|
||||
def run_fake(lcd, iterations, cfg=FAST, **kwargs): |
||||
stop = threading.Event() |
||||
kwargs.setdefault("top_apps", lambda n: APPS) |
||||
run(cfg, lcd, stop, read_memory=stop_after(stop, iterations), now=lambda: NOW, |
||||
reconnect_delay=0, **kwargs) |
||||
|
||||
|
||||
def sizes(lcd): |
||||
return [(x, y, img.size) for x, y, img in lcd.shown] |
||||
|
||||
|
||||
def test_normaler_ablauf(): |
||||
lcd = FakeLcd() |
||||
run_fake(lcd, iterations=2) |
||||
assert lcd.calls[:3] == ["open", "orientation", ("brightness", 20)] |
||||
# 1. Durchlauf Vollbild, 2. Durchlauf unverändert → nichts, dann Endbildschirm als Vollbild |
||||
assert sizes(lcd) == [(0, 0, (320, 480)), (0, 0, (320, 480))] |
||||
assert lcd.calls[-1] == "close" |
||||
assert lcd.calls.count("open") == 1 |
||||
|
||||
|
||||
def test_schreibfehler_fuehrt_zu_neuverbindung_und_vollbild(): |
||||
lcd = FakeLcd(show_failures={0}) |
||||
run_fake(lcd, iterations=2) |
||||
assert lcd.calls.count("open") == 2 |
||||
assert lcd.calls[:6] == ["open", "orientation", ("brightness", 20), "close", "open", "orientation"] |
||||
assert sizes(lcd)[0] == (0, 0, (320, 480)) |
||||
|
||||
|
||||
def test_display_beim_start_nicht_da(): |
||||
lcd = FakeLcd(open_failures=2) |
||||
run_fake(lcd, iterations=1) |
||||
assert lcd.calls.count("open") == 3 |
||||
assert sizes(lcd)[0] == (0, 0, (320, 480)) |
||||
|
||||
|
||||
def test_stoppen_waehrend_wartezeit_beendet_sofort(): |
||||
lcd = FakeLcd(open_failures=10**6) |
||||
stop = threading.Event() |
||||
t = threading.Thread( |
||||
target=run, |
||||
args=(FAST, lcd, stop), |
||||
kwargs={"read_memory": lambda: MEM, "top_apps": lambda n: APPS, "now": lambda: NOW, "reconnect_delay": 5}, |
||||
) |
||||
t.start() |
||||
time.sleep(0.2) |
||||
stop.set() |
||||
t.join(timeout=2) |
||||
assert not t.is_alive() |
||||
assert "show" not in lcd.calls # nie verbunden → kein Endbildschirm |
||||
|
||||
|
||||
def test_programmliste_nur_im_eigenen_intervall(): |
||||
calls = [] |
||||
|
||||
def top_apps(n): |
||||
calls.append(n) |
||||
return APPS |
||||
|
||||
times = iter([0, 4, 8, 12, 16, 20]) |
||||
run_fake(FakeLcd(), iterations=6, top_apps=top_apps, monotonic=lambda: next(times)) |
||||
assert calls == [5, 5] # bei t=0 und t=12 |
||||
|
||||
|
||||
def test_drehung_um_180_grad(): |
||||
cfg = Config(memory_interval=0, rotate_180=True) |
||||
lcd = FakeLcd() |
||||
run_fake(lcd, iterations=1, cfg=cfg) |
||||
expected = render(MEM, APPS, NOW, cfg).rotate(180) |
||||
assert ImageChops.difference(lcd.shown[0][2], expected).getbbox() is None |
||||
|
||||
|
||||
def test_unerwarteter_fehler_zeigt_endbildschirm_statt_altem_stand(): |
||||
calls = 0 |
||||
|
||||
def top_apps(n): |
||||
nonlocal calls |
||||
calls += 1 |
||||
if calls == 2: |
||||
raise RuntimeError("unerwartet") |
||||
return APPS |
||||
|
||||
times = iter([0, 20]) |
||||
lcd = FakeLcd() |
||||
with pytest.raises(RuntimeError): |
||||
run_fake(lcd, iterations=10, top_apps=top_apps, monotonic=lambda: next(times)) |
||||
# erstes Bild live, danach Endbildschirm als Vollbild, dann geschlossen |
||||
assert sizes(lcd) == [(0, 0, (320, 480)), (0, 0, (320, 480))] |
||||
assert ImageChops.difference(lcd.shown[-1][2], render_stopped(NOW)).getbbox() is None |
||||
assert lcd.calls[-1] == "close" |
||||
|
||||
|
||||
def test_endbildschirm_fehler_wird_abgefangen(): |
||||
lcd = FakeLcd(show_failures={1}) # 0 = erstes Bild, 1 = Endbildschirm |
||||
run_fake(lcd, iterations=1) |
||||
assert lcd.calls[-1] == "close" |
||||
@ -0,0 +1,132 @@ |
||||
import os |
||||
from pathlib import Path |
||||
|
||||
import pytest |
||||
|
||||
from ramscreen.meminfo import App, Memory, level, parse_meminfo, read_memory, top_apps |
||||
|
||||
MEMINFO = """\ |
||||
MemTotal: 16000000 kB |
||||
MemFree: 400000 kB |
||||
MemAvailable: 1600000 kB |
||||
Buffers: 100000 kB |
||||
SwapTotal: 2000000 kB |
||||
SwapFree: 50000 kB |
||||
""" |
||||
|
||||
|
||||
def test_parse_meminfo(): |
||||
mem = parse_meminfo(MEMINFO) |
||||
assert mem == Memory( |
||||
total=16000000 * 1024, |
||||
available=1600000 * 1024, |
||||
swap_total=2000000 * 1024, |
||||
swap_free=50000 * 1024, |
||||
) |
||||
assert mem.used == (16000000 - 1600000) * 1024 |
||||
|
||||
|
||||
def test_read_memory_liest_datei(tmp_path: Path): |
||||
path = tmp_path / "meminfo" |
||||
path.write_text(MEMINFO) |
||||
assert read_memory(path).total == 16000000 * 1024 |
||||
|
||||
|
||||
def test_read_memory_echtes_system(): |
||||
mem = read_memory() |
||||
assert mem.total > 0 |
||||
assert 0 <= mem.available <= mem.total |
||||
|
||||
|
||||
@pytest.mark.parametrize( |
||||
("available", "expected"), |
||||
[(500, "ok"), (200, "ok"), (199, "knapp"), (100, "knapp"), (99, "kritisch"), (0, "kritisch")], |
||||
) |
||||
def test_level_grenzen(available, expected): |
||||
mem = Memory(total=1000, available=available, swap_total=0, swap_free=0) |
||||
assert level(mem, 20, 10) == expected |
||||
|
||||
|
||||
def make_proc(root: Path, pid, *, exe=None, comm="x", pss_kb=None, rss_kb=None, smaps_text=None): |
||||
d = root / str(pid) |
||||
d.mkdir() |
||||
if exe is not None: |
||||
os.symlink(exe, d / "exe") |
||||
if comm is not None: |
||||
(d / "comm").write_text(comm + "\n") |
||||
if smaps_text is not None: |
||||
(d / "smaps_rollup").write_text(smaps_text) |
||||
elif pss_kb is not None: |
||||
(d / "smaps_rollup").write_text( |
||||
f"00400000-7ffc0000 ---p 00000000 00:00 0 [rollup]\n" |
||||
f"Rss: {pss_kb + 10} kB\nPss: {pss_kb} kB\nPss_Anon: 1 kB\n" |
||||
) |
||||
status = f"Name:\t{comm}\n" |
||||
if rss_kb is not None: |
||||
status += f"VmRSS:\t{rss_kb} kB\n" |
||||
(d / "status").write_text(status) |
||||
|
||||
|
||||
def test_top_apps_fasst_prozesse_eines_programms_zusammen(tmp_path: Path): |
||||
make_proc(tmp_path, 1, exe="/usr/lib/firefox/firefox", comm="firefox", pss_kb=1000) |
||||
make_proc(tmp_path, 2, exe="/usr/lib/firefox/firefox", comm="Isolated Web Co", pss_kb=500) |
||||
make_proc(tmp_path, 3, exe="/usr/lib/virtualbox/VirtualBoxVM", comm="VirtualBoxVM", pss_kb=4000) |
||||
assert top_apps(5, tmp_path) == [App("VirtualBoxVM", 4000 * 1024), App("firefox", 1500 * 1024)] |
||||
|
||||
|
||||
def test_top_apps_begrenzt_anzahl(tmp_path: Path): |
||||
for pid, kb in enumerate([100, 400, 300, 200], start=1): |
||||
make_proc(tmp_path, pid, exe=f"/usr/bin/prog{pid}", pss_kb=kb) |
||||
assert [a.name for a in top_apps(2, tmp_path)] == ["prog2", "prog3"] |
||||
|
||||
|
||||
def test_top_apps_name_aus_comm_wenn_exe_fehlt(tmp_path: Path): |
||||
make_proc(tmp_path, 7, exe=None, comm="fremdprozess", pss_kb=300) |
||||
assert top_apps(5, tmp_path) == [App("fremdprozess", 300 * 1024)] |
||||
|
||||
|
||||
def test_top_apps_rss_wenn_smaps_fehlt(tmp_path: Path): |
||||
make_proc(tmp_path, 8, exe="/usr/bin/teamviewer", rss_kb=700) |
||||
assert top_apps(5, tmp_path) == [App("teamviewer", 700 * 1024)] |
||||
|
||||
|
||||
def test_top_apps_deleted_suffix_wird_entfernt(tmp_path: Path): |
||||
make_proc(tmp_path, 1, exe="/usr/lib/firefox/firefox (deleted)", pss_kb=600) |
||||
make_proc(tmp_path, 2, exe="/usr/lib/firefox/firefox", pss_kb=400) |
||||
assert top_apps(5, tmp_path) == [App("firefox", 1000 * 1024)] |
||||
|
||||
|
||||
def test_top_apps_versionsnummer_als_dateiname_nutzt_comm(tmp_path: Path): |
||||
# z. B. Claude-CLI: ~/.local/share/claude/versions/2.1.276 |
||||
make_proc(tmp_path, 1, exe="/home/u/.local/share/claude/versions/2.1.276", comm="claude", pss_kb=300) |
||||
make_proc(tmp_path, 2, exe="/opt/claude/claude", comm="claude", pss_kb=200) |
||||
assert top_apps(5, tmp_path) == [App("claude", 500 * 1024)] |
||||
|
||||
|
||||
def test_top_apps_abgeschnittenes_utf8_in_comm_und_status(tmp_path: Path): |
||||
# Der Kernel kürzt comm byteweise auf 15 Bytes – auch mitten in einem Umlaut |
||||
make_proc(tmp_path, 1, exe=None, comm=None, rss_kb=100) |
||||
(tmp_path / "1" / "comm").write_bytes(b"abcdefghijklmn\xc3\n") |
||||
(tmp_path / "1" / "status").write_bytes(b"Name:\tabcdefghijklmn\xc3\nVmRSS:\t100 kB\n") |
||||
apps = top_apps(5, tmp_path) |
||||
assert [a.size for a in apps] == [100 * 1024] |
||||
assert apps[0].name.startswith("abcdefghijklmn") |
||||
|
||||
|
||||
def test_top_apps_ueberspringt_kernel_threads_und_verschwundene(tmp_path: Path): |
||||
# Kernel-Thread: kein exe, leeres smaps_rollup, kein VmRSS |
||||
make_proc(tmp_path, 2, exe=None, comm="kworker/0:1", smaps_text="") |
||||
# verschwundener Prozess: Verzeichnis da, aber weder exe noch comm |
||||
make_proc(tmp_path, 3, exe=None, comm=None) |
||||
# nicht-numerische Einträge |
||||
(tmp_path / "self").mkdir() |
||||
(tmp_path / "meminfo").write_text(MEMINFO) |
||||
make_proc(tmp_path, 4, exe="/usr/bin/obsidian", pss_kb=200) |
||||
assert top_apps(5, tmp_path) == [App("obsidian", 200 * 1024)] |
||||
|
||||
|
||||
def test_top_apps_echtes_system(): |
||||
apps = top_apps(5) |
||||
assert 1 <= len(apps) <= 5 |
||||
assert all(a.size > 0 for a in apps) |
||||
assert apps == sorted(apps, key=lambda a: a.size, reverse=True) |
||||
@ -0,0 +1,81 @@ |
||||
from datetime import datetime |
||||
|
||||
import pytest |
||||
from PIL import Image, ImageChops |
||||
|
||||
from ramscreen.config import Config |
||||
from ramscreen.meminfo import App, Memory |
||||
from ramscreen.render import BG, DIM, STATE_COLORS, TRACK, _font, format_gib, render, render_stopped |
||||
|
||||
GIB = 2**30 |
||||
NOW = datetime(2026, 10, 14, 12, 34) |
||||
APPS = [App("VirtualBoxVM", int(4.3 * GIB)), App("firefox", int(1.4 * GIB)), App("msedge", int(1.2 * GIB))] |
||||
|
||||
|
||||
def mem(available_gib: float, swap_used_frac: float = 0.5, swap_total_gib: float = 2) -> Memory: |
||||
swap_total = int(swap_total_gib * GIB) |
||||
return Memory( |
||||
total=16 * GIB, |
||||
available=int(available_gib * GIB), |
||||
swap_total=swap_total, |
||||
swap_free=int(swap_total * (1 - swap_used_frac)), |
||||
) |
||||
|
||||
|
||||
STATES = {"ok": mem(8), "knapp": mem(2.4), "kritisch": mem(1)} |
||||
|
||||
|
||||
def test_format_gib(): |
||||
assert format_gib(int(12.94 * GIB)) == "12,9" |
||||
assert format_gib(0) == "0,0" |
||||
|
||||
|
||||
@pytest.mark.parametrize("state", ["ok", "knapp", "kritisch"]) |
||||
def test_render_groesse_und_balkenfarbe(state): |
||||
img = render(STATES[state], APPS, NOW, Config()) |
||||
assert img.size == (320, 480) |
||||
assert img.mode == "RGB" |
||||
assert img.getpixel((20, 205)) == STATE_COLORS[state] # im RAM-Balken |
||||
|
||||
|
||||
@pytest.mark.parametrize(("state", "framed"), [("ok", False), ("knapp", False), ("kritisch", True)]) |
||||
def test_roter_rahmen_nur_bei_kritisch(state, framed): |
||||
img = render(STATES[state], APPS, NOW, Config()) |
||||
expected = STATE_COLORS["kritisch"] if framed else BG |
||||
assert img.getpixel((1, 1)) == expected |
||||
assert img.getpixel((318, 478)) == expected |
||||
|
||||
|
||||
@pytest.mark.parametrize(("swap_free", "color"), [(500, DIM), (100, DIM), (99, STATE_COLORS["kritisch"])]) |
||||
def test_swap_balken_rot_ueber_90_prozent(swap_free, color): |
||||
# exakte Ganzzahlen: 100 von 1000 frei = genau 90 % belegt → noch grau |
||||
memory = Memory(total=16 * GIB, available=8 * GIB, swap_total=1000, swap_free=swap_free) |
||||
img = render(memory, APPS, NOW, Config()) |
||||
assert img.getpixel((20, 262)) == color |
||||
|
||||
|
||||
def test_ohne_swap_kein_absturz_und_leerer_balken(): |
||||
img = render(mem(8, swap_used_frac=0, swap_total_gib=0), APPS, NOW, Config()) |
||||
assert img.getpixel((20, 262)) == TRACK |
||||
|
||||
|
||||
def test_leere_programmliste(): |
||||
img = render(STATES["ok"], [], NOW, Config()) |
||||
assert img.size == (320, 480) |
||||
|
||||
|
||||
def test_schwellen_aus_config(): |
||||
cfg = Config(warn_free_percent=60, crit_free_percent=55) |
||||
img = render(mem(8), APPS, NOW, cfg) # 50 % frei → kritisch bei diesen Schwellen |
||||
assert img.getpixel((20, 205)) == STATE_COLORS["kritisch"] |
||||
|
||||
|
||||
def test_render_stopped(): |
||||
img = render_stopped(NOW) |
||||
assert img.size == (320, 480) |
||||
assert img.mode == "RGB" |
||||
assert ImageChops.difference(img, Image.new("RGB", img.size, BG)).getbbox() is not None |
||||
|
||||
|
||||
def test_font_fallback_bei_fehlender_datei(): |
||||
assert _font("/gibt/es/nicht.ttf", 20) is not None |
||||
@ -0,0 +1,242 @@ |
||||
version = 1 |
||||
revision = 3 |
||||
requires-python = ">=3.12" |
||||
|
||||
[[package]] |
||||
name = "colorama" |
||||
version = "0.4.6" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "iniconfig" |
||||
version = "2.3.1" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
sdist = { url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", size = 21209, upload-time = "2026-10-06T22:48:38.076Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", size = 7552, upload-time = "2026-10-06T22:48:36.959Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "numpy" |
||||
version = "2.5.4" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
sdist = { url = "https://files.pythonhosted.org/packages/95/b0/c7453d0b6e2073c3264468b106ee1563750cecc910965e67357e3698c83e/numpy-2.5.4.tar.gz", hash = "sha256:9a94cf751c9ad8ebaa835bcd3d40dacf8534ad086b88c38029b65123c7999d2a", size = 20866315, upload-time = "2026-10-10T20:05:31.422Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/d0/97/ba2074e92b7befea137e77ea8471e768bbd87c339b7e8c9f5a931949f977/numpy-2.5.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c6342f54c67093cae5c0227eb0eb772fdb79f2a2c37a6eb278b9909ee06aa356", size = 17001609, upload-time = "2026-10-10T20:02:40.843Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/ff/a9/bac826765e971d8e16e2064e9ac7525fd69b40ac17c905033a7f5442023f/numpy-2.5.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b11e8fda06a7d69f15ebf542660b74466c2e51094800c1fb794f47ad4faeef17", size = 12015718, upload-time = "2026-10-10T20:02:43.45Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/31/2f/5ea3570fcb8ccd0882bea99436a513b2c85dad8f774a2057849130a8fb99/numpy-2.5.4-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:9cb18a327b49c5c337f972b03682f6a49855525faaf3c0d3e9c96cd0fd8880a8", size = 5451717, upload-time = "2026-10-10T20:02:46.169Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/34/f2/b4fc1bafca03868220b5eaf729d2f21ebd7d7b151c0f9e144fe212bbca35/numpy-2.5.4-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:aec3fc4b32ff82421274f5d205c559c51c840c8df66a78efd7f3612dd005a26a", size = 6789926, upload-time = "2026-10-10T20:02:48.139Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/dc/96/8319e2457ae4333c62c815c7006b869a4f60985c1e01024c2f8c6c040fe5/numpy-2.5.4-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fe4d21ab149f15e4e6043dfb0de87e6e5f34ac176cde83060e9802981fca2ac2", size = 15695312, upload-time = "2026-10-10T20:02:50.115Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/43/a3/c799c62e19c337e6d3770b08e475887fb30ce8477d3c09efca6b2f0228a6/numpy-2.5.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fbde6962867ee75b48b0ee29b2b9372ec5d617799dbaf38e82dc0596f2f7738a", size = 16727283, upload-time = "2026-10-10T20:02:53.186Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/39/6b/3604e53fb00314d0dc1b94ec9125a1484f649c0a17480b1f0f0c7a9d6250/numpy-2.5.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:381a7a3d2e65e64c0ec302795ab9dc12bb1e73f150904699c153716177eebdaf", size = 17047890, upload-time = "2026-10-10T20:02:56.038Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/4a/7a/e8b58a5289a0d464c52885de47c35a935cdd70c03a4c3ab94a5126416dd0/numpy-2.5.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b89d0aaae2fe498c648f4c4795c084db535af5bd98ef942b2a3681fb74ce8645", size = 18485839, upload-time = "2026-10-10T20:02:59.018Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/6f/c9/47094f597015009f310b8c900def59065ef1ff5a6fe7b51fc65ec58ec2c6/numpy-2.5.4-cp312-cp312-win32.whl", hash = "sha256:9968ab7e49b93ac6e1c3b2239732183152c9150f16308d30b66a372cffe3483c", size = 6138936, upload-time = "2026-10-10T20:03:01.626Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/12/33/fefe62073dc8acfd0f2b9ed7c003af2f50aa61555e113e6db02b8f79f145/numpy-2.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:a7b1b6353e36a7e50de2973a38d705c88ee93adcf120673cee7f45a4a3fa223a", size = 12573091, upload-time = "2026-10-10T20:03:04.349Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/1a/07/161270b0c2eec56e4c905f6d6d22e1b836887b2cb189d3f5820aa588e9dd/numpy-2.5.4-cp312-cp312-win_arm64.whl", hash = "sha256:aa1cce2ff3f8d953de38b76bf44602caeb69f101430208f64a10067f7cb4b1d3", size = 10521630, upload-time = "2026-10-10T20:03:06.767Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/67/14/1c3ee0118a8fce08565a5d8482631608426a33af10a01077fada5dc7c119/numpy-2.5.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2377da2dd3ba2c1200956acbab2a358c83b8e1f8531191672d1cd6ad83250d53", size = 16997729, upload-time = "2026-10-10T20:03:09.291Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/83/8c/b0ea9477fb1f0d4484bbc5cba21678cc9969704d8d7f3f158d1db35f8e14/numpy-2.5.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7415db95818b39ec475a5eea54d9e3b6bc83e3912158e46da3438cdce399804d", size = 12009826, upload-time = "2026-10-10T20:03:11.946Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/e2/84/6a3d75b3ba3dfe84ac0053450753d1e6d250a8bf80f66474cc46d1fb643f/numpy-2.5.4-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:6d6a71b9d9a97c03633aa12565ef2825ffa036cc1d99cfd50dacf0f128af4fe2", size = 5445803, upload-time = "2026-10-10T20:03:14.329Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/61/18/bb993f267ca20b376e07092a16793a5b31ed3138751e9ba480011a14d742/numpy-2.5.4-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:d8200f16437b289a5bb927c6e184eccc3e8389bc0070fea4cd5b9e13c1757959", size = 6786220, upload-time = "2026-10-10T20:03:16.602Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/db/b6/135bb0953b61dc21c6cafa14b424ae666944e4899cf140e00c2b322a1a45/numpy-2.5.4-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1c2e71b04c6cad90026e544501bbe0ab9290fa8a4d845e7e8c0d124fb429c988", size = 15689178, upload-time = "2026-10-10T20:03:18.721Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/da/24/3bd070f3269dc609d8f26b2643f62ef91bb415841c0b294805aaf7fe06da/numpy-2.5.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6ffa07666f8da0eef81d149934a626d0d95fbd6838432a33e66245423a9062c0", size = 16718044, upload-time = "2026-10-10T20:03:21.386Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/c7/8e/9d15bd356b0a019c965312b1a3c6a727cac4cae5bc40045fbc12ce4cff9c/numpy-2.5.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2fa3328f784fc8277fc48026f6cad516f5c561c5d8e2e39b3c9e0c8f23223b34", size = 17048364, upload-time = "2026-10-10T20:03:24.468Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/dc/fe/9d5b560db964f15871885f2250795d15945f8699e17ef90c0c2ff4c875b2/numpy-2.5.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b86966fbe4ad7de710422175572bcdc75fdedadfb54bc6fab7deabccddd7780b", size = 18474904, upload-time = "2026-10-10T20:03:27.895Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/e9/98/d27552990f1bd611ef3e7466adadc78312ea2df63b83aad47fdc3d3ca8df/numpy-2.5.4-cp313-cp313-win32.whl", hash = "sha256:5258bc06526964be5face2fc6f756857a3f24f21ec3e72ca131337a75b165d6c", size = 6134537, upload-time = "2026-10-10T20:03:30.511Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/90/8c/140a40398a66b4471211be1affdb6ed24c486d581bd28d07b7f2fcb69540/numpy-2.5.4-cp313-cp313-win_amd64.whl", hash = "sha256:8b4d2fd2d34e5f8c9235ee787de5631a37a28402b15cb80814df973d2be54129", size = 12566113, upload-time = "2026-10-10T20:03:32.612Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/34/52/01d205e5e8ccb27b2b0b141e801f22b830198c979111b0fa44771438d9a9/numpy-2.5.4-cp313-cp313-win_arm64.whl", hash = "sha256:bc39ac66a7a9a3fbd6134fda43136b60ffde99c8f4501e64e0d2b24da137babf", size = 10519523, upload-time = "2026-10-10T20:03:35.163Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/99/ba/005cb5edd580d2f84d7ca3206b92dc17d4388e56e6f87ffe8f2762f83139/numpy-2.5.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:c668b2f0d651605b58892644b0e302c7157f7159544227758c896982ef384b18", size = 17005499, upload-time = "2026-10-10T20:03:37.961Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f3/49/fee7587c33ee35f7977f9051d7f2023d4e7246d62710c80f20c2361ea232/numpy-2.5.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ffa6ce09a1c6a08e9667dd9c97aa0b14184e8d18f2a14b78b2a2328c9147f076", size = 12019666, upload-time = "2026-10-10T20:03:40.606Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/d5/b2/c6ce165acffceb15a82c07b9cc77d391f86b3f379ba62911908ae5d34b91/numpy-2.5.4-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:956555e0603a4d38019ae6925711cb9dc43195c076a928accf7ea5d50bddfe53", size = 5455617, upload-time = "2026-10-10T20:03:43.138Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/77/7f/dd85ce260a669a89be06842cf355d7353a33e6cfbc590fb8ebb947d88dc9/numpy-2.5.4-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:2c2c4afffdeb7920e445028dd71eb932cac3e704792e964bc2a232426d4f1255", size = 6791932, upload-time = "2026-10-10T20:03:44.874Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/63/d6/34b0a2b0741386a63025a65a2c09caaaaaad6d0ca95b66cd65c30dd7fcb5/numpy-2.5.4-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4054173604cd8658796053f1f3bc0befb68ec1c0762c57fdad61e199256a8617", size = 15710899, upload-time = "2026-10-10T20:03:46.839Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/16/d5/928078d2b28f26829b138b4a6c3980045022fb409f570657a224ae60ef4e/numpy-2.5.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d549420b8858885cea8838a727842249218b9c1da24dd517e25c9c7a948310a3", size = 16721710, upload-time = "2026-10-10T20:03:49.489Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f9/cf/673fd1b8f4cd78eb6320e87ec4c90ac19c095644259e3749853a405c70f4/numpy-2.5.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:823874a507a84af050493b622affde94b6f7c3a0dc22cb2801381bc03b871c00", size = 17066182, upload-time = "2026-10-10T20:03:52.25Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f3/92/a77b5061b1b3e2643928c37976d79ee173e1b171ed158b7a3c61056b41bc/numpy-2.5.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:4e263278bfb5ee6409db8aedbc4cc32973b1b82bc1e8d3c668551d04d83a7e37", size = 18480315, upload-time = "2026-10-10T20:03:55.39Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/bb/1d/1486ef3d3fb2279fd93c4c43c1bbbf1ca389a19816696684409f71babaab/numpy-2.5.4-cp314-cp314-win32.whl", hash = "sha256:cfd73180400042a7c532d30c5e287bdd03c59ff9ee1b4c0316af0539e29dfe23", size = 6185739, upload-time = "2026-10-10T20:03:58.186Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/52/9a/e1e512ebc948d5b9dd33b08736760f0ebbed2848fd4eda1f553088a6dcee/numpy-2.5.4-cp314-cp314-win_amd64.whl", hash = "sha256:2ca144f15135b6212a5c47b1e2aeca6e412f102f95a2d5d88d8aec77eb255de3", size = 12703552, upload-time = "2026-10-10T20:04:00.28Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/2c/05/de709a982d7bbcd688a3fad71f002e9ff80c2db39e03ee726609b610f1d1/numpy-2.5.4-cp314-cp314-win_arm64.whl", hash = "sha256:468397ba3c64427474706e5c9123fe266395496714dc684294eac75cd4930d1e", size = 10803901, upload-time = "2026-10-10T20:04:02.659Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/13/34/083570ada3bb2a30fbe5d77c8c6fef9141144a15d33e6f793a67e9749ab8/numpy-2.5.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1ef3aa6d7e29bb13677323114280b05acc57607fa2300e66432d665d5418a162", size = 12138695, upload-time = "2026-10-10T20:04:05.012Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/94/06/1f9c24db48eef0c2d1207e3b11fffb0478e39dfd8c1e1be7476936885eed/numpy-2.5.4-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:98b053943e5a0474ec0da309d2cb9d3f18ea57f8a2067c2ab7b5f763d1068380", size = 5574615, upload-time = "2026-10-10T20:04:07.316Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/da/0f/593fba2e1560e949123bc7d2fc48b5893d56e58cd4bd5a273d2fbf60b220/numpy-2.5.4-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:b64a85f40e154983960a4167d4c1d57a50c7f109b3d3264a3a984154e90a8454", size = 6889383, upload-time = "2026-10-10T20:04:09.918Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/eb/9f/b799dfdce4e05e80ed4bc815c71ff343a11533b2c0ffc221cae8538cda63/numpy-2.5.4-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a813ed7719bf45463c51779e6a98d0385fe905e48447526938a4b8337333d551", size = 15753763, upload-time = "2026-10-10T20:04:12.278Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/34/88/16c5f12f86f5ad2817c4d103205131fc6c8acb3d1878af05a1a4f23ec859/numpy-2.5.4-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c9b80cdf5cedba0e90d93fa5f9a333c4d65bd545cd669b71bb97ce2b703c9d73", size = 16757212, upload-time = "2026-10-10T20:04:14.799Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/ff/4f/a1fe40e18a898e6a5089f4f0d891f0a493eb0574d5b34458f0fbe5aa3e5c/numpy-2.5.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2199ed071f460487c8db2c0e5c0b564494190edb4772fe80f9aad88b2604def5", size = 17116471, upload-time = "2026-10-10T20:04:17.58Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/aa/46/e923a11c78e65c1722e7aaad817c06bd591324174b9d28ce5d31eee4d432/numpy-2.5.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:64f9c9878c1938476365e11ccfb6b770f3b9e5f045ccddc514235041e6959365", size = 18524063, upload-time = "2026-10-10T20:04:20.365Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/5a/fa/84ab064514440c1f64a1b21088f2c82756defdd05e07c75ab233899565b2/numpy-2.5.4-cp314-cp314t-win32.whl", hash = "sha256:64d1c8ac28a4077cf987e0a71a7a0ef7e2df70722f07f0baa42dbb7eb6938647", size = 6340926, upload-time = "2026-10-10T20:04:22.865Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/7e/7e/6cd886876f435b10685db9b9f7eeb70356f99e052116f4e5f11c5792c714/numpy-2.5.4-cp314-cp314t-win_amd64.whl", hash = "sha256:067374eb538c34c745436365cf7b0112595c1d326f21ce4ff340f61230239fbb", size = 12901584, upload-time = "2026-10-10T20:04:24.99Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/38/1b/3c1684f6a06f7307f2335fca6e486cb162847fb97e91d65f8eb5cabad213/numpy-2.5.4-cp314-cp314t-win_arm64.whl", hash = "sha256:e94aef2c639da4a960ad0db8e06471208d8589974953d78b61d345b4eb99e394", size = 10891152, upload-time = "2026-10-10T20:04:27.52Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/08/f4/3224deff3af2bef6bc0b175369698d8cb348f3d91d9bb0286cd5c9eae9e0/numpy-2.5.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:8dddfbee2e68d26d0d7d7d9cb247b1fd4409241cce32d815a11d97ec2cfde179", size = 17003231, upload-time = "2026-10-10T20:04:30.021Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/be/75/fee0b8c6d94b44b2fdfae74f6a4ad5a138739589a8aebaec28ce4e713ed5/numpy-2.5.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:81e3420b27048b65eb14c3acf0c174a8cb0e023277716110347d2dcb26026dad", size = 12018300, upload-time = "2026-10-10T20:04:32.519Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/47/c0/d0b335a499a04b65f532c3f034346ef390f81299060f928492dabc1e0272/numpy-2.5.4-cp315-cp315-macosx_14_0_arm64.whl", hash = "sha256:0b4724a19de67bea8cfc4970798efa78bcbbe2ac2613cfac16721a42d44de2a5", size = 5454250, upload-time = "2026-10-10T20:04:34.943Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/5a/0e/461b3783c03d668052e6a21b01b673db6ffcb7831fd32d9aa5368c1cd426/numpy-2.5.4-cp315-cp315-macosx_14_0_x86_64.whl", hash = "sha256:2132418bf8dd124a427ca9e6a1daf9ee1a87185344c95119ceae868b99466da1", size = 6789644, upload-time = "2026-10-10T20:04:37.258Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/b3/02/5dad269b02166965a7b4ca14adaddd75dbee0de42435bfecf561b84ba5a6/numpy-2.5.4-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:325518d4245b9e331387702aa58c2ce1dc4cdcbb41dfb4ccd5dcbc7e08db1266", size = 15704353, upload-time = "2026-10-10T20:04:39.616Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/93/3a/01360c8036822ed9f7aa32189a77d1476567ec1e8e1383522389e4faac45/numpy-2.5.4-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:56733449d2544178beaa4545cee357370440cf056c197f9c7bfb19dbfdd0e86d", size = 16718648, upload-time = "2026-10-10T20:04:42.383Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/7d/5c/b863a2c093c4d6f21a597fcaf24ead0835c09ab16a8312d5a5a8868af683/numpy-2.5.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:5ec3753760c1a6d8bb91200666e545c3a9728e6269dfb5d6ce02340996698aa3", size = 17059053, upload-time = "2026-10-10T20:04:44.976Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/0a/60/ced4f57f9a1258a0af74f17cb0b0c2700b5c67cd6678823c803b263e4df3/numpy-2.5.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:b1185012870173de7ae33d370bd45b1cf5baee747ea4b97036b65f4e93016877", size = 18477406, upload-time = "2026-10-10T20:04:47.863Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f9/bd/0ef22dafaafcc7d4bb3ca26b8d2afbd55dedad8eaba99a8c864e1997456f/numpy-2.5.4-cp315-cp315-win32.whl", hash = "sha256:298eca75243f2cbbfdb460560b9fb2a1792a33cf2ab4286efd43d92e8d3df508", size = 6185133, upload-time = "2026-10-10T20:04:50.467Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/50/bc/d2651b155ecc608a77e6f4d15495c11f14f19bb98f8bf0c5b0d38f86dda1/numpy-2.5.4-cp315-cp315-win_amd64.whl", hash = "sha256:332f3378fe077dd850e677ec01bdcc4f22368fb5d50ef10b2c79230b1bf5a592", size = 12703085, upload-time = "2026-10-10T20:04:52.63Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/dc/d2/45e404f8abb26fb9eda12b94012936873e827b1be76f2ee7890be128312e/numpy-2.5.4-cp315-cp315-win_arm64.whl", hash = "sha256:d4cccbbc78717966f764cd3af4fb70276fa01fc7a2688af11c78901fa5c04f05", size = 10801451, upload-time = "2026-10-10T20:04:55.677Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/c6/c3/2ae14e09cfdb67dc187a342e15308a21c15bf4d2071f8079e6aee5fe56dc/numpy-2.5.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:950ea81d57ef070665581b6e1b5f6a029306423cd1739c5b95fe78aa30db6b9d", size = 17097121, upload-time = "2026-10-10T20:04:58.403Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f5/cf/305ae624ef8a039414317224abe9ec9c2fe7ea3c2e1cf204d43ff6b2ffb9/numpy-2.5.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:c05ede731b03fb1b7591faca9389ade3267d2bddf1ad8882bb3f2cc5e101694f", size = 12135439, upload-time = "2026-10-10T20:05:01.65Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/a9/a8/f75c63813aef95827bb2c0d13b12803016853056e8792c280058cdbfe783/numpy-2.5.4-cp315-cp315t-macosx_14_0_arm64.whl", hash = "sha256:5fbf7141bbfd63aea22f435c9062a032b9ea0082fe9845dad7f021d3f1234e71", size = 5571451, upload-time = "2026-10-10T20:05:04.135Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/6f/0f/f17763f983868b5c49b4101ebd7e00760bd1769478a6bb6a8de6e085bbac/numpy-2.5.4-cp315-cp315t-macosx_14_0_x86_64.whl", hash = "sha256:3573cd22564692a5b899ec344e5d5b9cc4576f2985b96f22af3564ed54f2710f", size = 6883356, upload-time = "2026-10-10T20:05:06.249Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/67/a7/8af04c5a79e047996cfa38854dcfbececdd0343a7c933a46fdd03ef6f5da/numpy-2.5.4-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6c109eac9cd439193678f69d70733c1108487546ca8eafc107b510ae10c1aecd", size = 15750991, upload-time = "2026-10-10T20:05:08.376Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/57/7a/648254290d0c504faa8f2d07aa206660c728802c781a6f3fc68ab7cb5d71/numpy-2.5.4-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:80d6ef6e8620eb2c2b4c4caad50b5935d6db3cde2d51581b55dcc79e14016d1d", size = 16757675, upload-time = "2026-10-10T20:05:11.393Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/b8/fe/4a8c3cdb0c70400cfe4c5bec42d3099a5673802a95064614b33e07b82aa1/numpy-2.5.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:77045a4b175bbf5316ec08003880804336c78f92281a1b72222b274ea85ec5ac", size = 17113846, upload-time = "2026-10-10T20:05:14.49Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/1b/7e/619692bb67778702c0e9eb2d468568a7573f4e269386ea61aed01ee4e557/numpy-2.5.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:0f02a46e49cfb6c73bdb7aea1c0d3461dbae9aba613542b65f657cd3d17b9fab", size = 18522915, upload-time = "2026-10-10T20:05:17.33Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/b7/b5/4da41c328788f575838f97a098fe8ca691ebc6f6fd73ad4a262ee40b184d/numpy-2.5.4-cp315-cp315t-win32.whl", hash = "sha256:ad62a416ddcf863bf44bba76fbf6b53366ab0692e294f51cae4b5fbe0d246788", size = 6335804, upload-time = "2026-10-10T20:05:19.921Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/98/94/6482ddfa3d312490cb9358f375bf2ad56427dbea8769187158e94d653753/numpy-2.5.4-cp315-cp315t-win_amd64.whl", hash = "sha256:38f47be9f74ab870d2633b5456ae519c43758a8d1fd05342f0ce4ecc034396ee", size = 12890095, upload-time = "2026-10-10T20:05:21.875Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/48/7f/c2d1b436b6e7cfebac140c2579a298344b85f2991a2ce5c3615cefb29400/numpy-2.5.4-cp315-cp315t-win_arm64.whl", hash = "sha256:7a14a461d9340f1b46b8648578aed9cdb8b3b018a8fac6c1dde2c9192a01a87f", size = 10883718, upload-time = "2026-10-10T20:05:28.547Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "packaging" |
||||
version = "26.3" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "pillow" |
||||
version = "12.3.0" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035, upload-time = "2026-07-01T11:56:38.965Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/37/bf/fb3ebff8ddcb76aac5a01389251bbbb9519922a9b520d8247c1ca864a25d/pillow-12.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ba09209fbe443b4acccebe845d8a138b89a8f4fbaeedd44953490b5315d5e965", size = 5345969, upload-time = "2026-07-01T11:54:06.397Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/d8/66/9a386a92561f402389a4fc70c18838bf6d35eb5eb5c6850b4b2dc64f5048/pillow-12.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffd0c5368496f41b0944be820fcb7a838aa6e623d250b01acf2643939c3f99d7", size = 4780323, upload-time = "2026-07-01T11:54:09.351Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/25/27/ac8f99618ffd3dde21db0f4d4b1d2ab00c0880595bfd17df103f7f39fd0c/pillow-12.3.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d9c7f76c0673154f044e9d78c8655fb4213f6ca31a836df48b40fe5d187717b9", size = 6266838, upload-time = "2026-07-01T11:54:11.71Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/84/21/a35af28dcc61f37ed850a2d64c65c701321dfbf25085e469d5559360cbbf/pillow-12.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91", size = 6940830, upload-time = "2026-07-01T11:54:13.732Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/eb/51/8b08617af3ad95e33ce6d7dd2c99ed6c8298f7fb131636303956be022e25/pillow-12.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e491916b378fba47242221bb9ead245211b70d504f495d105d17b14a24b4907c", size = 6344383, upload-time = "2026-07-01T11:54:15.756Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/1d/72/cf78ac9780bb93c28328f408973845a309d4d145041665f734572ced1b52/pillow-12.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0dd2064cbc55aaec028ef5fbb60fa47bb6c3e7918e07ff17935284b227a9d2df", size = 7052934, upload-time = "2026-07-01T11:54:17.721Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/20/20/25e0f4dc178a6bc0696793720055519a0de89e7661dae886992decbd2f81/pillow-12.3.0-cp312-cp312-win32.whl", hash = "sha256:dbce0b29841537a2fa4a214c2bbf14de3587c9680caa9b4e217568472490b28f", size = 6472684, upload-time = "2026-07-01T11:54:19.839Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/45/89/da2f7971a317f83d807fdd4065c0af40208e59e692cc43d315a71a0e96d1/pillow-12.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:a2b55dd6b2a4c4b7d87ffa56bdb33fdc5fdb9a462173861a7bc097f17d91cb09", size = 7227137, upload-time = "2026-07-01T11:54:22.025Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/de/47/4845a0a6c0dbf1db8456bd9fc791f13c5ced7ced20606d08a0aacfd25b49/pillow-12.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:331b624368d4f1d069149002f25f44bc61c8919ce8ddb3c45bdad8f6e2d89510", size = 2568267, upload-time = "2026-07-01T11:54:24.051Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/9d/ac/31fb64e1e7efb5a4b50cd3d92049ba89ac6e4d8d3bb6a74e15048ca3353e/pillow-12.3.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:21900ce7ba264168cd50defae43cd75d25c833ad4ad6e73ffc5596d12e25ac89", size = 4161684, upload-time = "2026-07-01T11:54:25.934Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/87/b4/9805e23d2b4d77842b468513841fda254ee42f0289d25088340e4ff46e2d/pillow-12.3.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4e8c2a84d977f50b9daed6eeaf3baef67d00d5d74d932288f02cb94518ee3ace", size = 4255487, upload-time = "2026-07-01T11:54:27.935Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/df/39/ecf519435a200c693fe053a6ee4d835b41cf963a4dfc2551c4e637cb2a71/pillow-12.3.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:ae26d61dfa7a47befdc7572b521024e8745f3d809bd95ca9505a7bba9ef849ec", size = 3696433, upload-time = "2026-07-01T11:54:29.813Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/42/92/2fc3ffad878ae8dd5469ec1bc8eb83b71f48e13efdf68f02709003982a32/pillow-12.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7a743ff716f746fc19a9557f60dab1600d4613255f8a7aeb3cdde4db7eb15a66", size = 5345889, upload-time = "2026-07-01T11:54:31.97Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/10/76/8803c13605b763d33d156c4678fc77f8443389c0c51c8aef707bb02015f4/pillow-12.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d69141514cc30b774ceea5e3ed3a6635c8d8a96edf664689b890f4089111fb35", size = 4780109, upload-time = "2026-07-01T11:54:34.026Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/1f/01/e18aff37cb0b4aac47ac90f016d347a49aca667ef97f190b06ac2aabc928/pillow-12.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f7401aebd7f581d7f83a439d87d474999317ee099218e5ad25d125290990ba65", size = 6263736, upload-time = "2026-07-01T11:54:36.131Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f7/62/de5bdd77d935331f4f802edc11e4d82950f642caad6cb2f949837b8560e2/pillow-12.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0847a763afefb695bc912d7c131e7e0632d4edc1d8698f58ddabec8e46b8b6d3", size = 6937129, upload-time = "2026-07-01T11:54:38.216Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/70/4d/105627a13300c5e0df1d174230b32fd1273062c96f7745fd552b945d1e1d/pillow-12.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:571b9fcb07b97ef3a492028fb3d2dc0993ca23a06138b0315286566d29ef718a", size = 6339562, upload-time = "2026-07-01T11:54:40.354Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/6b/1d/f13de01a553988ab895ba1c722e06cf3144d4f57656fd5b81b6d881f1179/pillow-12.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:756c768d0c9c2955feb7a56c37ea24aea2e369f8d36a88da270b6a9f19e62b5e", size = 7049439, upload-time = "2026-07-01T11:54:42.489Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/c9/f9/066794cca041b969964f779ee5fa66a9498bbf34248ac39c5d7954e4198f/pillow-12.3.0-cp313-cp313-win32.whl", hash = "sha256:a876864214e136f0eb367788dbd7df045f4806801518e2cfe9e13229cfe06d8f", size = 6473287, upload-time = "2026-07-01T11:54:44.9Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/a6/9b/7a58e61d62be561da3a356fe2384d4059a6345fc130e23ef1c36a5b81d24/pillow-12.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:1cca606cd25738df4ed873d5ad46bbdb3d83b5cbca291f6b4ff13a4df6b0bbe8", size = 7239691, upload-time = "2026-07-01T11:54:47.141Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/aa/b0/c4ed4f0ef8f8fa5ee8351537db6650bb8189f7e118842978dd6589065692/pillow-12.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:b629de27fda84b42cde7edef0d85f13b958b47f6e9bbcbba9b673c562a89bd8b", size = 2568185, upload-time = "2026-07-01T11:54:49.137Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/dc/01/001f65b68192f0228cc1dbbc8d2530ab5d58b61037ba0587f946fea607cd/pillow-12.3.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:9cf95fe4d0f84c82d282745d9bb08ad9f926efa00be4697e767b814ce40d4330", size = 4161736, upload-time = "2026-07-01T11:54:51.156Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/1a/d2/0219746d0fd16fc8a84498e79452375be3797d3ce4044596ce565164b84f/pillow-12.3.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:8728f216dcdb6e6d555cf971cb34076139ad74b31fc2c14da4fafc741c5f6217", size = 4255435, upload-time = "2026-07-01T11:54:53.414Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/c8/02/8d0bc62ef0302318c46ff2a512822d2610e81c7aa46c9b3abe6cbaca5ad0/pillow-12.3.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:a45650e8ce7fafffd731db8550230db6b0d306d181a90b67d3e6bca2f1990930", size = 3696262, upload-time = "2026-07-01T11:54:55.739Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/85/e2/73c77d218410b14f5f2d565e8a998d5317b7b9c75368d29985139f7a46f0/pillow-12.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ba54cfebe86920a559a7c4d6b9050791c20513650a1952ebe3368c7dc70306f8", size = 5350344, upload-time = "2026-07-01T11:54:57.657Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/c7/da/32c752228ae345f489e3a42499d817b6c3996da7e8a3bc7a04fc806b243b/pillow-12.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e158cb00350dc278f3b91551101aa7d12415a66ebf2c91d8d5ac14e56ddd3ad0", size = 4780131, upload-time = "2026-07-01T11:54:59.713Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/b1/9d/8b2c807dbef61a5197c047afe99823787eb66f63daf9fb2432f91d6f0462/pillow-12.3.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9aeb04d6aef139de265b29683e119b638208f88cf73cdd1658aa07221165321", size = 6263757, upload-time = "2026-07-01T11:55:01.778Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/5c/44/c85361f65dbe00eea8576ee467c768d25129989efb76e94f205e9ca9bb46/pillow-12.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:251bf95b67017e27b13d82f5b326234ca62d70f9cf4c2b9032de2358a3b12c7b", size = 6936962, upload-time = "2026-07-01T11:55:03.93Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/18/7e/e483414b35800b86b6f08dbbc7803fb5cd52c4d6f897f47d53ea2c7e6f65/pillow-12.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fe3cca2e4e8a592be0f269a1ca4835c25199d9f3ce815c8491048f785b0a0198", size = 6339171, upload-time = "2026-07-01T11:55:05.989Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f0/f4/68c491844841ede6bed70189546b3ee9731cf9f2cbad396faff5e1ccba45/pillow-12.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:23aceaa007d6172b02c277f0cd359c79492bbb14f7072b4ede9fbcaf20648130", size = 7048116, upload-time = "2026-07-01T11:55:08.131Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/a3/34/77f3f793fed8efc7d243f21b33c5a3f0d1c97ee70346d3db855587e155ff/pillow-12.3.0-cp314-cp314-win32.whl", hash = "sha256:af8d94b0db561cf68b88a267c5c44b49e134f525d0dc2cb7ed413a66bc23559a", size = 6467209, upload-time = "2026-07-01T11:55:10.408Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f1/e0/492879f69d94f91f60fc8cd05ba03650e9520afebb2fb7aa12777d7c7f38/pillow-12.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:fdafc9cce40277e0f7a0feabce0ee50dd2fa1800f3b38015e51296b5e814048d", size = 7237707, upload-time = "2026-07-01T11:55:12.745Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/c9/ac/6b11f2875f1c2ac040d84e1bbf9cf22a88038f901ca1037898b280b38365/pillow-12.3.0-cp314-cp314-win_arm64.whl", hash = "sha256:e91206ee562682b51b98ef4b26a6ef48fd84e15fd4c4bc5ec768eb641d206838", size = 2565995, upload-time = "2026-07-01T11:55:14.736Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/52/69/c2208e56af9bfc1913afb24020297a691eb1d4ef688474c8a04913f65e04/pillow-12.3.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:164b31cd1a0490ab6efae01aa5df49da7061be0af1b30e035b6e9a1bfe34ee6e", size = 5352503, upload-time = "2026-07-01T11:55:17.076Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/07/70/e5686d753e898a45d778ff1718dba8516ead6ab6b95d85fc8c4b70650cf2/pillow-12.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5afb51d599ea772b8365ae807ae557f18bccfe46ab261fd1c2a9ed700fc6eb17", size = 4782956, upload-time = "2026-07-01T11:55:19.448Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/d5/37/25c6692f06927ee973ff18c8d9ee98ad0b4d84ee67a09610c2dd1447958e/pillow-12.3.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3edce1d53195db527e0191f84b71d02022de0540bf43a16ed734ed7537b07385", size = 6322855, upload-time = "2026-07-01T11:55:21.613Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/cc/91/420637fcb8f1bc11029e403b4538e6694744428d8246118e45719f944556/pillow-12.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bf16ba1b4d0b6b7c8e534936632270cf70eb00dbe09005bc345b2677b726855c", size = 6989642, upload-time = "2026-07-01T11:55:24.006Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/10/08/b94d7811281ccf0d143a1cf768d1c49e1e54af63e7b708ab2ee3eb87face/pillow-12.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:24870b09b224f7ae3c39ed07d10e819d06f8720bc551847b1d623832b5b0e28d", size = 6391281, upload-time = "2026-07-01T11:55:26.252Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/d2/87/24233f785f55474dc02ce3e739c5528a77e3a862e9333d1dd7a25cc31f70/pillow-12.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:30f2aa603c41533cc25c05acd0da21636e84a315768feb631c937177db558931", size = 7096716, upload-time = "2026-07-01T11:55:28.318Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/23/26/fcb2f6e37175b04f53570b59937867e2b80ee1685e744023153028fc14f9/pillow-12.3.0-cp314-cp314t-win32.whl", hash = "sha256:4b0a7fe987b14c31ebda6083f74f22b561fd3739bc0ac51e019622e3d72668c7", size = 6474125, upload-time = "2026-07-01T11:55:30.956Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/90/de/3634abee5f1c9e13c56787b7d5517b0ba8d6de51700b95578cf338349c9f/pillow-12.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:962864dc93511324d51ddbb5b9f8731bf71675b93ca612a07441896f4688fb8c", size = 7242939, upload-time = "2026-07-01T11:55:34.044Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/ce/2a/fd13f8eb24de5714a6eb444a3d67e2842c6c576e159a43793adf23051351/pillow-12.3.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0740a512dc522224c77d9aa5a8d70d8b7d73fb91f2c21125d8d025d3b8990e45", size = 2567506, upload-time = "2026-07-01T11:55:35.988Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/5d/dc/8fdce34ec725a33c81c6ba122b904d6b9024e50ea9ac7bede62fab54506c/pillow-12.3.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:0feb2e9d6ad6c9e3c06effe9d00f3f1e618a6643273576b016f591e9315a7139", size = 4162063, upload-time = "2026-07-01T11:55:37.941Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/76/66/2044b9a63d3b84ff048228dfcb7cd9bf0df983e8470971bf7d4c57b693de/pillow-12.3.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:9e881fca225083806662a5c43d627d215f258ff43c890f831966c7d7ba9c7402", size = 4255549, upload-time = "2026-07-01T11:55:40.022Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/52/7e/1f67e6f4ece6b582ee4b539decbcc9f848dc245a93ed8cd7338bafef72f1/pillow-12.3.0-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:4998562bf62a445225f22e07c896bb04b35b1b1f2eb6d760584c9c51d7a5f78c", size = 3696331, upload-time = "2026-07-01T11:55:41.98Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/12/40/d306fc2c8e4d45d7f175c77edca7063be7b86fe7fe6e68f4353bf71d808c/pillow-12.3.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:dc624f6bc473dacdf7ef7eb8678d0d08edf15cd94fad6ae5c7d6cc67a4e4902f", size = 5350370, upload-time = "2026-07-01T11:55:44.028Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/dd/44/668fb1437e8ce420f62d6106eb66e44a5971602a4d794615bdf79315d82d/pillow-12.3.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:71d6097b330eea8fd15097780c8e89cb1a8ce7838669f48c5bacd6f663dd4701", size = 4780147, upload-time = "2026-07-01T11:55:46.073Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/0c/08/93fa2e70e30a2d81547e481b6ee2bb9522117221fb1e0ce4b5df70967677/pillow-12.3.0-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:28ce87c5ab450a9dd970b52e5aca5fe63ed432d18a2eaddd1979a00a1ba24ace", size = 6273659, upload-time = "2026-07-01T11:55:48.264Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/f8/6d/043e96ff814fc31a33077e4cba86082167db520c93632afdf2042febbb0c/pillow-12.3.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6b02afb9b97f65fbca5f31db6a2a3ba21aa93030225f150fa3f249717e938fb4", size = 6947439, upload-time = "2026-07-01T11:55:50.503Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/af/92/ba71d2ee2ac0edf3fa33bd9d5ee9ee080da70b1766f3ca3934f9938ddac9/pillow-12.3.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:1182d52bc2d5e5d7d0949503aa7e36d12f42205dc287e4883f407b1988820d39", size = 6353577, upload-time = "2026-07-01T11:55:52.697Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/0f/ce/e63064e2122923ff687c8ad792d0d736a7b3920a56a46982e81a7fdd25d6/pillow-12.3.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:e795b7eb908249c4e43c7c99fac7c2c75dab0c43566e37db472a355f63693d71", size = 7060394, upload-time = "2026-07-01T11:55:55.149Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/54/76/a09cc3ccc8d773a7283d34c38bec1708f9e3cc932093cbc4c5e71ac4060b/pillow-12.3.0-cp315-cp315-win32.whl", hash = "sha256:57b3d78c95ba9059768b10e28b813002261d3f3dfc55cc48b0c988f625175827", size = 6467375, upload-time = "2026-07-01T11:55:57.769Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/3e/03/1846c49ba3b1d5550392a4bbd06d6fb4578e1cd91a803198b5c90f5f7d53/pillow-12.3.0-cp315-cp315-win_amd64.whl", hash = "sha256:fa4ecea169a355be7a3ade2c783e2ed12f0e40d2c5621cda8b3297faf7fbb9f5", size = 7237048, upload-time = "2026-07-01T11:55:59.975Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/fb/bb/89f35dcc79610423f9f195504d7def7f0d1416a711541b42867e25fe3412/pillow-12.3.0-cp315-cp315-win_arm64.whl", hash = "sha256:877c3f311ff35410f690861c4409e7ccbf0cd2f878e50628a28e5a0bb689e658", size = 2566006, upload-time = "2026-07-01T11:56:02.143Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/30/88/707027ba09942dfa2c28759b5c222d769290a41c6d20ea60ec250801941f/pillow-12.3.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:e9871b1ffbfa9656b60aeee92ed5136a5742696006fa322b29ea3d8da0ecc9cf", size = 5352509, upload-time = "2026-07-01T11:56:04.2Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/b0/6d/00352fa25332c2569cd387851f568cc5a4b75a9adbfb37ac4fbce4c02eec/pillow-12.3.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:53aa02d20d10c3d814d536aa4e5ac9b84ca0ff5a88377963b085ad6822f93e64", size = 4783167, upload-time = "2026-07-01T11:56:06.631Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/13/4f/9e049dfa21af7c22427275720e2490267ba8138120add5c4c574deb69782/pillow-12.3.0-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:446c34dcc4324b084a53b705127dc15717b22c5e140ae0a3c38349d4efec071e", size = 6329237, upload-time = "2026-07-01T11:56:08.868Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/36/16/cf6eeaae8d0fce8dd390a33437cf68c5d5bd73834a2bc6e2f14efda0ab45/pillow-12.3.0-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cf1845d02ad822a369a49f2bb9345b1614744267682e7a03527dc3bf6eea1777", size = 6997047, upload-time = "2026-07-01T11:56:11.379Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/1e/69/dbf769bdd55f48bf5733cac28edc6364ffaa072ec9ba336266e4fe66be55/pillow-12.3.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:186941b6aef820ad110fb01fb06eb925374dc3a21b17e37ec9a53b250c6fe2d1", size = 6400440, upload-time = "2026-07-01T11:56:13.908Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/a0/e1/ffc9cfc2eea0d178da8018e18e959301ad9d6bc9f3edb7181e748a474b97/pillow-12.3.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:f13c32a3abd6079a66d9526e18dad9b6d280384d49d7c54040cd57b6424041d9", size = 7105895, upload-time = "2026-07-01T11:56:16.575Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/18/f0/a5595c1e8c3ae44b9828cb2f0fa8155e5095ef04d6327b8f61cf44a3df85/pillow-12.3.0-cp315-cp315t-win32.whl", hash = "sha256:1657923d2d45afb66526e5b933e5b3052e6bdea196c90d3abb2424e18c77dae8", size = 6474384, upload-time = "2026-07-01T11:56:18.855Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/e4/04/62bcd9f844984c5938d3b05264a61d797a29d3e0812341a8204af70bbdee/pillow-12.3.0-cp315-cp315t-win_amd64.whl", hash = "sha256:8cd2f7bdda092d99c9fc2fb7391354f306d01443d22785d0cbfafa2e2c8bb418", size = 7243537, upload-time = "2026-07-01T11:56:21.214Z" }, |
||||
{ url = "https://files.pythonhosted.org/packages/3d/68/1f3066acedf37673694a7141381d8f811ae97f30d34413d236abe7d489f1/pillow-12.3.0-cp315-cp315t-win_arm64.whl", hash = "sha256:06ff022112bc9cbf83b60f8e028d94ad87b60621706487e65f673de61610ab59", size = 2567491, upload-time = "2026-07-01T11:56:23.506Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "pluggy" |
||||
version = "1.6.0" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "pygments" |
||||
version = "2.21.0" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "pyserial" |
||||
version = "3.5" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
sdist = { url = "https://files.pythonhosted.org/packages/1e/7d/ae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082/pyserial-3.5.tar.gz", hash = "sha256:3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb", size = 159125, upload-time = "2020-11-23T03:59:15.045Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/07/bc/587a445451b253b285629263eb51c2d8e9bcea4fc97826266d186f96f558/pyserial-3.5-py2.py3-none-any.whl", hash = "sha256:c4451db6ba391ca6ca299fb3ec7bae67a5c55dde170964c7a14ceefec02f2cf0", size = 90585, upload-time = "2020-11-23T03:59:13.41Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "pytest" |
||||
version = "9.1.1" |
||||
source = { registry = "https://pypi.org/simple" } |
||||
dependencies = [ |
||||
{ name = "colorama", marker = "sys_platform == 'win32'" }, |
||||
{ name = "iniconfig" }, |
||||
{ name = "packaging" }, |
||||
{ name = "pluggy" }, |
||||
{ name = "pygments" }, |
||||
] |
||||
sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } |
||||
wheels = [ |
||||
{ url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, |
||||
] |
||||
|
||||
[[package]] |
||||
name = "ramscreen" |
||||
version = "0.1.0" |
||||
source = { editable = "." } |
||||
dependencies = [ |
||||
{ name = "numpy" }, |
||||
{ name = "pillow" }, |
||||
{ name = "pyserial" }, |
||||
] |
||||
|
||||
[package.dev-dependencies] |
||||
dev = [ |
||||
{ name = "pytest" }, |
||||
] |
||||
|
||||
[package.metadata] |
||||
requires-dist = [ |
||||
{ name = "numpy", specifier = ">=1.26" }, |
||||
{ name = "pillow", specifier = ">=10.1" }, |
||||
{ name = "pyserial", specifier = ">=3.5" }, |
||||
] |
||||
|
||||
[package.metadata.requires-dev] |
||||
dev = [{ name = "pytest", specifier = ">=8" }] |
||||
Loading…
Reference in new issue