Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions gateway/main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
"django.contrib.sites",
"django_prometheus",
"rest_framework",
"rest_framework.authtoken",
"rest_framework_simplejwt",
"allauth",
"allauth.socialaccount",
"api",
"psycopg2",
"drf_yasg",
Expand Down Expand Up @@ -172,7 +168,7 @@
"PORT": os.environ.get("DATABASE_PORT", "5432"),
},
"test": {
"ENGINE": "django_prometheus.db.backends.sqlite3",
'ENGINE': 'django.db.backends.sqlite3',
"NAME": BASE_DIR / "db.sqlite3",
},
}
Expand All @@ -197,10 +193,6 @@
},
]

AUTHENTICATION_BACKENDS = [
# `allauth` specific authentication methods, such as login by e-mail
"allauth.account.auth_backends.AuthenticationBackend",
]

# Internationalization
# https://docs.djangoproject.com/en/4.1/topics/i18n/
Expand Down Expand Up @@ -233,8 +225,8 @@
# =============
SETTINGS_AUTH_MECHANISM = os.environ.get("SETTINGS_AUTH_MECHANISM", "default")
SETTINGS_DEFAULT_AUTH_CLASSES = [
"rest_framework_simplejwt.authentication.JWTAuthentication",
"dj_rest_auth.jwt_auth.JWTCookieAuthentication",
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
]
ALL_AUTH_CLASSES_CONFIGURATION = {
"default": SETTINGS_DEFAULT_AUTH_CLASSES,
Expand Down
3 changes: 0 additions & 3 deletions gateway/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
cryptography>=44.0.3, <45
djangorestframework>=3.15.2, <4
django-allauth[socialaccount]>=0.61.1, <1
django-allow-cidr>=0.7.1, <1
dj-rest-auth>=5.0.2, <6
django-csp>=3.8, <4
djangorestframework-simplejwt>=5.3.1, <6
django_prometheus>=2.3.1, <3
ray[default]>=2.30.0, <3
Django>=4.2.20, <5
Expand Down
2 changes: 0 additions & 2 deletions gateway/tests/api/management/test_commands.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
"""Tests for commands."""

from allauth.socialaccount.models import SocialApp
from django.core.management import call_command
from ray.dashboard.modules.job.common import JobStatus
from rest_framework.test import APITestCase
from unittest.mock import patch, MagicMock
from django.contrib.sites.models import Site

from api.models import ComputeResource, Job
from api.ray import JobHandler
Expand Down
8 changes: 7 additions & 1 deletion gateway/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ commands =
skip_install = true
commands =
pip check
python manage.py makemigrations
python manage.py makemigrations

[testenv:migrate]
skip_install = true
commands =
pip check
python manage.py migrate
Loading