From 639487ae590dc0afb3d4779af994565f7395ccf2 Mon Sep 17 00:00:00 2001 From: Mark Murnane Date: Sun, 21 Apr 2024 23:50:33 -0400 Subject: [PATCH 1/2] Removing sideboard imports --- Dockerfile | 3 ++- conftest.py | 1 - magstock/config.py | 6 +++--- requirements_test.txt | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 conftest.py diff --git a/Dockerfile b/Dockerfile index afa1696..849f9a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM ghcr.io/magfest/ubersystem:main +ENV uber_plugins=["magstock"] # install plugins COPY . plugins/magstock/ -RUN /app/env/bin/paver install_deps +RUN uv pip install --system -r plugins/magstock/requirements.txt diff --git a/conftest.py b/conftest.py deleted file mode 100644 index 4a79fe1..0000000 --- a/conftest.py +++ /dev/null @@ -1 +0,0 @@ -import sideboard diff --git a/magstock/config.py b/magstock/config.py index 86752c5..4e77844 100644 --- a/magstock/config.py +++ b/magstock/config.py @@ -1,13 +1,13 @@ from os.path import join +from pathlib import Path -from sideboard.lib import parse_config, request_cached_property -from uber.config import c, Config, dynamic +from uber.config import c, Config, dynamic, parse_config, request_cached_property from uber.menu import MenuItem from uber.models import Attendee, Session from magstock._version import __version__ # noqa: F401 -config = parse_config(__file__) +config = parse_config("magstock", Path(__file__).parents[0]) c.include_plugin_config(config) c.MENU.append_menu_item( diff --git a/requirements_test.txt b/requirements_test.txt index 7f9ed2c..7da7916 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -2,5 +2,4 @@ pytest>=3.0.1 mock>=1.0.1,<1.1 coverage>=3.6 --e "git+https://github.com/magfest/sideboard#egg=sideboard" -e "git+https://github.com/magfest/ubersystem#egg=uber" \ No newline at end of file From 756cbc03425fbbff3c207874d2d1a79ec95678eb Mon Sep 17 00:00:00 2001 From: Mark Murnane Date: Mon, 22 Apr 2024 00:27:50 -0400 Subject: [PATCH 2/2] Removing sideboard references --- magstock/model_checks.py | 1 - magstock/models.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/magstock/model_checks.py b/magstock/model_checks.py index 260e22f..25d34bb 100644 --- a/magstock/model_checks.py +++ b/magstock/model_checks.py @@ -3,7 +3,6 @@ from os.path import join from residue import CoerceUTF8 as UnicodeText -from sideboard.lib import parse_config from sqlalchemy.types import Boolean, Date from uber.api import AttendeeLookup from uber.config import c, Config diff --git a/magstock/models.py b/magstock/models.py index 2feaac6..4224f69 100644 --- a/magstock/models.py +++ b/magstock/models.py @@ -10,8 +10,6 @@ from magstock._version import __version__ # noqa: F401 -AttendeeLookup.fields_full['gets_food'] = True - @Session.model_mixin class Attendee: meal_plan = Column(Choice(c.MEAL_PLAN_OPTS), default=c.NO_FOOD) @@ -130,4 +128,6 @@ class Group: def dealer_badges_remaining(self): if self.status != c.APPROVED: return 0 - return 10 \ No newline at end of file + return 10 + +AttendeeLookup.fields_full['gets_food'] = True \ No newline at end of file