feat: requirements analysis, submission checks (stability stress test), AI inspection pipeline

This commit is contained in:
hyh
2026-08-31 13:47:29 +08:00
parent a9bbe2f9b4
commit eaffeb58f5
17 changed files with 1218 additions and 8 deletions
+48 -1
View File
@@ -8,12 +8,59 @@ load_dotenv(BASE_DIR / ".env")
SECRET_KEY = os.getenv("SECRET_KEY", "django-insecure-dev-only-change-me")
DEBUG = os.getenv("DEBUG", "true").lower() in ("1", "true", "yes")
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "*").split(",")
INSTALLED_APPS = ["django.contrib.contenttypes", "django.contrib.auth"]
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]
MIDDLEWARE = [
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
]
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.contenttypes",
"django.contrib.auth",
"django.contrib.sessions",
"django.contrib.messages",
"rest_framework",
"rest_framework.authtoken",
"requirements",
"submissions",
]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
LLM_BASE_URL = ""
LLM_API_KEY = "sk-test"
LLM_MODEL = "test-model"
MAX_UPLOAD_SIZE_MB = 200
STABILITY_BASE_DURATION = 30
STABILITY_RAMPUP_DURATION = 60
STABILITY_CONCURRENCY = 20
WORKSPACE_DIR = Path(__file__).parent / "workspace"
ROOT_URLCONF = "ojplatform.urls"
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": [
"rest_framework.authentication.SessionAuthentication",
"rest_framework.authentication.TokenAuthentication",
],
"DEFAULT_PERMISSION_CLASSES": [
"rest_framework.permissions.IsAuthenticated",
],
}
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
USE_TZ = True