-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreate_Script.py
More file actions
38 lines (29 loc) · 894 Bytes
/
Copy pathCreate_Script.py
File metadata and controls
38 lines (29 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from pathlib import Path
from typing import Optional, Dict, Any, Tuple
from challenge_utils import ScriptBuilder
# Constants
PROBLEM_NO = 1
CHALLENGE = "No_1"
CHOSEN_LANGUAGE = "python"
AUTHOR = "Abbas Moosajee"
CONFIG_DICT = {
"Melody": ("Stories/Melody", "melody.json"),
"No_1": ("GridOS/No_1", "gridos_1.json"),
"2025": ("2025", "EC_2025.json")
}
def main() -> None:
"""Main function to create challenge files."""
repo_dir = Path(__file__).parent
folder, config_file = CONFIG_DICT[CHALLENGE]
challenge_dir = repo_dir / folder
try:
builder = ScriptBuilder(AUTHOR, challenge_dir, config_file)
filepath = builder.create_files(
prob_no=PROBLEM_NO,
language=CHOSEN_LANGUAGE,
txt_files=3,
)
except Exception as e:
print(f"An error occurred: {e}")
if __name__ == "__main__":
main()