diff --git a/requirements.txt b/requirements.txt index 55ed02db3..c9a4353fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ numpy==2.2.2 XlsxWriter==3.2.2 +PyYAML==6.0.2 diff --git a/scoreboard/data/performance.yml b/scoreboard/data/performance.yml new file mode 100644 index 000000000..e4d741028 --- /dev/null +++ b/scoreboard/data/performance.yml @@ -0,0 +1 @@ +performance: diff --git a/scoreboard/data/plagiarism.yml b/scoreboard/data/plagiarism.yml new file mode 100644 index 000000000..3a4d581a4 --- /dev/null +++ b/scoreboard/data/plagiarism.yml @@ -0,0 +1,8 @@ +plagiarism: + mpi: [] + omp: [] + seq: + - broken_example + stl: [] + tbb: [] + all: [] diff --git a/scoreboard/data/threads-config.yml b/scoreboard/data/threads-config.yml new file mode 100644 index 000000000..1c950787b --- /dev/null +++ b/scoreboard/data/threads-config.yml @@ -0,0 +1,40 @@ +scoreboard: + task: + mpi: + solution: + max: 0 + performance: + max: 0 + visible: true + omp: + solution: + max: 6 + performance: + max: 3 + visible: true + seq: + solution: + max: 4 + performance: + max: 0 + visible: true + stl: + solution: + max: 8 + performance: + max: 6 + visible: true + tbb: + solution: + max: 6 + performance: + max: 3 + visible: true + all: + solution: + max: 10 + performance: + max: 8 + visible: true + plagiarism: + coefficient: 0.5 diff --git a/scoreboard/main.py b/scoreboard/main.py index 241cc8eb0..c40344763 100644 --- a/scoreboard/main.py +++ b/scoreboard/main.py @@ -1,6 +1,7 @@ from pathlib import Path from collections import defaultdict import argparse +import yaml task_types = ['all', 'mpi', 'omp', 'seq', 'stl', 'tbb'] @@ -18,7 +19,15 @@ else: directories[task_name][task_type] = "done" -print(directories) +config_path = Path(__file__).parent / "data" / "threads-config.yml" +assert config_path.exists(), f"Config file not found: {config_path}" +with open(config_path, 'r') as file: + cfg = yaml.safe_load(file) +assert cfg, "Configuration is empty" +plagiarism_config_path = Path(__file__).parent / "data" / "plagiarism.yml" +with open(plagiarism_config_path, 'r') as file: + plagiarism_cfg = yaml.safe_load(file) +assert plagiarism_cfg, "Plagiarism configuration is empty" columns = ''.join(['