mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 09:47:09 +00:00
Merge branch 'master' of gitlab.prodcontest.ru:team-15/project
This commit is contained in:
@@ -19,15 +19,17 @@ docker compose up
|
|||||||
* `/admin/grafana` - графана
|
* `/admin/grafana` - графана
|
||||||
* `/docs` - обучающие материалы по анализу данных
|
* `/docs` - обучающие материалы по анализу данных
|
||||||
|
|
||||||
После запуска по методу выше создается пользователь в админке (`/admin/`) с данными ниже:`admin`
|
После запуска по методу выше создается пользователь в админке (`/admin/`) с данными ниже:
|
||||||
- `admin` - логин
|
|
||||||
- `proooooood` - пароль
|
|
||||||
|
|
||||||
|
* `admin` - логин
|
||||||
|
* `proooooood` - пароль
|
||||||
|
|
||||||
## Тесты
|
## Тесты
|
||||||
|
|
||||||
Написаны unit-тесты (на базе Django TestCase) и E2E (Postman коллекция)
|
Написаны unit-тесты (на базе Django TestCase) и E2E (Postman коллекция). Они покрывают flow регистрации, просмотра и участия в соревновании.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
![django test]()
|
Ниже можно увидеть Coverage тестами бекенда данного приложения
|
||||||
|
|
||||||
|

|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 142 KiB |
@@ -520,8 +520,8 @@ users = [
|
|||||||
"role": UserRole.STUDENT.value,
|
"role": UserRole.STUDENT.value,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"email": "oleg-tinkov@gmail.com",
|
"email": "s.bliznyuk@tbank.ru",
|
||||||
"username": "oleg-tinkov",
|
"username": "s_bliznyuk",
|
||||||
"password": "password123!",
|
"password": "password123!",
|
||||||
"role": UserRole.STUDENT.value,
|
"role": UserRole.STUDENT.value,
|
||||||
},
|
},
|
||||||
@@ -697,16 +697,13 @@ class Command(BaseCommand):
|
|||||||
points=task["points"],
|
points=task["points"],
|
||||||
submission_reviewers_count=task[
|
submission_reviewers_count=task[
|
||||||
"submission_reviewers_count"
|
"submission_reviewers_count"
|
||||||
],
|
] if task["type"] == CompetitionTask.CompetitionTaskType.REVIEW.value else None,
|
||||||
|
correct_answer_file=task["correct_answer_file"] if task["type"] != CompetitionTask.CompetitionTaskType.REVIEW.value else None,
|
||||||
max_attempts=task.get("max_attempts"),
|
max_attempts=task.get("max_attempts"),
|
||||||
)
|
)
|
||||||
competitions[i]["tasks"][j]["obj"] = task_obj
|
competitions[i]["tasks"][j]["obj"] = task_obj
|
||||||
|
|
||||||
if (
|
|
||||||
task["type"]
|
|
||||||
== CompetitionTask.CompetitionTaskType.INPUT.value
|
|
||||||
):
|
|
||||||
task_obj.correct_answer_file = task["correct_answer_file"]
|
|
||||||
if task.get("attachment"):
|
if task.get("attachment"):
|
||||||
CompetitionTaskAttachment.objects.create(
|
CompetitionTaskAttachment.objects.create(
|
||||||
task=task_obj,
|
task=task_obj,
|
||||||
|
|||||||
+105
-11
@@ -1,6 +1,13 @@
|
|||||||
import React, { useRef, useEffect, useState } from 'react';
|
import React, { useRef, useEffect, useState } from 'react';
|
||||||
import * as monaco from 'monaco-editor';
|
import * as monaco from 'monaco-editor';
|
||||||
import { Copy, Check } from 'lucide-react';
|
import { Copy, Check, Info } from 'lucide-react';
|
||||||
|
import {
|
||||||
|
Dialog,
|
||||||
|
DialogContent,
|
||||||
|
DialogHeader,
|
||||||
|
DialogTitle,
|
||||||
|
DialogTrigger,
|
||||||
|
} from "@/components/ui/dialog";
|
||||||
|
|
||||||
interface CodeSolutionProps {
|
interface CodeSolutionProps {
|
||||||
answer: string;
|
answer: string;
|
||||||
@@ -92,16 +99,103 @@ const CodeSolution: React.FC<CodeSolutionProps> = ({
|
|||||||
<div className="bg-white rounded-lg overflow-hidden border border-gray-200">
|
<div className="bg-white rounded-lg overflow-hidden border border-gray-200">
|
||||||
<div className="flex items-center justify-between bg-gray-50 px-4 py-2 border-b border-gray-200">
|
<div className="flex items-center justify-between bg-gray-50 px-4 py-2 border-b border-gray-200">
|
||||||
<div className="text-sm font-medium text-gray-600">{languageDisplay}</div>
|
<div className="text-sm font-medium text-gray-600">{languageDisplay}</div>
|
||||||
<button
|
<div className="flex items-center space-x-3">
|
||||||
onClick={copyToClipboard}
|
<Dialog>
|
||||||
className="flex items-center text-sm text-gray-500 hover:text-gray-700 transition-colors"
|
<DialogTrigger asChild>
|
||||||
>
|
<button
|
||||||
{copied ? (
|
className="flex items-center text-sm text-gray-500 hover:text-gray-700 transition-colors"
|
||||||
<Check className="w-4 h-4 mr-1" />
|
title="Информация о среде выполнения"
|
||||||
) : (
|
>
|
||||||
<Copy className="w-4 h-4 mr-1" />
|
<Info className="w-4 h-4" />
|
||||||
)}
|
</button>
|
||||||
</button>
|
</DialogTrigger>
|
||||||
|
<DialogContent className="sm:max-w-md">
|
||||||
|
<DialogHeader>
|
||||||
|
<DialogTitle className="text-xl font-semibold">Информация о среде выполнения</DialogTitle>
|
||||||
|
</DialogHeader>
|
||||||
|
|
||||||
|
<div className="mt-4 space-y-6">
|
||||||
|
<div>
|
||||||
|
<h3 className="text-lg font-semibold mb-3 text-indigo-700 border-b pb-2">Ограничения</h3>
|
||||||
|
<ul className="space-y-3 text-gray-700">
|
||||||
|
<li className="flex items-start">
|
||||||
|
<div className="bg-indigo-100 p-1.5 rounded-full mr-3 mt-0.5">
|
||||||
|
<div className="w-1.5 h-1.5 bg-indigo-500 rounded-full"></div>
|
||||||
|
</div>
|
||||||
|
Максимум 1 посылка в 10 секунд
|
||||||
|
</li>
|
||||||
|
<li className="flex items-start">
|
||||||
|
<div className="bg-indigo-100 p-1.5 rounded-full mr-3 mt-0.5">
|
||||||
|
<div className="w-1.5 h-1.5 bg-indigo-500 rounded-full"></div>
|
||||||
|
</div>
|
||||||
|
Максимальный размер решения 4MB
|
||||||
|
</li>
|
||||||
|
<li className="flex items-start">
|
||||||
|
<div className="bg-indigo-100 p-1.5 rounded-full mr-3 mt-0.5">
|
||||||
|
<div className="w-1.5 h-1.5 bg-indigo-500 rounded-full"></div>
|
||||||
|
</div>
|
||||||
|
Максимальное время работы программы 1 минута
|
||||||
|
</li>
|
||||||
|
<li className="flex items-start">
|
||||||
|
<div className="bg-indigo-100 p-1.5 rounded-full mr-3 mt-0.5">
|
||||||
|
<div className="w-1.5 h-1.5 bg-indigo-500 rounded-full"></div>
|
||||||
|
</div>
|
||||||
|
Выделяется 512MB на решение
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h3 className="text-lg font-semibold mb-3 text-indigo-700 border-b pb-2">Доступные библиотеки</h3>
|
||||||
|
<div className="bg-gray-50 p-4 rounded-md font-mono text-sm">
|
||||||
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-2">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<span className="text-indigo-600 font-semibold">pandas</span>
|
||||||
|
<span className="text-gray-500 ml-2">2.2.3</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center">
|
||||||
|
<span className="text-indigo-600 font-semibold">numpy</span>
|
||||||
|
<span className="text-gray-500 ml-2">2.2.3</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center">
|
||||||
|
<span className="text-indigo-600 font-semibold">matplotlib</span>
|
||||||
|
<span className="text-gray-500 ml-2">3.10.1</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center">
|
||||||
|
<span className="text-indigo-600 font-semibold">scipy</span>
|
||||||
|
<span className="text-gray-500 ml-2">1.15.2</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center">
|
||||||
|
<span className="text-indigo-600 font-semibold">scikit-learn</span>
|
||||||
|
<span className="text-gray-500 ml-2">1.6.1</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center">
|
||||||
|
<span className="text-indigo-600 font-semibold">seaborn</span>
|
||||||
|
<span className="text-gray-500 ml-2">0.13.2</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center">
|
||||||
|
<span className="text-indigo-600 font-semibold">statsmodels</span>
|
||||||
|
<span className="text-gray-500 ml-2">0.14.4</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
|
||||||
|
<button
|
||||||
|
onClick={copyToClipboard}
|
||||||
|
className="flex items-center text-sm text-gray-500 hover:text-gray-700 transition-colors"
|
||||||
|
title="Копировать код"
|
||||||
|
>
|
||||||
|
{copied ? (
|
||||||
|
<Check className="w-4 h-4" />
|
||||||
|
) : (
|
||||||
|
<Copy className="w-4 h-4" />
|
||||||
|
)}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="p-4">
|
<div className="p-4">
|
||||||
|
|||||||
Reference in New Issue
Block a user