adventofcode 25.4__py3-none-any.whl → 25.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
adventofcode/__about__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "25.4"
1
+ __version__ = "25.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adventofcode
3
- Version: 25.4
3
+ Version: 25.6
4
4
  Summary: Helper utilities for solving Advent of Code puzzles
5
5
  Project-URL: Documentation, https://github.com/anze3db/adventofcode#readme
6
6
  Project-URL: Issues, https://github.com/anze3db/adventofcode/issues
@@ -27,19 +27,37 @@ Requires-Dist: requests
27
27
  Requires-Dist: rich
28
28
  Description-Content-Type: text/markdown
29
29
 
30
- # adventofcode
30
+ # 🎄 adventofcode [![PyPI - Version](https://img.shields.io/pypi/v/adventofcode.svg)](https://pypi.org/project/adventofcode) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/adventofcode.svg)](https://pypi.org/project/adventofcode)
31
31
 
32
- Helper utilities for solving Advent of Code puzzles.
32
+ <p align="center">
33
+ <img width="742" height="613" alt="Screenshot 2025-12-02 at 10 04 42" src="https://github.com/user-attachments/assets/77b711b3-c2a2-4719-8d8a-083af2067c62" />
34
+ </p>
33
35
 
34
- * Project scaffolding with `uv run adventofcode init`
35
- * Assert and submit your solutions with `uv run adventofcode run`
36
- * Benchmark all your solutions with `uv run adventofcode benchmark`
36
+
37
+ ### Your framework for solving [Advent Of Code](https://adventofcode.com) puzzles 🧩 and benchmarking solutions 🚀
38
+
39
+ * Project scaffolding with `uv run adventofcode init`.
40
+ * Assert and submit your solutions with `uv run adventofcode run`.
41
+ * Benchmark all your solutions with `uv run adventofcode benchmark`.
37
42
  * No copy-pasting puzzle inputs or loading inputs from files.
38
- * Submit the answer immediately when your code returns the result 🏅
43
+ * Submit the answer immediately when your code returns the result. 🏅
44
+
45
+ ------
46
+
47
+ **Table of Contents**
48
+
49
+ - [Setup](#setup)
50
+ - [Session cookie](#session-cookie)
51
+ - [Run and submit your solution](#run-and-submit-your-solution)
52
+ - [Benchmark all your solutions](#benchmark-all-your-solutions)
53
+ - [Using AoC class](#using-aoc-class)
54
+ - [Happy solving 🎄](#happy-solving-)
55
+ - [Similar projects](#similar-projects)
39
56
 
40
- ## Usage
41
57
 
42
- ### Setup
58
+
59
+
60
+ ## Setup
43
61
 
44
62
  ```bash
45
63
  uv init
@@ -98,23 +116,12 @@ def part2(inp: str) -> str | int | None:
98
116
  return None
99
117
 
100
118
  ```
119
+ ## Session cookie
101
120
 
102
- Implement your solution in `part1` and `part2` functions and run
103
-
104
- ```bash
105
- uv run adventofcode run
106
- ```
107
-
108
- This will:
121
+ Before we can run these files we need to set up your session cookie. You can find the session cookie by going to [adventofcode.com] in your browser. Make sure you are logged in, then open your browser's developer tools and navigate to Application → Storage → Cookies. Look for the cookie named `session` and copy its value.
109
122
 
110
- * Run your `part1` function with the inputs provided in the `part1_asserts` iterable and compare them with the expected values. If the function's return value doesn't match the expected answer, the command will stop. *Hint*: Each puzzle usually contains example input and an expected answer—these make for great asserts!
111
- * If all the `part1_asserts` pass, `part1` will be called with your puzzle input fetched from adventofcode.com using your session cookie.
112
- * If `part1` returns a non-None value for your puzzle input, that value will be submitted to adventofcode.com as your part 1 answer using your session cookie. All answer submissions are cached, so each unique answer will only be submitted once.
113
- * If your answer was correct the same process repeats for `part2`.
114
123
 
115
- ### Set your session cookie
116
-
117
- Add the [adventofcode.com](https://adventofcode.com) session cookie value to your `.env` file:
124
+ Then add the [adventofcode.com](https://adventofcode.com) session cookie value to your `.env` file:
118
125
 
119
126
  ```
120
127
  # Set your Advent of Code session cookie below
@@ -131,10 +138,22 @@ or to your environment variables:
131
138
  export AOC_SESSION="..."
132
139
  ```
133
140
 
134
- > [!NOTE]
135
- > You can find the session cookie by going to adventofcode.com in your browser. Make sure you are logged in, then open your browser's developer tools and navigate to Application → Storage → Cookies. Look for the cookie named `session` and copy its value.
141
+ ## Run and submit your solution
136
142
 
137
- ### Benchmarks
143
+ Implement your solution in `part1` and `part2` functions and run
144
+
145
+ ```bash
146
+ uv run adventofcode run 01.py
147
+ ```
148
+
149
+ This will:
150
+
151
+ * Run your day 1, `part1` function with the inputs provided in the `part1_asserts` iterable and compare them with the expected values. If the function's return value doesn't match the expected answer, the command will stop. *Hint*: Each puzzle usually contains example input and an expected answer—these make for great asserts!
152
+ * If all the `part1_asserts` pass, `part1` will be called with your puzzle input fetched from adventofcode.com using your session cookie.
153
+ * If `part1` returns a non-None value for your puzzle input, that value will be submitted to adventofcode.com as your part 1 answer using your session cookie. All answer submissions are cached, so each unique answer will only be submitted once.
154
+ * If your answer was correct the same process repeats for `part2`.
155
+
156
+ ## Benchmark all your solutions
138
157
 
139
158
  You can benchmark your solutions with
140
159
 
@@ -144,44 +163,51 @@ uv run adventofcode benchmark
144
163
 
145
164
  This will run each day's solution and parse the timing results from the output. The results will be printed to the console as well as added to your README.md.
146
165
 
166
+ Example console output:
167
+
168
+
169
+
147
170
  Example README:
148
171
 
172
+ <!-- BENCHMARK_RESULTS_START -->
149
173
  | Day | Status | Part 1 Time | Part 2 Time | Total Time |
150
174
  |:---:|:------:|------------:|------------:|-----------:|
151
- | 01 | ✅ | 2.1ms 🟢 | 0.6ms 🟢 | 2.6ms 🟢 |
152
- | 02 | ✅ | 1.9ms 🟢 | 1.2ms 🟢 | 3.1ms 🟢 |
153
- | 03 | ✅ | 1.5ms 🟢 | 0.5ms 🟢 | 2.0ms 🟢 |
154
- | 04 | ✅ | 22.5ms 🟢 | 5.2ms 🟢 | 27.8ms 🟢 |
155
- | 05 | ✅ | 3.6ms 🟢 | 4.1ms 🟢 | 7.7ms 🟢 |
156
- | 06 | ✅ | 3.6ms 🟢 | 4.14s 🔴 | 4.14s 🔴 |
157
- | 07 | ✅ | 33.8ms 🟢 | 1.07s 🔴 | 1.11s 🔴 |
158
- | 08 | ✅ | 1.0ms 🟢 | 0.7ms 🟢 | 1.7ms 🟢 |
159
- | 09 | ✅ | 6.3ms 🟢 | 1.08s 🔴 | 1.09s 🔴 |
160
- | 10 | ✅ | 3.2ms 🟢 | 3.2ms 🟢 | 6.4ms 🟢 |
161
- | 11 | ✅ | 1.7ms 🟢 | 45.0ms 🟢 | 46.7ms 🟢 |
162
- | 12 | ✅ | 33.3ms 🟢 | 31.0ms 🟢 | 64.4ms 🟢 |
163
- | 13 | ✅ | 118.1ms 🟡 | 360.8ms 🟡 | 478.9ms 🟡 |
164
- | 14 | ✅ | 3.7ms 🟢 | 411.4ms 🟡 | 415.1ms 🟡 |
165
- | 15 | ✅ | 3.5ms 🟢 | 5.0ms 🟢 | 8.4ms 🟢 |
166
- | 16 | ✅ | 87.1ms 🟢 | 133.9ms 🟡 | 221.1ms 🟡 |
167
- | 17 | ✅ | 0.7ms 🟢 | 21.0ms 🟢 | 21.7ms 🟢 |
168
- | 18 | ✅ | 7.2ms 🟢 | 7.49s 🔴 | 7.50s 🔴 |
169
- | 19 | ✅ | 9.7ms 🟢 | 111.7ms 🟡 | 121.4ms 🟡 |
170
- | 20 | ✅ | 50.54s 🔴 | 4.46s 🔴 | 54.99s 🔴 |
171
- | 21 | ✅ | 0.4ms 🟢 | 0.3ms 🟢 | 0.8ms 🟢 |
172
- | 22 | ✅ | 603.7ms 🟡 | 1.90s 🔴 | 2.50s 🔴 |
173
- | 23 | ✅ | 255.0ms 🟡 | 263.4ms 🟡 | 518.4ms 🟡 |
174
- | 24 | ⚠️ | 1.4ms 🟢 | - | 1.4ms 🟢 |
175
- | 25 | ✅ | 7.2ms 🟢 | - | 7.2ms 🟢 |
176
- | **Total** | | 51.75s 🔴 | 21.53s 🔴 | 73.28s 🔴 |
175
+ | 01 | ✅ | 0.28ms 🟢 | 0.41ms 🟢 | 0.69ms 🟢 |
176
+ | 02 | ✅ | 0.76ms 🟢 | 1.13ms 🟢 | 1.89ms 🟢 |
177
+ | 03 | ✅ | 0.15ms 🟢 | 0.33ms 🟢 | 0.48ms 🟢 |
178
+ | 04 | ✅ | 21.43ms 🟢 | 4.79ms 🟢 | 26.22ms 🟢 |
179
+ | 05 | ✅ | 1.95ms 🟢 | 3.51ms 🟢 | 5.46ms 🟢 |
180
+ | 06 | ✅ | 3.04ms 🟢 | 3.91s 🔴 | 3.91s 🔴 |
181
+ | 07 | ✅ | 30.58ms 🟢 | 1.01s 🔴 | 1.04s 🔴 |
182
+ | 08 | ✅ | 0.42ms 🟢 | 0.60ms 🟢 | 1.02ms 🟢 |
183
+ | 09 | ✅ | 5.75ms 🟢 | 1.01s 🔴 | 1.02s 🔴 |
184
+ | 10 | ✅ | 2.85ms 🟢 | 3.05ms 🟢 | 5.90ms 🟢 |
185
+ | 11 | ✅ | 0.97ms 🟢 | 37.60ms 🟢 | 38.57ms 🟢 |
186
+ | 12 | ✅ | 30.75ms 🟢 | 31.96ms 🟢 | 62.71ms 🟢 |
187
+ | 13 | ✅ | 108.79ms 🟡 | 342.44ms 🟡 | 451.23ms 🟡 |
188
+ | 14 | ✅ | 3.03ms 🟢 | 380.22ms 🟡 | 383.25ms 🟡 |
189
+ | 15 | ✅ | 2.28ms 🟢 | 4.71ms 🟢 | 6.99ms 🟢 |
190
+ | 16 | ✅ | 80.55ms 🟢 | 124.54ms 🟡 | 205.09ms 🟡 |
191
+ | 17 | ✅ | 0.02ms 🟢 | 19.99ms 🟢 | 20.01ms 🟢 |
192
+ | 18 | ✅ | 5.66ms 🟢 | 6.98s 🔴 | 6.99s 🔴 |
193
+ | 19 | ✅ | 9.05ms 🟢 | 99.83ms 🟢 | 108.88ms 🟡 |
194
+ | 20 | ✅ | 47.46s 🔴 | 4.28s 🔴 | 51.74s 🔴 |
195
+ | 21 | ✅ | 0.22ms 🟢 | 0.25ms 🟢 | 0.47ms 🟢 |
196
+ | 22 | ✅ | 603.65ms 🟡 | 1.87s 🔴 | 2.47s 🔴 |
197
+ | 23 | ✅ | 223.80ms 🟡 | 222.87ms 🟡 | 446.67ms 🟡 |
198
+ | 24 | ⚠️ | 0.94ms 🟢 | - | 0.94ms 🟢 |
199
+ | 25 | ✅ | 6.02ms 🟢 | - | 6.02ms 🟢 |
200
+ | **Total** | | 48.60s 🔴 | 20.34s 🔴 | 68.94s 🔴 |
177
201
 
178
202
  Legend:
179
203
  * 🟢 < 100ms
180
204
  * 🟡 100ms - 1s
181
205
  * 🔴 > 1s
206
+ <!-- BENCHMARK_RESULTS_END -->
182
207
 
208
+ ## Using AoC class
183
209
 
184
- ### Alternatively, you can build your own workflow using the lower level AoC class
210
+ Alternatively, you can build your own workflow using the lower level AoC class
185
211
 
186
212
  ```python
187
213
  from adventofcode import AoC
@@ -199,7 +225,10 @@ aoc.print_p2() # prints the second part of the puzzle
199
225
  aoc.submit_p2('part 2 answer') # submits the answer to the second part of the puzzle
200
226
  ```
201
227
 
202
-
203
228
  ### Happy solving 🎄
204
229
 
205
230
  Enjoy and have fun!
231
+
232
+ ### Similar projects
233
+
234
+ * [elf](https://pypi.org/project/elf/)
@@ -0,0 +1,9 @@
1
+ adventofcode/__about__.py,sha256=wGmaA_0Eg5qc78mtYjz-_fyRfOYHu9H04iEm3hScm1A,21
2
+ adventofcode/__init__.py,sha256=Lyu-evu1YGwV94SThnt6-Bo4JP82Vt3JNRrCyjDd7w0,5533
3
+ adventofcode/cli.py,sha256=Ufj65ULzr_fz0l0NdnAVnIKcFgHAfP6LsRCWVd14qZ0,16422
4
+ adventofcode/utils.py,sha256=QJ2AanjoNt_yVI8VZM9plrl9cpHsEhl29NyA4Aqs8Ug,258
5
+ adventofcode-25.6.dist-info/METADATA,sha256=h1TYaCPYykDZOMoKgxjZK8JhAkoYBOtIvxnx5J1LJmc,7655
6
+ adventofcode-25.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
7
+ adventofcode-25.6.dist-info/entry_points.txt,sha256=Yw9pyDrVVS3XWRcjOv1BnAxkqtJdYoG747A1LysScak,83
8
+ adventofcode-25.6.dist-info/licenses/LICENSE,sha256=7w16SgIHVGYHh8TS_-XnKFvY6aKa_JDtVFoduWtIPTY,1069
9
+ adventofcode-25.6.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- adventofcode/__about__.py,sha256=u2olrcoiSx_e5LUioBrBIIk8i2hhHig6-r7KQ0xo4N4,21
2
- adventofcode/__init__.py,sha256=Lyu-evu1YGwV94SThnt6-Bo4JP82Vt3JNRrCyjDd7w0,5533
3
- adventofcode/cli.py,sha256=Ufj65ULzr_fz0l0NdnAVnIKcFgHAfP6LsRCWVd14qZ0,16422
4
- adventofcode/utils.py,sha256=QJ2AanjoNt_yVI8VZM9plrl9cpHsEhl29NyA4Aqs8Ug,258
5
- adventofcode-25.4.dist-info/METADATA,sha256=jQrNv1BQ4lcLrmjQMP7mAppw7z-kFAqCp6jhK6pPYmk,6494
6
- adventofcode-25.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
7
- adventofcode-25.4.dist-info/entry_points.txt,sha256=Yw9pyDrVVS3XWRcjOv1BnAxkqtJdYoG747A1LysScak,83
8
- adventofcode-25.4.dist-info/licenses/LICENSE,sha256=7w16SgIHVGYHh8TS_-XnKFvY6aKa_JDtVFoduWtIPTY,1069
9
- adventofcode-25.4.dist-info/RECORD,,