Compare commits

..

No commits in common. "e70af2376be4228f1506d3a288fd002b5dc3a673" and "77512fc73cc890c78864efc7246f10e9e4d2bab7" have entirely different histories.

3 changed files with 2 additions and 35 deletions

View file

@ -1,11 +0,0 @@
when:
- event: push
branch: main
steps:
- name: lint-and-test
image: debian
commands:
- pip install -r requirements/test.txt
- ruff check src
- python -m pytest

View file

@ -4,15 +4,6 @@ from configurations import Configuration
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
class EnableDebug(Configuration):
"""
Intended as a MIXIN
"""
DEBUG = True
INSTALLED_APPS = Configuration.INSTALLED_APPS + ["django_debug_toolbar"]
class Base(Configuration): class Base(Configuration):
DEBUG = False DEBUG = False
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
@ -31,7 +22,7 @@ class Base(Configuration):
USE_TZ = True USE_TZ = True
class Dev(EnableDebug, Base): class Dev(Base):
# Dangerous: disable host header validation # Dangerous: disable host header validation
ALLOWED_HOSTS = ["*"] ALLOWED_HOSTS = ["*"]
DATABASES = { DATABASES = {
@ -40,6 +31,7 @@ class Dev(EnableDebug, Base):
"NAME": "db.sqlite3", "NAME": "db.sqlite3",
}, },
} }
DEBUG = True
INSTALLED_APPS = Base.INSTALLED_APPS + ["django_extensions"] INSTALLED_APPS = Base.INSTALLED_APPS + ["django_extensions"]

View file

@ -3,7 +3,6 @@
import os import os
import sys import sys
from pathlib import Path
def main(): def main():
@ -12,19 +11,6 @@ def main():
from configurations.management import execute_from_command_line from configurations.management import execute_from_command_line
try:
import pip_lock
except ModuleNotFoundError:
raise ModuleNotFoundError(
"Couldn't import pip-lock. Are you on the right virtualenv and up to date?"
)
requirements_path = str(Path(__file__).parent.parent / "requirements/base.txt")
pip_lock.check_requirements(
requirements_path,
post_text="\nRun the following:\n\npython -m pip install -r requirements/base.txt\n",
)
execute_from_command_line(sys.argv) execute_from_command_line(sys.argv)