{"id":17192124,"url":"https://github.com/jdevera/advent-of-code-2023","last_synced_at":"2025-12-31T14:44:59.196Z","repository":{"id":210309980,"uuid":"726261246","full_name":"jdevera/advent-of-code-2023","owner":"jdevera","description":"My Workspace and solutions for AoC '23","archived":false,"fork":false,"pushed_at":"2023-12-07T12:53:57.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T06:35:24.723Z","etag":null,"topics":["advent-of-code","advent-of-code-2023"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdevera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-01T22:17:48.000Z","updated_at":"2023-12-06T22:34:19.000Z","dependencies_parsed_at":"2025-01-30T06:10:31.098Z","dependency_job_id":"8b56c28f-003d-475b-a931-de5bdf48b39f","html_url":"https://github.com/jdevera/advent-of-code-2023","commit_stats":null,"previous_names":["jdevera/advent-of-code-2023"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jdevera/advent-of-code-2023","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdevera%2Fadvent-of-code-2023","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdevera%2Fadvent-of-code-2023/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdevera%2Fadvent-of-code-2023/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdevera%2Fadvent-of-code-2023/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdevera","download_url":"https://codeload.github.com/jdevera/advent-of-code-2023/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdevera%2Fadvent-of-code-2023/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265810399,"owners_count":23831951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code","advent-of-code-2023"],"created_at":"2024-10-15T01:28:19.489Z","updated_at":"2025-12-31T14:44:59.170Z","avatar_url":"https://github.com/jdevera.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\nThis is Jacobo de Vera's Advent Of Code 2023 Workbench.\n\n\u003e [!WARNING]\n\u003e ⚠️ **SPOILER ALERT**: This repository contains my solutions (but not my input) ⚠️\n\n# How does this work\nThere is a launcher written in Python that assumes Python is used for\nthe solution.\n\n```shell\ncd src\npython -m aoc --help\n```\n\n## Day folders\nEach day is a Python module under `src/aoc/days` called `dayXX` where `XX` is the\nday number with leading zeroes.\n\nThe day to run can be chosen in the launcher with the `--day X` option (it does\nnot need the leading zeroes.) By default, the launcher will run today's solvers\n(if it's December.)\n\n## Puzzle Parts\n\nEach day puzzle has two parts. The day module needs to expose two functions,\none for each part, they are called `solve_first` and `solve_second`.\n\nThese functions:\n* Take a single parameter with the input file in a `pathlib.Path` object.\n* Return either the solution as a string or `None`, if the solution is not yet\n  implemented.\n\nThe launcher can choose which of those to run with the \n`--part {first,second,all}` parameter.\n\n## Input data\n\nThe launcher expects your daily puzzle input to be in a file called `input` under `src/aoc/days/dayXX/data` within the\ndirectory of the day. This is the file it will pass to the solvers by default.\n\nA different input file can be passed to the solvers by specifying it in the command line with the `--input` flag.\n\n# Solving a puzzle\n\nLet's assume Python is the language of choice. The day starts with a module\nthat has stubs for the two solvers under `src/aoc/days/dayXX/__init__.py`.\n\n## Tests\n\nEach day starts with four tests under the `test` directory of the day, which\nare marked as expected to fail:\n\n1. A test that runs your first solver with the first example input\n1. A test that runs your second solver with the second example input\n1. A test that runs your first solver with the full puzzle input\n1. A test that runs your second solver with the full puzzle input\n\nWhen starting with a solver, start with entering example data to the example\ntest, so you can run it with every change and check results.\n\nYou can run tests with pytest or with `python -m aoc test`, which will run\npytest for you.\n\nDon't forget to clear the `xfail` marker once you have started working on a\nday's puzzle.\n\n## ~~Printing~~ Logging\nEach day module has a logger configured at its top level, it's called `log`.\nWhen the launcher runs with the `--debug` option, it's set to DEBUG level.\n\nUse `log.debug` instead of `print`.\n\n## Solution\nReturn the solution *as a string*, the launcher will pretty print it for easy\ncopying into the puzzle form on the AoC website.\n\n# Using other languages\n\nThe launcher will call a Python module with the described parameters and expect\na string or None as the result. What happens inside is up to the person\nimplementing that day's puzzle solution.\n\nTo make things easier, there is this:\n\n`from aoc.utils import run_external_solver`\n\nWhich will run any program you want and take the solution from `stdout`.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdevera%2Fadvent-of-code-2023","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdevera%2Fadvent-of-code-2023","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdevera%2Fadvent-of-code-2023/lists"}