Verified Commit bf295171 authored by Peter Stanko's avatar Peter Stanko
Browse files

Removed project pre/post/sched config from DB and moved to file

parent eb129b17
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -626,10 +626,7 @@ id: string, +
project: {id:string, name: string}, +
project: {id:string, name: string}, +
test_files_source: string, +
test_files_source: string, +
file_whitelist: string, +
file_whitelist: string, +
pre_submit_script: string, +
post_submit_script: string, +
submission_parameters: string, +
submission_parameters: string, +
submission_scheduler_config: string, +
submissions_allowed_from: string, + (dátum)
submissions_allowed_from: string, + (dátum)
submissions_allowed_to: string, + (dátum)
submissions_allowed_to: string, + (dátum)
archive_from: string, + (dátum)
archive_from: string, + (dátum)
@@ -640,10 +637,7 @@ archive_from: string, + (dátum)
project: {id:string, name: string}, +
project: {id:string, name: string}, +
test_files_source: string, +
test_files_source: string, +
file_whitelist: string, +
file_whitelist: string, +
pre_submit_script: string, +
post_submit_script: string, +
submission_parameters: string, +
submission_parameters: string, +
submission_scheduler_config: string, +
submissions_allowed_from: string, + (dátum)
submissions_allowed_from: string, + (dátum)
submissions_allowed_to: string, + (dátum)
submissions_allowed_to: string, + (dátum)
archive_from: string, + (dátum)}
archive_from: string, + (dátum)}
+1 −3
Original line number Original line Diff line number Diff line
@@ -15,9 +15,7 @@ def create_project(factory, test_course, name: str, submit_configurable=False):
            file_whitelist="*.*",
            file_whitelist="*.*",
            test_files_source='git@gitlab.fi.muni.cz:xstanko2/pb071-mini-template.git',
            test_files_source='git@gitlab.fi.muni.cz:xstanko2/pb071-mini-template.git',
            test_files_subdir=name,
            test_files_subdir=name,
            pre_submit_script="",
            config_subdir='kontr2',
            post_submit_script="",
            submission_scheduler_config="",
            submission_parameters="{\"type\":\"text\"}",
            submission_parameters="{\"type\":\"text\"}",
            submissions_allowed_from=time.current_time() - timedelta(days=1),
            submissions_allowed_from=time.current_time() - timedelta(days=1),
            submissions_allowed_to=time.current_time() + timedelta(days=300),
            submissions_allowed_to=time.current_time() + timedelta(days=300),
+1 −3
Original line number Original line Diff line number Diff line
@@ -14,9 +14,7 @@ def create_project(factory, test_course, name: str):
            file_whitelist="*.*",
            file_whitelist="*.*",
            test_files_source='git@gitlab.fi.muni.cz:xstanko2/kontr2-tests.git',
            test_files_source='git@gitlab.fi.muni.cz:xstanko2/kontr2-tests.git',
            test_files_subdir=name,
            test_files_subdir=name,
            pre_submit_script="",
            config_subdir="kontr2",
            post_submit_script="",
            submission_scheduler_config="",
            submission_parameters="{\"type\":\"text\"}",
            submission_parameters="{\"type\":\"text\"}",
            submissions_allowed_from=time.current_time() - timedelta(days=1),
            submissions_allowed_from=time.current_time() - timedelta(days=1),
            submissions_allowed_to=time.current_time() + timedelta(days=10),
            submissions_allowed_to=time.current_time() + timedelta(days=10),
+4 −12
Original line number Original line Diff line number Diff line
@@ -12,9 +12,7 @@ from portal.tools import time
def get_project(factory: DataFactory, course: Course, num: int):
def get_project(factory: DataFactory, course: Course, num: int):
    project_config = dict(
    project_config = dict(
        file_whitelist="main.cpp",
        file_whitelist="main.cpp",
        pre_submit_script="python for kontr pre",
        config_subdir='kontr2',
        post_submit_script="python for kontr post",
        submission_scheduler_config="python for sub Q",
        submission_parameters="{\"type\":\"text\"}",
        submission_parameters="{\"type\":\"text\"}",
        submissions_allowed_from=time.current_time(),
        submissions_allowed_from=time.current_time(),
        submissions_allowed_to=time.current_time() + timedelta(days=2),
        submissions_allowed_to=time.current_time() + timedelta(days=2),
@@ -65,9 +63,7 @@ def init_dev_data(app: Flask, db: SQLAlchemy):
                file_whitelist="*.*",
                file_whitelist="*.*",
                test_files_source='https://gitlab.fi.muni.cz/grp-kontr2/testing/hello-test-files',
                test_files_source='https://gitlab.fi.muni.cz/grp-kontr2/testing/hello-test-files',
                test_files_subdir='',
                test_files_subdir='',
                pre_submit_script="python for kontr pre",
                config_subdir='kontr2',
                post_submit_script="python for kontr post",
                submission_scheduler_config="python for sub Q",
                submission_parameters="{\"type\":\"text\"}",
                submission_parameters="{\"type\":\"text\"}",
                submissions_allowed_from=time.current_time() - timedelta(days=1),
                submissions_allowed_from=time.current_time() - timedelta(days=1),
                submissions_allowed_to=time.current_time() + timedelta(days=10),
                submissions_allowed_to=time.current_time() + timedelta(days=10),
@@ -81,9 +77,7 @@ def init_dev_data(app: Flask, db: SQLAlchemy):
                file_whitelist="main.cpp\nfunc.hpp\nfunc.cpp",
                file_whitelist="main.cpp\nfunc.hpp\nfunc.cpp",
                test_files_source='https://gitlab.fi.muni.cz/grp-kontr2/testing/hello-test-files',
                test_files_source='https://gitlab.fi.muni.cz/grp-kontr2/testing/hello-test-files',
                test_files_subdir='',
                test_files_subdir='',
                pre_submit_script="python for kontr pre",
                config_subdir='kontr2',
                post_submit_script="python for kontr post",
                submission_scheduler_config="python for sub Q",
                submission_parameters="{\"type\":\"text\"}",
                submission_parameters="{\"type\":\"text\"}",
                submissions_allowed_from=time.current_time() - timedelta(days=1),
                submissions_allowed_from=time.current_time() - timedelta(days=1),
                submissions_allowed_to=time.current_time() + timedelta(days=10),
                submissions_allowed_to=time.current_time() + timedelta(days=10),
@@ -96,9 +90,7 @@ def init_dev_data(app: Flask, db: SQLAlchemy):
                file_whitelist="main.c",
                file_whitelist="main.c",
                test_files_source='https://gitlab.fi.muni.cz/grp-kontr2/testing/test-repo',
                test_files_source='https://gitlab.fi.muni.cz/grp-kontr2/testing/test-repo',
                test_files_subdir='',
                test_files_subdir='',
                pre_submit_script="python for kontr pre",
                config_subdir='kontr2',
                post_submit_script="python for kontr post",
                submission_scheduler_config="python for sub Q",
                submission_parameters="{\"type\":\"text\"}",
                submission_parameters="{\"type\":\"text\"}",
                submissions_allowed_from=time.current_time() - timedelta(days=1),
                submissions_allowed_from=time.current_time() - timedelta(days=1),
                submissions_allowed_to=time.current_time() - timedelta(minutes=1),
                submissions_allowed_to=time.current_time() - timedelta(minutes=1),
+8 −0
Original line number Original line Diff line number Diff line
pre:

post: !include post-config.yml


scheduler:
  repo_max_size: 10000000 # 10 MB
  repo_visibility: private # it is required that repository should be private
 No newline at end of file
Loading