diff --git a/Dockerfile b/Dockerfile index 05b7dd5..d011b8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ ARG BRANCH=main FROM ghcr.io/magfest/ubersystem:${BRANCH} +ENV uber_plugins=["magprime"] # install plugins COPY . plugins/magprime/ -RUN /app/env/bin/paver install_deps +RUN uv pip install --system -r plugins/magprime/requirements.txt diff --git a/conftest.py b/conftest.py deleted file mode 100644 index fc54412..0000000 --- a/conftest.py +++ /dev/null @@ -1,2 +0,0 @@ -import sideboard - diff --git a/magprime/config.py b/magprime/config.py index 6828966..da71d41 100644 --- a/magprime/config.py +++ b/magprime/config.py @@ -1,12 +1,12 @@ -from sideboard.lib import parse_config, request_cached_property from collections import defaultdict from datetime import timedelta +from pathlib import Path -from uber.config import c, Config, dynamic +from uber.config import c, Config, dynamic, parse_config from uber.menu import MenuItem from uber.utils import localized_now -config = parse_config(__file__) +config = parse_config("magprime", Path(__file__).parents[0]) c.include_plugin_config(config) @Config.mixin diff --git a/magprime/configspec.ini b/magprime/configspec.ini index 172bee6..86ba74b 100644 --- a/magprime/configspec.ini +++ b/magprime/configspec.ini @@ -11,6 +11,7 @@ url = string(default="") [dates] superstar_deadline = string(default="2023-12-01") +rock_island_merch_deadline = string(default="2023-12-01") [enums] [[special_merch]] 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 diff --git a/test-defaults.ini b/test-defaults.ini deleted file mode 100644 index e69de29..0000000 diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 49b2011..0000000 --- a/tox.ini +++ /dev/null @@ -1,56 +0,0 @@ -# QUICK TIPS -# ========== -# -# Run all tests for all environments from the command line: -# $ tox -# -# -# Run all tests for a single environment from the command line: -# $ tox -e flake8 -# or: -# $ tox -e py34 -# -# -# Run only tests that match a substring expression, for a single environment: -# $ tox -e py34 -- -k expression -# -# -# In general, everything after the "--" is passed as arguments to py.test: -# $ tox -- -s -v -k expression -# -[tox] -envlist=flake8,py34 -skipsdist=True - -[testenv] -setenv= - SIDEBOARD_CONFIG_OVERRIDES=test-defaults.ini -deps= -rrequirements_test.txt -whitelist_externals= - /bin/bash - /bin/ln - /bin/rm -commands= - # "install" uber & magprime in plugins dir by creating symbolic links - rm -f {envdir}/src/sideboard/plugins/uber - rm -f {envdir}/src/sideboard/plugins/magprime - ln -s {envdir}/src/uber {envdir}/src/sideboard/plugins/uber - ln -s {toxinidir} {envdir}/src/sideboard/plugins/magprime - - # add uber as a priority plugin to our test configuration - rm -f {envdir}/src/sideboard/test.ini - bash -c "echo 'priority_plugins = uber,' > '{envdir}/src/sideboard/test.ini'" - - # run actual tests - coverage run --source magprime -m py.test {posargs} - coverage report --show-missing - - # clean up after ourselves - rm -f {envdir}/src/sideboard/plugins/uber - rm -f {envdir}/src/sideboard/plugins/magprime - rm -f {envdir}/src/sideboard/test.ini - -[testenv:flake8] -deps=flake8 -commands= - flake8 magprime/ tests/