Skip to content

Commit

Permalink
feat(2024): init day 07
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 7, 2024
1 parent 9a5e548 commit be5efba
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 2024/Day07/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# --- Day 0: Template ---

To be used as template for the other days.
Empty file added 2024/Day07/input.txt
Empty file.
Empty file added 2024/Day07/input_test.txt
Empty file.
16 changes: 16 additions & 0 deletions 2024/Day07/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os
import sys

sys.path.append(".")

from solutions import part1, part2

from utils.inputs import get_inputs
from utils.timings import profile_run

if __name__ == "__main__":
input_path = f"{os.path.dirname(os.path.realpath(__file__))}/input.txt"
inputs = get_inputs(input_path)

profile_run("Part 1", lambda: part1(inputs))
profile_run("Part 2", lambda: part2(inputs))
6 changes: 6 additions & 0 deletions 2024/Day07/solutions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def part1(inputs: list[str]) -> int:
return 1


def part2(inputs: list[str]) -> int:
return 2
30 changes: 30 additions & 0 deletions 2024/Day07/test_solutions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import os

import pytest
from solutions import part1, part2

from utils.inputs import get_inputs

current_dir = os.path.dirname(os.path.realpath(__file__))

input = get_inputs(f"{current_dir}/input.txt")
input_test = get_inputs(f"{current_dir}/input_test.txt")


class TestPart1:
def test_with_test_data(self):
assert part1(input_test) == 1

@pytest.mark.skip(reason="not implemented")
def test_with_real_data(self):
assert part1(input) == 1


class TestPart2:
@pytest.mark.skip(reason="not implemented")
def test_with_test_data(self):
assert part2(input_test) == 2

@pytest.mark.skip(reason="not implemented")
def test_with_real_data(self):
assert part2(input) == 2

0 comments on commit be5efba

Please sign in to comment.