diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bfea71f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +[*.{md,py}] +charset = utf-8 + +[*.py] +indent_style = space +indent_size = 4 + +[Makefile] +indent_style = tab diff --git a/README.md b/README.md index e69de29..eef35b7 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,33 @@ +# code-advent-2023 + +[Advent of Code](https://adventofcode.com/2023) problems of 2023. + +## Progress + +| Day | Name | Part 1 | Part 2 | +| :-: | :------------------ | :----: | :----: | +| 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 | | | | diff --git a/src/main.py b/src/main.py index 1a8824d..295ce68 100644 --- a/src/main.py +++ b/src/main.py @@ -3,8 +3,11 @@ import sys if __name__ == "__main__": if sys.argv.__len__() != 2: print("[ERROR] Only the day should be specified") + print(" $ python src/main.py 1") + print(" $ make DAY='1'") sys.exit(-1) - module_selected = __import__(f"calendar.day_{sys.argv[1]}", fromlist=[""]) + module_path = "modules.day_" + sys.argv[1] + module_selected = __import__(module_path, fromlist=[""]) module_selected.run() diff --git a/src/modules/__pycache__/day_1.cpython-314.pyc b/src/modules/__pycache__/day_1.cpython-314.pyc new file mode 100644 index 0000000..1877ccc Binary files /dev/null and b/src/modules/__pycache__/day_1.cpython-314.pyc differ diff --git a/src/calendar/day_1.py b/src/modules/day_1.py similarity index 100% rename from src/calendar/day_1.py rename to src/modules/day_1.py diff --git a/src/calendar/tests/__pycache__/test_day_1.cpython-314-pytest-9.1.1.pyc b/src/modules/tests/__pycache__/test_day_1.cpython-314-pytest-9.1.1.pyc similarity index 100% rename from src/calendar/tests/__pycache__/test_day_1.cpython-314-pytest-9.1.1.pyc rename to src/modules/tests/__pycache__/test_day_1.cpython-314-pytest-9.1.1.pyc diff --git a/src/calendar/tests/test_day_1.py b/src/modules/tests/test_day_1.py similarity index 100% rename from src/calendar/tests/test_day_1.py rename to src/modules/tests/test_day_1.py