Skip to content

Commit 37fdcd1

Browse files
committed
feat(aoc/2025): add init placeholder day 01/2025
1 parent 3c25667 commit 37fdcd1

5 files changed

Lines changed: 69 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## Day 01/2025: [Challenge](https://adventofcode.com/2025/day/1)
2+

advent_of_code/year_2025/day_01_/__init__.py

Whitespace-only changes.

advent_of_code/year_2025/day_01_/input_demo.txt

Whitespace-only changes.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
from utils.aoc_utils import get_input_file_path, read_input_file
2+
3+
def solve_day_01_2025(filename: str) -> tuple[int, int]:
4+
"""
5+
Solution of the Advent of Code 2025 Day 01 - ??????.
6+
:param filename: The name file containing the input data.
7+
:return:
8+
"""
9+
try:
10+
# Create the absolute path of the input file
11+
input_file_path = get_input_file_path(__file__, filename)
12+
# Read the input file
13+
data = read_input_file(input_file_path)
14+
except Exception as error:
15+
raise RuntimeError(f"Error: {error}")
16+
17+
# Solutions
18+
print("Day 01 - 2025:", data)
19+
20+
return 0, 0
21+
22+
23+
24+
if __name__ == "__main__":
25+
# Import function to print results
26+
import time
27+
from utils.aoc_utils import print_day_results
28+
29+
# Calculate results for demo and real input files
30+
demo_1, demo_2 = solve_day_01_2025("input_demo.txt")
31+
# start_time = time.time()
32+
# solution_1, solution_2 = solve_day_01_2025("input.txt")
33+
# end_time = time.time()
34+
#
35+
# # Calculate execution time in milliseconds
36+
# execution_time: int = int((end_time - start_time) * 1000)
37+
#
38+
# # Print results in a formatted table (using rich)
39+
# print_day_results(
40+
# "2024", "01",
41+
# str(demo_1), str(demo_2),
42+
# str(solution_1), str(solution_2),
43+
# execution_time
44+
# )
45+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import os
2+
from dotenv import load_dotenv
3+
from .solution_day_01_2025 import solve_day_01_2025
4+
5+
load_dotenv()
6+
environment = os.getenv("ENVIRONMENT")
7+
8+
filename_demo = "input_demo.txt"
9+
filename = "input.txt"
10+
current_dir = os.path.dirname(os.path.abspath(__file__))
11+
file_path_demo = os.path.join(current_dir, filename_demo)
12+
file_path = os.path.join(current_dir, filename)
13+
14+
15+
def test_day_01_2025():
16+
results_demo = solve_day_01_2025(file_path_demo)
17+
assert results_demo == (0, 0)
18+
if environment == "development":
19+
expected_results = (int(os.getenv("SOLUTION_01_DAY_01_2025")),
20+
int(os.getenv("SOLUTION_02_DAY_01_2025")))
21+
results = solve_day_01_2025(file_path)
22+
assert expected_results == results

0 commit comments

Comments
 (0)