From 15f833eb3a132326ad6343f1611122f30a906346 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sat, 9 Aug 2025 18:31:52 +0100 Subject: [PATCH 01/15] Setting light levels now supports multiple lights in one request --- labmap/views.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/labmap/views.py b/labmap/views.py index 41a1257..d871eaa 100644 --- a/labmap/views.py +++ b/labmap/views.py @@ -24,15 +24,12 @@ def lights(req: HttpRequest) -> HttpResponse: @csrf_exempt def set_lights(req: HttpRequest, ids: str, val: int) -> JsonResponse: mqtt = labmap.mqtt.client() - lights = ids.split(",") - for light in lights: - try: - light_id = int(light) - assert light_id < 18 - mqtt.publish(f"dali/g1/set/{light_id}", payload=val) - except Exception as e: - print(e) - continue + try: + lights = ",".join([str(int(light)) for light in ids.split(",")]) + mqtt.publish(f"dali/g1/set/{lights}", payload=val) + except Exception as e: + print(e) + return JsonResponse({"msg": "invalid light ids"}) return JsonResponse({}) From 99efe4acbd8120bac93ed50161a86cfb3c5e7149 Mon Sep 17 00:00:00 2001 From: Aria Date: Fri, 8 Aug 2025 22:26:59 +0100 Subject: [PATCH 02/15] Update lasercutter1 name --- templates/map.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/map.html b/templates/map.html index 2a491cb..48cff1f 100644 --- a/templates/map.html +++ b/templates/map.html @@ -19,25 +19,25 @@ + transform="translate(268.39243,123.95924)"> lasercutter + x="-267.40039" + y="199.73814">lasercutter1 Date: Fri, 14 Nov 2025 18:55:01 +0000 Subject: [PATCH 03/15] Support other screens, with their own button groups --- labdash/migrations/0016_buttongroup_screen.py | 18 +++++++++++++++++ labdash/models.py | 1 + labdash/urls.py | 3 ++- labdash/views.py | 20 +++++++++++++++++-- static/js/control.js | 15 ++++++++++++++ templates/labdash/buttongroup_list.html | 1 + 6 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 labdash/migrations/0016_buttongroup_screen.py diff --git a/labdash/migrations/0016_buttongroup_screen.py b/labdash/migrations/0016_buttongroup_screen.py new file mode 100644 index 0000000..8c3a579 --- /dev/null +++ b/labdash/migrations/0016_buttongroup_screen.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1 on 2025-11-14 18:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('labdash', '0015_add_buttongroup_hide'), + ] + + operations = [ + migrations.AddField( + model_name='buttongroup', + name='screen', + field=models.CharField(blank=True, default='main', max_length=50), + ), + ] diff --git a/labdash/models.py b/labdash/models.py index ccbab68..261138d 100644 --- a/labdash/models.py +++ b/labdash/models.py @@ -3,6 +3,7 @@ class ButtonGroup(models.Model): name = models.CharField(max_length=200) + screen = models.CharField(max_length=50, default="main", blank=True) color = models.CharField(max_length=200) priority = models.IntegerField(default=50) tile_width = models.IntegerField(default=1) diff --git a/labdash/urls.py b/labdash/urls.py index e076766..07cf8ae 100644 --- a/labdash/urls.py +++ b/labdash/urls.py @@ -1,9 +1,10 @@ from django.urls import re_path from django.conf.urls.static import static from django.conf import settings -from labdash.views import Dashboard, trigger_button +from labdash.views import Dashboard, custom_screen, trigger_button urlpatterns = [ re_path(r"^$", Dashboard.as_view()), + re_path(r"^screen/(?P[A-z]+)", custom_screen), re_path(r"^trigger/(?P[0-9]+)", trigger_button), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/labdash/views.py b/labdash/views.py index 1be2bf3..8ed290a 100644 --- a/labdash/views.py +++ b/labdash/views.py @@ -1,5 +1,5 @@ from django.http import JsonResponse -from django.shortcuts import get_object_or_404 +from django.shortcuts import get_object_or_404, render from django.views.generic.list import ListView from labdash.models import ButtonGroup, Button import labdash.mqtt @@ -8,7 +8,23 @@ class Dashboard(ListView): model = ButtonGroup context_object_name = "groups" - queryset = ButtonGroup.objects.filter(hide=False).order_by("priority") + queryset = ButtonGroup.objects.filter(screen="main", hide=False).order_by( + "priority" + ) + + +def custom_screen(req, name): + groups = ( + ButtonGroup.objects.filter(screen=name, hide=False).order_by("priority").all() + ) + return render( + req, + "labdash/buttongroup_list.html", + context={ + "groups": groups, + "do_home_timeout": req.GET.get("kiosk", False) != False, + }, + ) def trigger_button(request, pk): diff --git a/static/js/control.js b/static/js/control.js index ad26316..2f09f68 100644 --- a/static/js/control.js +++ b/static/js/control.js @@ -1,5 +1,9 @@ // regular old buttons +var lastInteraction = new Date(); +const KIOSK_INTERACT_TIMEOUT = 60 * 1000; + $('.ajax').click(function(e) { + lastInteraction = new Date(); $.ajax({ url: '/trigger/' + $(this).data('id') }); @@ -97,3 +101,14 @@ client.on("reconnect", () => { console.log("mqtt reconnecting..."); }); + +// timeout to go back home when not on main page +var doHomeTimeout = JSON.parse(document.getElementById('doHomeTimeout').textContent); +if (doHomeTimeout) { + console.log("in kiosk mode"); + setInterval(function() { + if (new Date() - lastInteraction >= KIOSK_INTERACT_TIMEOUT) { + document.location = "/"; + } + }, KIOSK_INTERACT_TIMEOUT); +} diff --git a/templates/labdash/buttongroup_list.html b/templates/labdash/buttongroup_list.html index df275bb..df95fb0 100644 --- a/templates/labdash/buttongroup_list.html +++ b/templates/labdash/buttongroup_list.html @@ -47,6 +47,7 @@

From 0cabce84f10231a70cd57f803bc503027c6c7f20 Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 20:28:08 +0100 Subject: [PATCH 04/15] printers: support 'preparing' state --- static/js/printers.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/static/js/printers.js b/static/js/printers.js index 0db70d1..2cd8388 100644 --- a/static/js/printers.js +++ b/static/js/printers.js @@ -17,6 +17,7 @@ client.on("connect", () => { $(`[data-printer]`).each(function() { var printer = $(this).data("printer"); topics.add(`printers/${printer}/state`); + topics.add(`printers/${printer}/file`); topics.add(`printers/${printer}/percent_done`); topics.add(`printers/${printer}/time_remaining_mins`); }); @@ -31,24 +32,30 @@ client.on("message", (topic, message, packet) => { var value = message.toString(); let printer = topic.split("/")[1]; let typ = topic.split("/")[2]; + let printerSection = $(`section[data-printer=${printer}]`); if (typ === "state" && value === "Printing") { - $(`section[data-printer=${printer}]`).addClass(`active`); + printerSection.addClass(`active`); + printerSection.removeClass(`preparing`); } else if (typ === "state" && value == "Preprint") { - $(`section[data-printer=${printer}]`).addClass(`active`); - $(`[data-printer=${printer}] .percent`).text(`Preparing to print...`); + printerSection.addClass(`active`); + printerSection.addClass(`preparing`); + $(`[data-printer=${printer}] .percent`).text(`Preparing...`); $(`[data-printer=${printer}] .time`).text(``); + $(`[data-printer=${printer}] .file`).text(``); $(`[data-printer=${printer}] progress`).val(0); } else if (typ === "state") { - $(`section[data-printer=${printer}]`).removeClass(`active`); + printerSection.removeClass(`active`); + printerSection.removeClass(`preparing`); $(`[data-printer=${printer}] .percent`).text(``); $(`[data-printer=${printer}] .time`).text(``); $(`[data-printer=${printer}] progress`).val(0); + return; } - if (typ === "percent_done") { + if (typ === "percent_done" && !printerSection.hasClass('preparing')) { $(`[data-printer=${printer}] .percent`).text(`${value}% complete -`); $(`[data-printer=${printer}] progress`).val(value); - } else if (typ === "time_remaining_mins" && value != "0") { + } else if (typ === "time_remaining_mins" && !printerSection.hasClass('preparing')) { $(`[data-printer=${printer}] .time`).text(`${value} minutes remaining`); } else if (typ === "file") { $(`[data-printer=${printer}] .file`).text(`Printing ${value} - `); From a35491ca0b4a29880a2108432aafbd489814da0d Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 20:51:46 +0100 Subject: [PATCH 05/15] switch to uv --- Dockerfile | 34 +++-- contrib/entrypoint.sh | 2 +- poetry.lock | 319 ------------------------------------------ pyproject.toml | 42 ++++-- shell.nix | 1 - uv.lock | 236 +++++++++++++++++++++++++++++++ 6 files changed, 280 insertions(+), 354 deletions(-) delete mode 100644 poetry.lock create mode 100644 uv.lock diff --git a/Dockerfile b/Dockerfile index db2b3a2..c73e397 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,25 @@ -FROM python:3.11-alpine AS base +FROM python:3.11-alpine +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ +RUN apk add --no-cache --virtual .build-deps musl-dev gcc openldap-dev libffi-dev + ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ PIP_NO_CACHE_DIR=off \ PIP_DISABLE_PIP_VERSION_CHECK=on \ - PIP_DEFAULT_TIMEOUT=100 \ - POETRY_HOME="/opt/poetry" \ - POETRY_VIRTUALENVS_IN_PROJECT=true \ - POETRY_NO_INTERACTION=1 \ - PYSETUP_PATH="/opt/pysetup" \ - VENV_PATH="/opt/pysetup/.venv" -ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH" + PIP_DEFAULT_TIMEOUT=100 -FROM base AS builder -RUN apk add --no-cache --virtual .build-deps musl-dev gcc openldap-dev libffi-dev -RUN pip install poetry -WORKDIR $PYSETUP_PATH -COPY ./poetry.lock ./pyproject.toml ./ -RUN poetry install +# Change the working directory to the `app` directory +WORKDIR /app + +# Install dependencies +RUN --mount=type=cache,target=/root/.cache/uv \ + --mount=type=bind,source=uv.lock,target=uv.lock \ + --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ + uv sync --locked --no-install-project -FROM base AS production -RUN apk add --no-cache --virtual .build-deps musl-dev gcc openldap-dev libffi-dev -COPY --from=builder $VENV_PATH $VENV_PATH COPY . /app -WORKDIR /app +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --locked + ENTRYPOINT ["/app/contrib/entrypoint.sh"] diff --git a/contrib/entrypoint.sh b/contrib/entrypoint.sh index 58fec56..040b9b3 100755 --- a/contrib/entrypoint.sh +++ b/contrib/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/sh cd /app export PYTHONUNBUFFERED=1 -. /opt/pysetup/.venv/bin/activate +. ./.venv/bin/activate python ./manage.py migrate exec python ./manage.py runserver --noreload 0.0.0.0:8000 diff --git a/poetry.lock b/poetry.lock deleted file mode 100644 index 5fdd065..0000000 --- a/poetry.lock +++ /dev/null @@ -1,319 +0,0 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. - -[[package]] -name = "asgiref" -version = "3.8.1" -description = "ASGI specs, helper code, and adapters" -optional = false -python-versions = ">=3.8" -files = [ - {file = "asgiref-3.8.1-py3-none-any.whl", hash = "sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47"}, - {file = "asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590"}, -] - -[package.extras] -tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] - -[[package]] -name = "asyncio-paho" -version = "0.6.0" -description = "A Paho MQTT client supporting asyncio loop without additional setup." -optional = false -python-versions = ">=3.8" -files = [ - {file = "asyncio_paho-0.6.0-py3-none-any.whl", hash = "sha256:7239dc5ec17afef1c1ea162e6c32c477c6cc728ce64740ca433b984bded122e7"}, - {file = "asyncio_paho-0.6.0.tar.gz", hash = "sha256:19fffd4758bfcf704393acf8b540d06a9def27270b2cf55826f956660a8f1496"}, -] - -[package.dependencies] -paho-mqtt = ">=1.6,<2.0" - -[[package]] -name = "django" -version = "5.1" -description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." -optional = false -python-versions = ">=3.10" -files = [ - {file = "Django-5.1-py3-none-any.whl", hash = "sha256:d3b811bf5371a26def053d7ee42a9df1267ef7622323fe70a601936725aa4557"}, - {file = "Django-5.1.tar.gz", hash = "sha256:848a5980e8efb76eea70872fb0e4bc5e371619c70fffbe48e3e1b50b2c09455d"}, -] - -[package.dependencies] -asgiref = ">=3.8.1,<4" -sqlparse = ">=0.3.1" -tzdata = {version = "*", markers = "sys_platform == \"win32\""} - -[package.extras] -argon2 = ["argon2-cffi (>=19.1.0)"] -bcrypt = ["bcrypt"] - -[[package]] -name = "django-auth-ldap" -version = "5.1.0" -description = "Django LDAP authentication backend" -optional = false -python-versions = ">=3.9" -files = [ - {file = "django_auth_ldap-5.1.0-py3-none-any.whl", hash = "sha256:a5f7bdb54b2ab80e4e9eb080cd3e06e89e4c9d2d534ddb39b66cd970dd6d3536"}, - {file = "django_auth_ldap-5.1.0.tar.gz", hash = "sha256:9c607e8d9c53cf2a0ccafbe0acfc33eb1d1fd474c46ec52d30aee0dca1da9668"}, -] - -[package.dependencies] -Django = ">=4.2" -python-ldap = ">=3.1" - -[[package]] -name = "django-stubs" -version = "5.1.1" -description = "Mypy stubs for Django" -optional = false -python-versions = ">=3.8" -files = [ - {file = "django_stubs-5.1.1-py3-none-any.whl", hash = "sha256:c4dc64260bd72e6d32b9e536e8dd0d9247922f0271f82d1d5132a18f24b388ac"}, - {file = "django_stubs-5.1.1.tar.gz", hash = "sha256:126d354bbdff4906c4e93e6361197f6fbfb6231c3df6def85a291dae6f9f577b"}, -] - -[package.dependencies] -asgiref = "*" -django = "*" -django-stubs-ext = ">=5.1.1" -types-PyYAML = "*" -typing-extensions = ">=4.11.0" - -[package.extras] -compatible-mypy = ["mypy (>=1.12,<1.14)"] -oracle = ["oracledb"] -redis = ["redis"] - -[[package]] -name = "django-stubs-ext" -version = "5.1.1" -description = "Monkey-patching and extensions for django-stubs" -optional = false -python-versions = ">=3.8" -files = [ - {file = "django_stubs_ext-5.1.1-py3-none-any.whl", hash = "sha256:3907f99e178c93323e2ce908aef8352adb8c047605161f8d9e5e7b4efb5a6a9c"}, - {file = "django_stubs_ext-5.1.1.tar.gz", hash = "sha256:db7364e4f50ae7e5360993dbd58a3a57ea4b2e7e5bab0fbd525ccdb3e7975d1c"}, -] - -[package.dependencies] -django = "*" -typing-extensions = "*" - -[[package]] -name = "django-vite" -version = "3.0.4" -description = "Integration of Vite in a Django project." -optional = false -python-versions = "*" -files = [ - {file = "django-vite-3.0.4.tar.gz", hash = "sha256:043ab5068b4c66eb33cb26c5215a6dfe275d3c4de15d59b0b7b97b4567912fb0"}, - {file = "django_vite-3.0.4-py3-none-any.whl", hash = "sha256:e4088e0c79b7c9cf013ebb2ae0117a8fa57646337a40e90209ba916d65f359d3"}, -] - -[package.dependencies] -Django = ">=3.2" - -[package.extras] -dev = ["black"] - -[[package]] -name = "paho-mqtt" -version = "1.6.1" -description = "MQTT version 5.0/3.1.1 client class" -optional = false -python-versions = "*" -files = [ - {file = "paho-mqtt-1.6.1.tar.gz", hash = "sha256:2a8291c81623aec00372b5a85558a372c747cbca8e9934dfe218638b8eefc26f"}, -] - -[package.extras] -proxy = ["PySocks"] - -[[package]] -name = "pyasn1" -version = "0.6.1" -description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629"}, - {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, -] - -[[package]] -name = "pyasn1-modules" -version = "0.4.1" -description = "A collection of ASN.1-based protocols modules" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pyasn1_modules-0.4.1-py3-none-any.whl", hash = "sha256:49bfa96b45a292b711e986f222502c1c9a5e1f4e568fc30e2574a6c7d07838fd"}, - {file = "pyasn1_modules-0.4.1.tar.gz", hash = "sha256:c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c"}, -] - -[package.dependencies] -pyasn1 = ">=0.4.6,<0.7.0" - -[[package]] -name = "python-ldap" -version = "3.4.4" -description = "Python modules for implementing LDAP clients" -optional = false -python-versions = ">=3.6" -files = [ - {file = "python-ldap-3.4.4.tar.gz", hash = "sha256:7edb0accec4e037797705f3a05cbf36a9fde50d08c8f67f2aef99a2628fab828"}, -] - -[package.dependencies] -pyasn1 = ">=0.3.7" -pyasn1_modules = ">=0.1.5" - -[[package]] -name = "sqlparse" -version = "0.5.1" -description = "A non-validating SQL parser." -optional = false -python-versions = ">=3.8" -files = [ - {file = "sqlparse-0.5.1-py3-none-any.whl", hash = "sha256:773dcbf9a5ab44a090f3441e2180efe2560220203dc2f8c0b0fa141e18b505e4"}, - {file = "sqlparse-0.5.1.tar.gz", hash = "sha256:bb6b4df465655ef332548e24f08e205afc81b9ab86cb1c45657a7ff173a3a00e"}, -] - -[package.extras] -dev = ["build", "hatch"] -doc = ["sphinx"] - -[[package]] -name = "types-pyyaml" -version = "6.0.12.20240917" -description = "Typing stubs for PyYAML" -optional = false -python-versions = ">=3.8" -files = [ - {file = "types-PyYAML-6.0.12.20240917.tar.gz", hash = "sha256:d1405a86f9576682234ef83bcb4e6fff7c9305c8b1fbad5e0bcd4f7dbdc9c587"}, - {file = "types_PyYAML-6.0.12.20240917-py3-none-any.whl", hash = "sha256:392b267f1c0fe6022952462bf5d6523f31e37f6cea49b14cee7ad634b6301570"}, -] - -[[package]] -name = "typing-extensions" -version = "4.12.2" -description = "Backported and Experimental Type Hints for Python 3.8+" -optional = false -python-versions = ">=3.8" -files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, -] - -[[package]] -name = "tzdata" -version = "2024.1" -description = "Provider of IANA time zone data" -optional = false -python-versions = ">=2" -files = [ - {file = "tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"}, - {file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"}, -] - -[[package]] -name = "websockets" -version = "13.0" -description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" -optional = false -python-versions = ">=3.8" -files = [ - {file = "websockets-13.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ad4fa707ff9e2ffee019e946257b5300a45137a58f41fbd9a4db8e684ab61528"}, - {file = "websockets-13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6fd757f313c13c34dae9f126d3ba4cf97175859c719e57c6a614b781c86b617e"}, - {file = "websockets-13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cbac2eb7ce0fac755fb983c9247c4a60c4019bcde4c0e4d167aeb17520cc7ef1"}, - {file = "websockets-13.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4b83cf7354cbbc058e97b3e545dceb75b8d9cf17fd5a19db419c319ddbaaf7a"}, - {file = "websockets-13.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9202c0010c78fad1041e1c5285232b6508d3633f92825687549540a70e9e5901"}, - {file = "websockets-13.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e6566e79c8c7cbea75ec450f6e1828945fc5c9a4769ceb1c7b6e22470539712"}, - {file = "websockets-13.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e7fcad070dcd9ad37a09d89a4cbc2a5e3e45080b88977c0da87b3090f9f55ead"}, - {file = "websockets-13.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a8f7d65358a25172db00c69bcc7df834155ee24229f560d035758fd6613111a"}, - {file = "websockets-13.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:63b702fb31e3f058f946ccdfa551f4d57a06f7729c369e8815eb18643099db37"}, - {file = "websockets-13.0-cp310-cp310-win32.whl", hash = "sha256:3a20cf14ba7b482c4a1924b5e061729afb89c890ca9ed44ac4127c6c5986e424"}, - {file = "websockets-13.0-cp310-cp310-win_amd64.whl", hash = "sha256:587245f0704d0bb675f919898d7473e8827a6d578e5a122a21756ca44b811ec8"}, - {file = "websockets-13.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:06df8306c241c235075d2ae77367038e701e53bc8c1bb4f6644f4f53aa6dedd0"}, - {file = "websockets-13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:85a1f92a02f0b8c1bf02699731a70a8a74402bb3f82bee36e7768b19a8ed9709"}, - {file = "websockets-13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9ed02c604349068d46d87ef4c2012c112c791f2bec08671903a6bb2bd9c06784"}, - {file = "websockets-13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b89849171b590107f6724a7b0790736daead40926ddf47eadf998b4ff51d6414"}, - {file = "websockets-13.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:939a16849d71203628157a5e4a495da63967c744e1e32018e9b9e2689aca64d4"}, - {file = "websockets-13.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad818cdac37c0ad4c58e51cb4964eae4f18b43c4a83cb37170b0d90c31bd80cf"}, - {file = "websockets-13.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cbfe82a07596a044de78bb7a62519e71690c5812c26c5f1d4b877e64e4f46309"}, - {file = "websockets-13.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e07e76c49f39c5b45cbd7362b94f001ae209a3ea4905ae9a09cfd53b3c76373d"}, - {file = "websockets-13.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:372f46a0096cfda23c88f7e42349a33f8375e10912f712e6b496d3a9a557290f"}, - {file = "websockets-13.0-cp311-cp311-win32.whl", hash = "sha256:376a43a4fd96725f13450d3d2e98f4f36c3525c562ab53d9a98dd2950dca9a8a"}, - {file = "websockets-13.0-cp311-cp311-win_amd64.whl", hash = "sha256:2be1382a4daa61e2f3e2be3b3c86932a8db9d1f85297feb6e9df22f391f94452"}, - {file = "websockets-13.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b5407c34776b9b77bd89a5f95eb0a34aaf91889e3f911c63f13035220eb50107"}, - {file = "websockets-13.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4782ec789f059f888c1e8fdf94383d0e64b531cffebbf26dd55afd53ab487ca4"}, - {file = "websockets-13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c8feb8e19ef65c9994e652c5b0324abd657bedd0abeb946fb4f5163012c1e730"}, - {file = "websockets-13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3f3d2e20c442b58dbac593cb1e02bc02d149a86056cc4126d977ad902472e3b"}, - {file = "websockets-13.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e39d393e0ab5b8bd01717cc26f2922026050188947ff54fe6a49dc489f7750b7"}, - {file = "websockets-13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f661a4205741bdc88ac9c2b2ec003c72cee97e4acd156eb733662ff004ba429"}, - {file = "websockets-13.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:384129ad0490e06bab2b98c1da9b488acb35bb11e2464c728376c6f55f0d45f3"}, - {file = "websockets-13.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:df5c0eff91f61b8205a6c9f7b255ff390cdb77b61c7b41f79ca10afcbb22b6cb"}, - {file = "websockets-13.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:02cc9bb1a887dac0e08bf657c5d00aa3fac0d03215d35a599130c2034ae6663a"}, - {file = "websockets-13.0-cp312-cp312-win32.whl", hash = "sha256:d9726d2c9bd6aed8cb994d89b3910ca0079406edce3670886ec828a73e7bdd53"}, - {file = "websockets-13.0-cp312-cp312-win_amd64.whl", hash = "sha256:fa0839f35322f7b038d8adcf679e2698c3a483688cc92e3bd15ee4fb06669e9a"}, - {file = "websockets-13.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:da7e501e59857e8e3e9d10586139dc196b80445a591451ca9998aafba1af5278"}, - {file = "websockets-13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a00e1e587c655749afb5b135d8d3edcfe84ec6db864201e40a882e64168610b3"}, - {file = "websockets-13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a7fbf2a8fe7556a8f4e68cb3e736884af7bf93653e79f6219f17ebb75e97d8f0"}, - {file = "websockets-13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ea9c9c7443a97ea4d84d3e4d42d0e8c4235834edae652993abcd2aff94affd7"}, - {file = "websockets-13.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35c2221b539b360203f3f9ad168e527bf16d903e385068ae842c186efb13d0ea"}, - {file = "websockets-13.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:358d37c5c431dd050ffb06b4b075505aae3f4f795d7fff9794e5ed96ce99b998"}, - {file = "websockets-13.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:038e7a0f1bfafc7bf52915ab3506b7a03d1e06381e9f60440c856e8918138151"}, - {file = "websockets-13.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fd038bc9e2c134847f1e0ce3191797fad110756e690c2fdd9702ed34e7a43abb"}, - {file = "websockets-13.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93b8c2008f372379fb6e5d2b3f7c9ec32f7b80316543fd3a5ace6610c5cde1b0"}, - {file = "websockets-13.0-cp313-cp313-win32.whl", hash = "sha256:851fd0afb3bc0b73f7c5b5858975d42769a5fdde5314f4ef2c106aec63100687"}, - {file = "websockets-13.0-cp313-cp313-win_amd64.whl", hash = "sha256:7d14901fdcf212804970c30ab9ee8f3f0212e620c7ea93079d6534863444fb4e"}, - {file = "websockets-13.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ae7a519a56a714f64c3445cabde9fc2fc927e7eae44f413eae187cddd9e54178"}, - {file = "websockets-13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5575031472ca87302aeb2ce2c2349f4c6ea978c86a9d1289bc5d16058ad4c10a"}, - {file = "websockets-13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9895df6cd0bfe79d09bcd1dbdc03862846f26fbd93797153de954306620c1d00"}, - {file = "websockets-13.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4de299c947a54fca9ce1c5fd4a08eb92ffce91961becb13bd9195f7c6e71b47"}, - {file = "websockets-13.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:05c25f7b849702950b6fd0e233989bb73a0d2bc83faa3b7233313ca395205f6d"}, - {file = "websockets-13.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ede95125a30602b1691a4b1da88946bf27dae283cf30f22cd2cb8ca4b2e0d119"}, - {file = "websockets-13.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:addf0a16e4983280efed272d8cb3b2e05f0051755372461e7d966b80a6554e16"}, - {file = "websockets-13.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:06b3186e97bf9a33921fa60734d5ed90f2a9b407cce8d23c7333a0984049ef61"}, - {file = "websockets-13.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:eae368cac85adc4c7dc3b0d5f84ffcca609d658db6447387300478e44db70796"}, - {file = "websockets-13.0-cp38-cp38-win32.whl", hash = "sha256:337837ac788d955728b1ab01876d72b73da59819a3388e1c5e8e05c3999f1afa"}, - {file = "websockets-13.0-cp38-cp38-win_amd64.whl", hash = "sha256:f66e00e42f25ca7e91076366303e11c82572ca87cc5aae51e6e9c094f315ab41"}, - {file = "websockets-13.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:94c1c02721139fe9940b38d28fb15b4b782981d800d5f40f9966264fbf23dcc8"}, - {file = "websockets-13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bd4ba86513430513e2aa25a441bb538f6f83734dc368a2c5d18afdd39097aa33"}, - {file = "websockets-13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a1ab8f0e0cadc5be5f3f9fa11a663957fecbf483d434762c8dfb8aa44948944a"}, - {file = "websockets-13.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3670def5d3dfd5af6f6e2b3b243ea8f1f72d8da1ef927322f0703f85c90d9603"}, - {file = "websockets-13.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6058b6be92743358885ad6dcdecb378fde4a4c74d4dd16a089d07580c75a0e80"}, - {file = "websockets-13.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:516062a0a8ef5ecbfa4acbaec14b199fc070577834f9fe3d40800a99f92523ca"}, - {file = "websockets-13.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:da7e918d82e7bdfc6f66d31febe1b2e28a1ca3387315f918de26f5e367f61572"}, - {file = "websockets-13.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:9cc7f35dcb49a4e32db82a849fcc0714c4d4acc9d2273aded2d61f87d7f660b7"}, - {file = "websockets-13.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f5737c53eb2c8ed8f64b50d3dafd3c1dae739f78aa495a288421ac1b3de82717"}, - {file = "websockets-13.0-cp39-cp39-win32.whl", hash = "sha256:265e1f0d3f788ce8ef99dca591a1aec5263b26083ca0934467ad9a1d1181067c"}, - {file = "websockets-13.0-cp39-cp39-win_amd64.whl", hash = "sha256:4d70c89e3d3b347a7c4d3c33f8d323f0584c9ceb69b82c2ef8a174ca84ea3d4a"}, - {file = "websockets-13.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:602cbd010d8c21c8475f1798b705bb18567eb189c533ab5ef568bc3033fdf417"}, - {file = "websockets-13.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:bf8eb5dca4f484a60f5327b044e842e0d7f7cdbf02ea6dc4a4f811259f1f1f0b"}, - {file = "websockets-13.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89d795c1802d99a643bf689b277e8604c14b5af1bc0a31dade2cd7a678087212"}, - {file = "websockets-13.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:788bc841d250beccff67a20a5a53a15657a60111ef9c0c0a97fbdd614fae0fe2"}, - {file = "websockets-13.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7334752052532c156d28b8eaf3558137e115c7871ea82adff69b6d94a7bee273"}, - {file = "websockets-13.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e7a1963302947332c3039e3f66209ec73b1626f8a0191649e0713c391e9f5b0d"}, - {file = "websockets-13.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2e1cf4e1eb84b4fd74a47688e8b0940c89a04ad9f6937afa43d468e71128cd68"}, - {file = "websockets-13.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:c026ee729c4ce55708a14b839ba35086dfae265fc12813b62d34ce33f4980c1c"}, - {file = "websockets-13.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5f9d23fbbf96eefde836d9692670bfc89e2d159f456d499c5efcf6a6281c1af"}, - {file = "websockets-13.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ad684cb7efce227d756bae3e8484f2e56aa128398753b54245efdfbd1108f2c"}, - {file = "websockets-13.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1e10b3fbed7be4a59831d3a939900e50fcd34d93716e433d4193a4d0d1d335d"}, - {file = "websockets-13.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d42a818e634f789350cd8fb413a3f5eec1cf0400a53d02062534c41519f5125c"}, - {file = "websockets-13.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:e5ba5e9b332267d0f2c33ede390061850f1ac3ee6cd1bdcf4c5ea33ead971966"}, - {file = "websockets-13.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:f9af457ed593e35f467140d8b61d425495b127744a9d65d45a366f8678449a23"}, - {file = "websockets-13.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcea3eb58c09c3a31cc83b45c06d5907f02ddaf10920aaa6443975310f699b95"}, - {file = "websockets-13.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c210d1460dc8d326ffdef9703c2f83269b7539a1690ad11ae04162bc1878d33d"}, - {file = "websockets-13.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b32f38bc81170fd56d0482d505b556e52bf9078b36819a8ba52624bd6667e39e"}, - {file = "websockets-13.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:81a11a1ddd5320429db47c04d35119c3e674d215173d87aaeb06ae80f6e9031f"}, - {file = "websockets-13.0-py3-none-any.whl", hash = "sha256:dbbac01e80aee253d44c4f098ab3cc17c822518519e869b284cfbb8cd16cc9de"}, - {file = "websockets-13.0.tar.gz", hash = "sha256:b7bf950234a482b7461afdb2ec99eee3548ec4d53f418c7990bb79c620476602"}, -] - -[metadata] -lock-version = "2.0" -python-versions = "^3.11" -content-hash = "c402be98f3a91a1cf82217fef7134d45ffca74e909efe3bd50f3ef0fb3accc0c" diff --git a/pyproject.toml b/pyproject.toml index 92b9109..c710ffb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,24 +1,36 @@ -[tool.poetry] +[project] name = "hackmap" version = "0.1.0" description = "Map for edinburgh hacklab" -authors = ["Aria Shrimpton "] -license = "AGPL" +authors = [{ name = "Aria Shrimpton", email = "me@aria.rip" }] +requires-python = ">=3.11,<4" readme = "README.md" -package-mode = false +license = "AGPL" +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] +dependencies = [ + "django>=5.1,<6", + "django-vite>=3.0.4,<4", + "websockets>=13.0,<14", + "asyncio-paho>=0.6.0,<0.7", + "django-auth-ldap>=5.1.0,<6", +] -[tool.poetry.dependencies] -python = "^3.11" -django = "^5.1" -django-vite = "^3.0.4" -websockets = "^13.0" -asyncio-paho = "^0.6.0" -django-auth-ldap = "^5.1.0" +[dependency-groups] +dev = ["django-stubs>=5.1.1,<6"] +[tool.uv] +package = false +default-groups = "all" -[tool.poetry.group.dev.dependencies] -django-stubs = "^5.1.1" +[tool.uv.build-backend] +module-root = "" [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ["uv_build>=0.11.32,<0.12.0"] +build-backend = "uv_build" diff --git a/shell.nix b/shell.nix index 13a1c9e..a2d72b0 100644 --- a/shell.nix +++ b/shell.nix @@ -3,7 +3,6 @@ }: pkgs.mkShell { buildInputs = [ - pkgs.poetry pkgs.ruff pkgs.pyright pkgs.sqlite diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..ed14202 --- /dev/null +++ b/uv.lock @@ -0,0 +1,236 @@ +version = 1 +revision = 3 +requires-python = ">=3.11, <4" + +[[package]] +name = "asgiref" +version = "3.8.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/29/38/b3395cc9ad1b56d2ddac9970bc8f4141312dbaec28bc7c218b0dfafd0f42/asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590", size = 35186, upload-time = "2024-03-22T14:39:36.863Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/39/e3/893e8757be2612e6c266d9bb58ad2e3651524b5b40cf56761e985a28b13e/asgiref-3.8.1-py3-none-any.whl", hash = "sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47", size = 23828, upload-time = "2024-03-22T14:39:34.521Z" }, +] + +[[package]] +name = "asyncio-paho" +version = "0.6.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "paho-mqtt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/68/15/6ef5c2395603a322ae76282a06ea59501f83a3c949918b35a9c09948ac0e/asyncio_paho-0.6.0.tar.gz", hash = "sha256:19fffd4758bfcf704393acf8b540d06a9def27270b2cf55826f956660a8f1496", size = 11244, upload-time = "2022-10-10T17:45:54.892Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d4/7a/aba37082e928839bb8068ca4459803e22258745bf70fd24ca991b993adfb/asyncio_paho-0.6.0-py3-none-any.whl", hash = "sha256:7239dc5ec17afef1c1ea162e6c32c477c6cc728ce64740ca433b984bded122e7", size = 9352, upload-time = "2022-10-10T17:45:53.49Z" }, +] + +[[package]] +name = "django" +version = "5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "asgiref" }, + { name = "sqlparse" }, + { name = "tzdata", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1e/0c/d854d25bb74a8a3b41e642bbd27fe6af12fadd0edfd07d487809cf0ef719/Django-5.1.tar.gz", hash = "sha256:848a5980e8efb76eea70872fb0e4bc5e371619c70fffbe48e3e1b50b2c09455d", size = 10681050, upload-time = "2024-08-07T13:34:10.857Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/28/b4/110532cebfea2244d76119904da98c6fa045ebb202aee9ec7cbf36ea3cad/Django-5.1-py3-none-any.whl", hash = "sha256:d3b811bf5371a26def053d7ee42a9df1267ef7622323fe70a601936725aa4557", size = 8246099, upload-time = "2024-08-07T13:33:52.959Z" }, +] + +[[package]] +name = "django-auth-ldap" +version = "5.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "django" }, + { name = "python-ldap" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/91/e4/2e8781840cc54f719be3241e16640524a9aabf94a599f5e083b0115042ce/django_auth_ldap-5.1.0.tar.gz", hash = "sha256:9c607e8d9c53cf2a0ccafbe0acfc33eb1d1fd474c46ec52d30aee0dca1da9668", size = 55059, upload-time = "2024-10-17T09:04:35.925Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/47/f3492884addbb17672cc9a6053381162010d6e40ccd8440dedf22f72bc7f/django_auth_ldap-5.1.0-py3-none-any.whl", hash = "sha256:a5f7bdb54b2ab80e4e9eb080cd3e06e89e4c9d2d534ddb39b66cd970dd6d3536", size = 20833, upload-time = "2024-10-17T09:04:34Z" }, +] + +[[package]] +name = "django-stubs" +version = "5.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "asgiref" }, + { name = "django" }, + { name = "django-stubs-ext" }, + { name = "types-pyyaml" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bf/60/1ae90eb6e2e107bc64a3de9de78a5add7f3b85e491113504eed38d6d2c63/django_stubs-5.1.1.tar.gz", hash = "sha256:126d354bbdff4906c4e93e6361197f6fbfb6231c3df6def85a291dae6f9f577b", size = 265624, upload-time = "2024-10-26T19:12:14.064Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/c8/3081d5f994351248fcd60f9aab10cb2020bdd7df0f14e80854373e15d7d4/django_stubs-5.1.1-py3-none-any.whl", hash = "sha256:c4dc64260bd72e6d32b9e536e8dd0d9247922f0271f82d1d5132a18f24b388ac", size = 470790, upload-time = "2024-10-26T19:12:12.144Z" }, +] + +[[package]] +name = "django-stubs-ext" +version = "5.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "django" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ca/62/a7129909d3c94eac957c02eeb05ac57cbca81db4f3f6270a8503697f376a/django_stubs_ext-5.1.1.tar.gz", hash = "sha256:db7364e4f50ae7e5360993dbd58a3a57ea4b2e7e5bab0fbd525ccdb3e7975d1c", size = 9455, upload-time = "2024-10-26T19:11:30.081Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6a/ed/f79ae5ad993bdf900d61892d2a9fc0145441a507a7579890fb8e21e4a7bc/django_stubs_ext-5.1.1-py3-none-any.whl", hash = "sha256:3907f99e178c93323e2ce908aef8352adb8c047605161f8d9e5e7b4efb5a6a9c", size = 8965, upload-time = "2024-10-26T19:11:29.143Z" }, +] + +[[package]] +name = "django-vite" +version = "3.0.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "django" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/88/fc/e969d4d85dd7b98ad1d9dfb86f085aed39be2b0bc333c9a4367eec15b194/django-vite-3.0.4.tar.gz", hash = "sha256:043ab5068b4c66eb33cb26c5215a6dfe275d3c4de15d59b0b7b97b4567912fb0", size = 21193, upload-time = "2024-04-07T22:21:30.509Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/93/e5/9d83719277af2a7ffde1d8900e1b4369e1975a10667b84902be62ef1215a/django_vite-3.0.4-py3-none-any.whl", hash = "sha256:e4088e0c79b7c9cf013ebb2ae0117a8fa57646337a40e90209ba916d65f359d3", size = 18831, upload-time = "2024-04-07T22:21:28.825Z" }, +] + +[[package]] +name = "hackmap" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "asyncio-paho" }, + { name = "django" }, + { name = "django-auth-ldap" }, + { name = "django-vite" }, + { name = "websockets" }, +] + +[package.dev-dependencies] +dev = [ + { name = "django-stubs" }, +] + +[package.metadata] +requires-dist = [ + { name = "asyncio-paho", specifier = ">=0.6.0,<0.7" }, + { name = "django", specifier = ">=5.1,<6" }, + { name = "django-auth-ldap", specifier = ">=5.1.0,<6" }, + { name = "django-vite", specifier = ">=3.0.4,<4" }, + { name = "websockets", specifier = ">=13.0,<14" }, +] + +[package.metadata.requires-dev] +dev = [{ name = "django-stubs", specifier = ">=5.1.1,<6" }] + +[[package]] +name = "paho-mqtt" +version = "1.6.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f8/dd/4b75dcba025f8647bc9862ac17299e0d7d12d3beadbf026d8c8d74215c12/paho-mqtt-1.6.1.tar.gz", hash = "sha256:2a8291c81623aec00372b5a85558a372c747cbca8e9934dfe218638b8eefc26f", size = 99373, upload-time = "2021-10-21T10:33:59.864Z" } + +[[package]] +name = "pyasn1" +version = "0.6.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034", size = 145322, upload-time = "2024-09-10T22:41:42.55Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/f1/d6a797abb14f6283c0ddff96bbdd46937f64122b8c925cab503dd37f8214/pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629", size = 83135, upload-time = "2024-09-11T16:00:36.122Z" }, +] + +[[package]] +name = "pyasn1-modules" +version = "0.4.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyasn1" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz", hash = "sha256:c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c", size = 310028, upload-time = "2024-09-10T22:42:08.349Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/77/89/bc88a6711935ba795a679ea6ebee07e128050d6382eaa35a0a47c8032bdc/pyasn1_modules-0.4.1-py3-none-any.whl", hash = "sha256:49bfa96b45a292b711e986f222502c1c9a5e1f4e568fc30e2574a6c7d07838fd", size = 181537, upload-time = "2024-09-11T16:02:10.336Z" }, +] + +[[package]] +name = "python-ldap" +version = "3.4.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyasn1" }, + { name = "pyasn1-modules" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fd/8b/1eeb4025dc1d3ac2f16678f38dec9ebdde6271c74955b72db5ce7a4dbfbd/python-ldap-3.4.4.tar.gz", hash = "sha256:7edb0accec4e037797705f3a05cbf36a9fde50d08c8f67f2aef99a2628fab828", size = 377889, upload-time = "2023-11-17T21:14:16.32Z" } + +[[package]] +name = "sqlparse" +version = "0.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/73/82/dfa23ec2cbed08a801deab02fe7c904bfb00765256b155941d789a338c68/sqlparse-0.5.1.tar.gz", hash = "sha256:bb6b4df465655ef332548e24f08e205afc81b9ab86cb1c45657a7ff173a3a00e", size = 84502, upload-time = "2024-07-15T19:30:27.085Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5d/a5/b2860373aa8de1e626b2bdfdd6df4355f0565b47e51f7d0c54fe70faf8fe/sqlparse-0.5.1-py3-none-any.whl", hash = "sha256:773dcbf9a5ab44a090f3441e2180efe2560220203dc2f8c0b0fa141e18b505e4", size = 44156, upload-time = "2024-07-15T19:30:25.033Z" }, +] + +[[package]] +name = "types-pyyaml" +version = "6.0.12.20240917" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/92/7d/a95df0a11f95c8f48d7683f03e4aed1a2c0fc73e9de15cca4d38034bea1a/types-PyYAML-6.0.12.20240917.tar.gz", hash = "sha256:d1405a86f9576682234ef83bcb4e6fff7c9305c8b1fbad5e0bcd4f7dbdc9c587", size = 12381, upload-time = "2024-09-17T02:17:24.31Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/2c/c1d81d680997d24b0542aa336f0a65bd7835e5224b7670f33a7d617da379/types_PyYAML-6.0.12.20240917-py3-none-any.whl", hash = "sha256:392b267f1c0fe6022952462bf5d6523f31e37f6cea49b14cee7ad634b6301570", size = 15264, upload-time = "2024-09-17T02:17:23.054Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.12.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321, upload-time = "2024-06-07T18:52:15.995Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438, upload-time = "2024-06-07T18:52:13.582Z" }, +] + +[[package]] +name = "tzdata" +version = "2024.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/74/5b/e025d02cb3b66b7b76093404392d4b44343c69101cc85f4d180dd5784717/tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd", size = 190559, upload-time = "2024-02-11T23:22:40.2Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/65/58/f9c9e6be752e9fcb8b6a0ee9fb87e6e7a1f6bcab2cdc73f02bb7ba91ada0/tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252", size = 345370, upload-time = "2024-02-11T23:22:38.223Z" }, +] + +[[package]] +name = "websockets" +version = "13.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/b0/e53bdd53d86447d211694f3cf66f163d077c5d68e6bcaa726bf64e88ae3a/websockets-13.0.tar.gz", hash = "sha256:b7bf950234a482b7461afdb2ec99eee3548ec4d53f418c7990bb79c620476602", size = 147622, upload-time = "2024-08-20T13:55:45.386Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/29/9fdf8a7f1ced2bac55d36e0b879991498c9858f1e524763434025948d254/websockets-13.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:06df8306c241c235075d2ae77367038e701e53bc8c1bb4f6644f4f53aa6dedd0", size = 150915, upload-time = "2024-08-20T13:54:17.797Z" }, + { url = "https://files.pythonhosted.org/packages/b9/27/723276e7fcb41a3e0859e347014e3e24637982a29222132746b98095ec02/websockets-13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:85a1f92a02f0b8c1bf02699731a70a8a74402bb3f82bee36e7768b19a8ed9709", size = 148575, upload-time = "2024-08-20T13:54:18.87Z" }, + { url = "https://files.pythonhosted.org/packages/04/54/39b1f809e34f78ebb1dcb9cf57465db9705bbf59f30bd1b3b381272dff2b/websockets-13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9ed02c604349068d46d87ef4c2012c112c791f2bec08671903a6bb2bd9c06784", size = 148825, upload-time = "2024-08-20T13:54:19.887Z" }, + { url = "https://files.pythonhosted.org/packages/fe/df/0a8a90162c32ceb9f28415291c1d689310b503288d29169302964105a351/websockets-13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b89849171b590107f6724a7b0790736daead40926ddf47eadf998b4ff51d6414", size = 158482, upload-time = "2024-08-20T13:54:20.862Z" }, + { url = "https://files.pythonhosted.org/packages/20/05/227dbb1861cd1e2eb04ac79b136da841dbf6f196e4dc0bd1e67edb4ee69d/websockets-13.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:939a16849d71203628157a5e4a495da63967c744e1e32018e9b9e2689aca64d4", size = 157478, upload-time = "2024-08-20T13:54:21.827Z" }, + { url = "https://files.pythonhosted.org/packages/fe/dd/3384d3eb26022703895d6ed65aec2d3af6976c3d9aed06200a322e7192cb/websockets-13.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad818cdac37c0ad4c58e51cb4964eae4f18b43c4a83cb37170b0d90c31bd80cf", size = 157855, upload-time = "2024-08-20T13:54:23.096Z" }, + { url = "https://files.pythonhosted.org/packages/93/ad/0320a24cd8309e1a257d43d762a732162f2956b769c1ad950b70d4d4d15a/websockets-13.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:cbfe82a07596a044de78bb7a62519e71690c5812c26c5f1d4b877e64e4f46309", size = 158160, upload-time = "2024-08-20T13:54:24.093Z" }, + { url = "https://files.pythonhosted.org/packages/d0/33/acc24e576228301d1dc23ce9d3f7d20f51dfe6c16d1b241e6ba4b2904d3e/websockets-13.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e07e76c49f39c5b45cbd7362b94f001ae209a3ea4905ae9a09cfd53b3c76373d", size = 157598, upload-time = "2024-08-20T13:54:25.111Z" }, + { url = "https://files.pythonhosted.org/packages/83/47/01645a0ea041e32a9d8946a324845beb8daba2e2f00ee4fd2d04d3ceb598/websockets-13.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:372f46a0096cfda23c88f7e42349a33f8375e10912f712e6b496d3a9a557290f", size = 157548, upload-time = "2024-08-20T13:54:26.082Z" }, + { url = "https://files.pythonhosted.org/packages/73/89/ea73bc41934eb3ea3f0c04fa7b16455ec5925b8b72aa5e016bd22df5feb5/websockets-13.0-cp311-cp311-win32.whl", hash = "sha256:376a43a4fd96725f13450d3d2e98f4f36c3525c562ab53d9a98dd2950dca9a8a", size = 151756, upload-time = "2024-08-20T13:54:27.584Z" }, + { url = "https://files.pythonhosted.org/packages/9b/b1/81f655476532b31c39814d55a1dc1e97ecedc5a1b4f9517ee665aec398f6/websockets-13.0-cp311-cp311-win_amd64.whl", hash = "sha256:2be1382a4daa61e2f3e2be3b3c86932a8db9d1f85297feb6e9df22f391f94452", size = 152200, upload-time = "2024-08-20T13:54:28.567Z" }, + { url = "https://files.pythonhosted.org/packages/ad/0a/baeea2931827e73ebe3d958fad9df74ec66d08341d0cf701ced0381adc91/websockets-13.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:b5407c34776b9b77bd89a5f95eb0a34aaf91889e3f911c63f13035220eb50107", size = 150928, upload-time = "2024-08-20T13:54:29.854Z" }, + { url = "https://files.pythonhosted.org/packages/6d/f7/306e2940829db34c5866e869eb5b1a08dd04d1c6d25c71327a028d124871/websockets-13.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4782ec789f059f888c1e8fdf94383d0e64b531cffebbf26dd55afd53ab487ca4", size = 148585, upload-time = "2024-08-20T13:54:31.224Z" }, + { url = "https://files.pythonhosted.org/packages/2b/3c/183a4f79e0ce6be8733f824e0a48db3771a373a7206aef900bc1ae4c176e/websockets-13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c8feb8e19ef65c9994e652c5b0324abd657bedd0abeb946fb4f5163012c1e730", size = 148821, upload-time = "2024-08-20T13:54:32.341Z" }, + { url = "https://files.pythonhosted.org/packages/03/32/37e1c9dd9aa1e7fa6fb3147d6992d61a20ba63ffee2adc88a392e1ae7376/websockets-13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3f3d2e20c442b58dbac593cb1e02bc02d149a86056cc4126d977ad902472e3b", size = 158746, upload-time = "2024-08-20T13:54:33.29Z" }, + { url = "https://files.pythonhosted.org/packages/6c/da/0cace6358289c7de1ee02ed0d572dfe92e5cb97270bda60f04a4e49ac5c5/websockets-13.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e39d393e0ab5b8bd01717cc26f2922026050188947ff54fe6a49dc489f7750b7", size = 157699, upload-time = "2024-08-20T13:54:34.371Z" }, + { url = "https://files.pythonhosted.org/packages/c7/ab/b763b0e8598c4251ec6e17d18f46cbced157772b991200fb0d32550844c5/websockets-13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f661a4205741bdc88ac9c2b2ec003c72cee97e4acd156eb733662ff004ba429", size = 158124, upload-time = "2024-08-20T13:54:35.356Z" }, + { url = "https://files.pythonhosted.org/packages/d0/2d/40b8c3ba08792c2ecdb81613671a4b9bd33b83c50519b235e8eeb0ae21a0/websockets-13.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:384129ad0490e06bab2b98c1da9b488acb35bb11e2464c728376c6f55f0d45f3", size = 158415, upload-time = "2024-08-20T13:54:36.832Z" }, + { url = "https://files.pythonhosted.org/packages/4c/5e/9a42db20f6c38d247a900bfb8633953df93d8873a99ed9432645a4d5e185/websockets-13.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:df5c0eff91f61b8205a6c9f7b255ff390cdb77b61c7b41f79ca10afcbb22b6cb", size = 157795, upload-time = "2024-08-20T13:54:38.362Z" }, + { url = "https://files.pythonhosted.org/packages/87/52/7fb5f052eefaa5d2b42da06b314c2af0467fadbd7f360716a1a4d4f7ab67/websockets-13.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:02cc9bb1a887dac0e08bf657c5d00aa3fac0d03215d35a599130c2034ae6663a", size = 157791, upload-time = "2024-08-20T13:54:39.375Z" }, + { url = "https://files.pythonhosted.org/packages/9c/8b/4b7064d1a40fcb85f64bc051d8bdc8a9e388572eb5bec5cb85ffb2c43e01/websockets-13.0-cp312-cp312-win32.whl", hash = "sha256:d9726d2c9bd6aed8cb994d89b3910ca0079406edce3670886ec828a73e7bdd53", size = 151765, upload-time = "2024-08-20T13:54:40.35Z" }, + { url = "https://files.pythonhosted.org/packages/8b/a3/297207726b292e85b9a8ce24ef6ab16a056c457100e915a67b6928a58fa9/websockets-13.0-cp312-cp312-win_amd64.whl", hash = "sha256:fa0839f35322f7b038d8adcf679e2698c3a483688cc92e3bd15ee4fb06669e9a", size = 152202, upload-time = "2024-08-20T13:54:41.48Z" }, + { url = "https://files.pythonhosted.org/packages/03/b6/778678e1ff104df3a869dacb0bc845df34d74f2ff7451f99babccd212203/websockets-13.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:da7e501e59857e8e3e9d10586139dc196b80445a591451ca9998aafba1af5278", size = 150936, upload-time = "2024-08-20T13:54:42.578Z" }, + { url = "https://files.pythonhosted.org/packages/fa/25/28609b2555f11e4913a4021147b7a7c5117b5c41da5d26a604a91bae85b9/websockets-13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a00e1e587c655749afb5b135d8d3edcfe84ec6db864201e40a882e64168610b3", size = 148590, upload-time = "2024-08-20T13:54:44.223Z" }, + { url = "https://files.pythonhosted.org/packages/cb/1f/e06fb15fde90683fd98e6ca44fb54fe579161ce553d54fdbb578014ae1a7/websockets-13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a7fbf2a8fe7556a8f4e68cb3e736884af7bf93653e79f6219f17ebb75e97d8f0", size = 148826, upload-time = "2024-08-20T13:54:45.19Z" }, + { url = "https://files.pythonhosted.org/packages/22/00/9892eee346f44cd814c18888bc1a05880e3f8091e4eb999e6b34634cd278/websockets-13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ea9c9c7443a97ea4d84d3e4d42d0e8c4235834edae652993abcd2aff94affd7", size = 158717, upload-time = "2024-08-20T13:54:46.902Z" }, + { url = "https://files.pythonhosted.org/packages/dc/ad/2bdc3a5dd60b639e0f8e76ee4a57fda27abaf05f604708c61c6fd7f8ad88/websockets-13.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:35c2221b539b360203f3f9ad168e527bf16d903e385068ae842c186efb13d0ea", size = 157660, upload-time = "2024-08-20T13:54:47.918Z" }, + { url = "https://files.pythonhosted.org/packages/0c/14/5585de16939608b77a37f8b88e1bd1d430d95ec19d3a8c26ec42a91f2815/websockets-13.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:358d37c5c431dd050ffb06b4b075505aae3f4f795d7fff9794e5ed96ce99b998", size = 158104, upload-time = "2024-08-20T13:54:48.931Z" }, + { url = "https://files.pythonhosted.org/packages/7b/1e/6cd9063fd34fe7f649ed9a56d3c91e80dea95cf3ab3344203ee774d51a56/websockets-13.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:038e7a0f1bfafc7bf52915ab3506b7a03d1e06381e9f60440c856e8918138151", size = 158463, upload-time = "2024-08-20T13:54:50.1Z" }, + { url = "https://files.pythonhosted.org/packages/d9/4d/c3282f8e54103f3d38b5e56851d00911dafd0c37c8d03a9ecc7a25f2a9da/websockets-13.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:fd038bc9e2c134847f1e0ce3191797fad110756e690c2fdd9702ed34e7a43abb", size = 157850, upload-time = "2024-08-20T13:54:51.295Z" }, + { url = "https://files.pythonhosted.org/packages/a1/08/af4f67b74cc6891ee1c34a77b47a3cb77081b824c3df92c1196980df9a4f/websockets-13.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93b8c2008f372379fb6e5d2b3f7c9ec32f7b80316543fd3a5ace6610c5cde1b0", size = 157843, upload-time = "2024-08-20T13:54:52.453Z" }, + { url = "https://files.pythonhosted.org/packages/b4/b7/2c991e51d48b1b98847d0a0b608508a3b687f215a2390f99cf0ee7dd2777/websockets-13.0-cp313-cp313-win32.whl", hash = "sha256:851fd0afb3bc0b73f7c5b5858975d42769a5fdde5314f4ef2c106aec63100687", size = 151763, upload-time = "2024-08-20T13:54:53.837Z" }, + { url = "https://files.pythonhosted.org/packages/bc/0f/f06ed6485cf9cdea7d89c2f6e9d19f1be963ba5d26fb79760bfd17dd4aa5/websockets-13.0-cp313-cp313-win_amd64.whl", hash = "sha256:7d14901fdcf212804970c30ab9ee8f3f0212e620c7ea93079d6534863444fb4e", size = 152197, upload-time = "2024-08-20T13:54:54.829Z" }, + { url = "https://files.pythonhosted.org/packages/b2/89/c0be9f09eea478659e9d936210ff03e6a2a3a8d4b8dfac6b1143ff646ded/websockets-13.0-py3-none-any.whl", hash = "sha256:dbbac01e80aee253d44c4f098ab3cc17c822518519e869b284cfbb8cd16cc9de", size = 142957, upload-time = "2024-08-20T13:55:44.363Z" }, +] From d60e75eede411c915c468d33922c70049c27c6f4 Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 21:15:58 +0100 Subject: [PATCH 06/15] printers: support camera and led toggles --- hackmap/urls.py | 2 ++ .../migrations/0003_printer_camera_url.py | 17 +++++++++ .../migrations/0004_printer_led_topic.py | 18 ++++++++++ labprinter/models.py | 2 ++ labprinter/views.py | 18 ++++++++++ static/css/printers.css | 36 +++++++++++++++++-- static/js/printers.js | 26 ++++++++++++++ templates/labprinter/printer_list.html | 7 +++- 8 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 labprinter/migrations/0003_printer_camera_url.py create mode 100644 labprinter/migrations/0004_printer_led_topic.py diff --git a/hackmap/urls.py b/hackmap/urls.py index 12bf95f..6cfc154 100644 --- a/hackmap/urls.py +++ b/hackmap/urls.py @@ -25,6 +25,8 @@ path("map", labmap.views.map), path("lights", labmap.views.lights), path("printers", labprinter.views.Printers.as_view()), + path("printers/lights/on", labprinter.views.lights_on), + path("printers/lights/off", labprinter.views.lights_off), re_path(r"lights/(?P[0-9,]+)/(?P[0-9.]+)", labmap.views.set_lights), re_path(r"lights/preset/(?P[A-z]+)", labmap.views.set_light_preset), path("", include("labdash.urls")), diff --git a/labprinter/migrations/0003_printer_camera_url.py b/labprinter/migrations/0003_printer_camera_url.py new file mode 100644 index 0000000..b5386c4 --- /dev/null +++ b/labprinter/migrations/0003_printer_camera_url.py @@ -0,0 +1,17 @@ +# Generated by Django 5.1 on 2026-08-01 19:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("labprinter", "0002_printer_color"), + ] + + operations = [ + migrations.AddField( + model_name="printer", + name="camera_url", + field=models.CharField(blank=True, default="", max_length=300), + ), + ] diff --git a/labprinter/migrations/0004_printer_led_topic.py b/labprinter/migrations/0004_printer_led_topic.py new file mode 100644 index 0000000..630d28e --- /dev/null +++ b/labprinter/migrations/0004_printer_led_topic.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1 on 2026-08-01 20:02 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('labprinter', '0003_printer_camera_url'), + ] + + operations = [ + migrations.AddField( + model_name='printer', + name='led_topic', + field=models.CharField(blank=True, default='', max_length=300), + ), + ] diff --git a/labprinter/models.py b/labprinter/models.py index 185487d..540a7ae 100644 --- a/labprinter/models.py +++ b/labprinter/models.py @@ -6,6 +6,8 @@ class Printer(models.Model): shortname = models.CharField(max_length=200) description = models.CharField(max_length=200) color = models.CharField(max_length=20, default="black") + camera_url = models.CharField(max_length=300, blank=True, default="") + led_topic = models.CharField(max_length=300, blank=True, default="") def __str__(self): return self.name diff --git a/labprinter/views.py b/labprinter/views.py index a96df6e..81fe88b 100644 --- a/labprinter/views.py +++ b/labprinter/views.py @@ -1,9 +1,27 @@ from django.shortcuts import render from labprinter.models import Printer from django.views.generic.list import ListView +import labdash.mqtt +from django.http import JsonResponse class Printers(ListView): model = Printer context_object_name = "printers" queryset = Printer.objects.all().order_by("shortname") + + +def lights_on(request): + mqtt = labdash.mqtt.client() + for printer in Printer.objects.all().exclude(led_topic__exact=""): + mqtt.publish(printer.led_topic, payload="1") + + return JsonResponse({"status": "ok"}) + + +def lights_off(request): + mqtt = labdash.mqtt.client() + for printer in Printer.objects.all().exclude(led_topic__exact=""): + mqtt.publish(printer.led_topic, payload="0") + + return JsonResponse({"status": "ok"}) diff --git a/static/css/printers.css b/static/css/printers.css index 906dd56..45232dc 100644 --- a/static/css/printers.css +++ b/static/css/printers.css @@ -5,7 +5,7 @@ --progress-outline: var(--color-foreground); --progress-bg: var(--color-background); --progress-fg: var(--color-bright-yellow); - --animation-length: 0.3s; + --animation-length: 0.2s; } main { @@ -23,6 +23,7 @@ main section { display: grid; opacity: 0.5; + transition: opacity var(--animation-length) linear; grid-template-columns: 100%; /* TODO: camera styling */ } @@ -34,6 +35,14 @@ main section .description { main section .info { padding: 0.8rem; } +main section .camera { + max-width: 100%; +} +main section .camera img { + display: block; + width: 80%; + margin: 1rem auto; +} main section progress { width: 100%; background: var(--progress-bg); @@ -43,14 +52,37 @@ main section progress { } } +main section .status, +main section progress { + transition: height var(--animation-length) linear, + margin var(--animation-length) linear, + opacity var(--animation-length) linear, + box-shadow var(--animation-length) linear; + margin: 0; +} + main section:not(.active) .status, main section:not(.active) progress { - display: none; + height: 0; + opacity: 0; } + main section.active { box-shadow: 0px 0px 2px 3px var(--active-outline-color); opacity: 1; } main section.active progress { border: 1px solid var(--progress-outline); + height: 1lh; +} +main section.active .status { + height: 1lh; + margin: 0.75lh 0; +} + +main section .camera { + width: 50%; + margin: 0 auto; + transition: width var(--animation-length) ease-in; } +main section.active .camera { width: 100%; } diff --git a/static/js/printers.js b/static/js/printers.js index 2cd8388..f06d2d6 100644 --- a/static/js/printers.js +++ b/static/js/printers.js @@ -9,6 +9,7 @@ const client = mqtt.connect(wsURL, { reconnectPeriod: 5000, connectTimeout: 30 * 1000, }); + client.on("connect", () => { console.log("mqtt connected"); @@ -70,3 +71,28 @@ client.on("error", (err) => { client.on("reconnect", () => { console.log("mqtt reconnecting..."); }); + + +let lightsOffTask = undefined; +function lights_on() { + $.ajax({ + url: '/printers/lights/on' + }); + + // Turn off after 20 seconds + if (lightsOffTask) + clearTimeout(lightsOffTask) + lightsOffTask = setTimeout(lights_off, 20 * 1000); +} + +function lights_off() { + $.ajax({ + url: '/printers/lights/off' + }); +} + +document.onkeydown = function (e) { + if (e.key == "a") { + lights_on() + } +}; diff --git a/templates/labprinter/printer_list.html b/templates/labprinter/printer_list.html index 4b81e6c..105026d 100644 --- a/templates/labprinter/printer_list.html +++ b/templates/labprinter/printer_list.html @@ -11,7 +11,7 @@
{% for printer in printers %}
-
+

{{ printer.name }}

{{ printer.description }}

@@ -22,6 +22,11 @@

{{ printer.name }}

+ {% if printer.camera_url %} +
+ Webcam Unavailable +
+ {% endif %}
{% endfor %}
From 1d9fc1f1a9ede67ac013904b8762ed2f0d17f40b Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 21:16:29 +0100 Subject: [PATCH 07/15] printers: order by priority field --- labprinter/migrations/0005_printer_priority.py | 18 ++++++++++++++++++ labprinter/models.py | 1 + labprinter/views.py | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 labprinter/migrations/0005_printer_priority.py diff --git a/labprinter/migrations/0005_printer_priority.py b/labprinter/migrations/0005_printer_priority.py new file mode 100644 index 0000000..c70d570 --- /dev/null +++ b/labprinter/migrations/0005_printer_priority.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1 on 2026-08-01 20:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('labprinter', '0004_printer_led_topic'), + ] + + operations = [ + migrations.AddField( + model_name='printer', + name='priority', + field=models.IntegerField(default=50), + ), + ] diff --git a/labprinter/models.py b/labprinter/models.py index 540a7ae..3a7c326 100644 --- a/labprinter/models.py +++ b/labprinter/models.py @@ -8,6 +8,7 @@ class Printer(models.Model): color = models.CharField(max_length=20, default="black") camera_url = models.CharField(max_length=300, blank=True, default="") led_topic = models.CharField(max_length=300, blank=True, default="") + priority = models.IntegerField(default=50) def __str__(self): return self.name diff --git a/labprinter/views.py b/labprinter/views.py index 81fe88b..883fa2c 100644 --- a/labprinter/views.py +++ b/labprinter/views.py @@ -8,7 +8,7 @@ class Printers(ListView): model = Printer context_object_name = "printers" - queryset = Printer.objects.all().order_by("shortname") + queryset = Printer.objects.all().order_by("priority") def lights_on(request): From 72879488ca539453005aa687a750a3ae5bdced9a Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 21:31:06 +0100 Subject: [PATCH 08/15] don't use broken temp sensors --- static/js/map.js | 1 - 1 file changed, 1 deletion(-) diff --git a/static/js/map.js b/static/js/map.js index 9034e6f..57d00ea 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -48,7 +48,6 @@ client.on("connect", () => { "doorman/+/user", "tool/+/user", "tool/+/status", // for when tool controllers are powered down - "environment/+/heating", "environment/+/elsys/temperature", "sensor/g1/temperature" ].forEach(key => { From ed138734ffc1db96b5ba92dd5421f3122cb8ae9f Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 21:33:55 +0100 Subject: [PATCH 09/15] no not that oops --- static/js/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/map.js b/static/js/map.js index 57d00ea..7521fbc 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -48,8 +48,8 @@ client.on("connect", () => { "doorman/+/user", "tool/+/user", "tool/+/status", // for when tool controllers are powered down + "environment/+/heating", "environment/+/elsys/temperature", - "sensor/g1/temperature" ].forEach(key => { console.log(`mqtt subscribe: ${key}`); client.subscribe(key); From a3a1fdfdb499d495f726b405761f078552f5e768 Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 21:37:52 +0100 Subject: [PATCH 10/15] fix temp readings on map --- static/js/map.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/static/js/map.js b/static/js/map.js index 7521fbc..c7b0d53 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -49,7 +49,11 @@ client.on("connect", () => { "tool/+/user", "tool/+/status", // for when tool controllers are powered down "environment/+/heating", - "environment/+/elsys/temperature", + "environment/g1/elsys/temperature", + "sensor/g11/temperature/28c893a704000068", + "sensor/g2/temperature/28c9b9a70400001a", + "sensor/g8/temperature/282c7da7040000e5", + "sensor/g14/temperature/28ff1097c4170523", ].forEach(key => { console.log(`mqtt subscribe: ${key}`); client.subscribe(key); @@ -116,10 +120,8 @@ client.on("message", (topic, message, packet) => { target: room, state: value, }; - } else if (topic.endsWith("/temperature")) { + } else if (topic.includes("temperature")) { var room = topic.split("/")[1]; - if (room === "g1" && topic.includes("elsys")) - return; msg = { display: "", From ed70023ec42f4cdf66babcc6f5109fd199f27fd3 Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 21:41:49 +0100 Subject: [PATCH 11/15] style tweaks --- static/css/printers.css | 5 +++++ templates/labprinter/printer_list.html | 1 + 2 files changed, 6 insertions(+) diff --git a/static/css/printers.css b/static/css/printers.css index 45232dc..4807b8f 100644 --- a/static/css/printers.css +++ b/static/css/printers.css @@ -13,6 +13,11 @@ main { margin: 0 auto; } +main > h1 { + text-align: center; + font-size: 3rem; +} + main section { box-sizing: border-box; margin-bottom: 2rem; diff --git a/templates/labprinter/printer_list.html b/templates/labprinter/printer_list.html index 105026d..ddcda24 100644 --- a/templates/labprinter/printer_list.html +++ b/templates/labprinter/printer_list.html @@ -9,6 +9,7 @@ {% block body %}
+

3D Printers

{% for printer in printers %}
From cd2ebf99c490bb216ef113b971cdec3140f95656 Mon Sep 17 00:00:00 2001 From: Aria Date: Sat, 1 Aug 2026 22:15:51 +0100 Subject: [PATCH 12/15] hide webcams on tab blur --- static/css/printers.css | 1 + static/js/printers.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/static/css/printers.css b/static/css/printers.css index 4807b8f..4da48d5 100644 --- a/static/css/printers.css +++ b/static/css/printers.css @@ -46,6 +46,7 @@ main section .camera { main section .camera img { display: block; width: 80%; + aspect-ratio: 1.7777; margin: 1rem auto; } main section progress { diff --git a/static/js/printers.js b/static/js/printers.js index f06d2d6..0b7a47d 100644 --- a/static/js/printers.js +++ b/static/js/printers.js @@ -96,3 +96,19 @@ document.onkeydown = function (e) { lights_on() } }; + +document.onblur = function (e) { + var targetElements = document.querySelectorAll('.camera img'); + for (var el of targetElements) { + el.dataset['src'] = el.src; + el.src = ''; + } +}; + +document.onfocus = function (e) { + var targetElements = document.querySelectorAll('.camera img'); + for (var el of targetElements) { + if (el.dataset['src']) + el.src = el.dataset['src']; + } +}; From d9c63cec6edfc0b1d61212f7d1e31a73e6fd85c9 Mon Sep 17 00:00:00 2001 From: Aria Date: Mon, 3 Aug 2026 21:39:50 +0100 Subject: [PATCH 13/15] resilience stuff (maybe) --- static/js/map.js | 3 ++- templates/labprinter/printer_list.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/map.js b/static/js/map.js index c7b0d53..19ce77c 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -6,7 +6,8 @@ const client = mqtt.connect(wsURL, { protocolVersion: 4, clean: true, reconnectPeriod: 5000, - connectTimeout: 30 * 1000, + connectTimeout: 15 * 1000, + reconnectOnConnackError: true, }); const mapElement = document.querySelector('#map'); diff --git a/templates/labprinter/printer_list.html b/templates/labprinter/printer_list.html index ddcda24..427e48e 100644 --- a/templates/labprinter/printer_list.html +++ b/templates/labprinter/printer_list.html @@ -25,7 +25,7 @@

{{ printer.name }}

{% if printer.camera_url %}
- Webcam Unavailable + Webcam Unavailable
{% endif %}
From 55679a8845530ee6e5783efb2614c66e8a28aabb Mon Sep 17 00:00:00 2001 From: Aria Date: Tue, 4 Aug 2026 22:16:42 +0100 Subject: [PATCH 14/15] fixed number of floating points for map temps --- static/js/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/map.js b/static/js/map.js index 19ce77c..5c6dc88 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -34,7 +34,7 @@ function updateElementState(msg) { if (msg.type === "heating") { el.innerHTML = msg.state !== "off" ? msg.state + "°" : ""; } else if (msg.type == "temperature") { - el.innerHTML = msg.state + "°"; + el.innerHTML = parseFloat(msg.state).toFixed(1) + "°"; } else { el.className.baseVal = [msg.target, msg.type, msg.state].join(' '); } From 76a121c432fceab5ebfb61be9634b61c5d49ee05 Mon Sep 17 00:00:00 2001 From: Aria Date: Fri, 7 Aug 2026 17:09:43 +0100 Subject: [PATCH 15/15] printers: fix fps, hopefully stop ooming --- static/js/printers.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/static/js/printers.js b/static/js/printers.js index 0b7a47d..a77ed04 100644 --- a/static/js/printers.js +++ b/static/js/printers.js @@ -91,6 +91,23 @@ function lights_off() { }); } +function update_cameras() { + $('.camera img').each(function() { + if (!this.src) + return; + + var url = URL.parse(this.src); + let params = url.searchParams; + params.set('cacheBusting', Date.now()); + url.search = params.toString(); + + this.src = url.toString(); + }); +} + +let fps = 5; +setInterval(update_cameras, 1000 / fps); + document.onkeydown = function (e) { if (e.key == "a") { lights_on()