-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from SELab-2/extra_checks
Extra checks
- Loading branch information
Showing
18 changed files
with
336 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
- model: api.extracheck | ||
pk: 1 | ||
fields: | ||
project: 123456 | ||
run_script: 'scripts/run.sh' | ||
|
||
- model: api.fileextension | ||
pk: 1 | ||
fields: | ||
extension: 'class' | ||
extension: "class" | ||
- model: api.fileextension | ||
pk: 2 | ||
fields: | ||
extension: 'png' | ||
extension: "png" | ||
- model: api.fileextension | ||
pk: 3 | ||
fields: | ||
extension: 'java' | ||
extension: "java" | ||
- model: api.fileextension | ||
pk: 4 | ||
fields: | ||
extension: 'py' | ||
extension: "py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
from api.models.checks import DockerImage | ||
from api.models.submission import ErrorTemplates | ||
from django.db import migrations, models | ||
from ypovoli.settings import FILE_PATHS | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0007_merge_20240313_0639'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="dockerimage", | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=256, blank=False, null=False)), | ||
('file_path', models.FileField(upload_to=FILE_PATHS["docker_images"], max_length=256, blank=False, null=False)), | ||
('custom', models.BooleanField(default=False, blank=False, null=False)), | ||
] | ||
), | ||
migrations.CreateModel( | ||
name="errortemplate", | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('message_key', models.CharField(max_length=256, blank=False, null=False)), | ||
] | ||
), | ||
migrations.RemoveField( | ||
model_name="extracheck", | ||
name="run_script", | ||
), | ||
migrations.AddField( | ||
model_name="extracheck", | ||
name="docker_image_id", | ||
field=models.ForeignKey(to="api.dockerimage", on_delete=models.CASCADE, related_name="extra_checks"), | ||
), | ||
migrations.AddField( | ||
model_name="extracheck", | ||
name="file_path", | ||
field=models.CharField(max_length=256, blank=False, null=False) | ||
), | ||
migrations.AddField( | ||
model_name="extracheck", | ||
name="timeout", | ||
field=models.SmallIntegerField(default=300, blank=False, null=False) | ||
), | ||
migrations.AddField( | ||
model_name="extracheck", | ||
name="show_log", | ||
field=models.BooleanField(default=True, blank=False, null=False) | ||
), | ||
migrations.AddField( | ||
model_name="extrachecksresult", | ||
name="error_message", | ||
field=models.ForeignKey(to="api.errortemplate", on_delete=models.CASCADE, | ||
related_name="extra_checks_results", blank=True, null=True) | ||
), | ||
migrations.AddField( | ||
model_name="extrachecksresult", | ||
name="log_file", | ||
field=models.CharField(max_length=256, blank=False, null=True) | ||
) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.