adventofcode 25.4__tar.gz → 25.5__tar.gz

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.
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Calendar Versioning](https://calver.org).
7
7
 
8
+ ## [25.5]
9
+
10
+ ### Fixed
11
+
12
+ * Readme improvements
13
+
8
14
  ## [25.4]
9
15
 
10
16
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adventofcode
3
- Version: 25.4
3
+ Version: 25.5
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,15 +27,22 @@ Requires-Dist: requests
27
27
  Requires-Dist: rich
28
28
  Description-Content-Type: text/markdown
29
29
 
30
- # adventofcode
30
+ # 🎄 adventofcode
31
31
 
32
- Helper utilities for solving Advent of Code puzzles.
33
32
 
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`
33
+ ## Your framework for solving and benchmarking Advent of Code puzzles 🧩
34
+
35
+ <p align="center">
36
+ <img src="https://github.com/user-attachments/assets/a00cec03-ab16-47c9-b9bf-a5c9162bcdfd" width="742" alt="benchmark results">
37
+ </p>
38
+
39
+ ## Features
40
+
41
+ * Project scaffolding with `uv run adventofcode init`.
42
+ * Assert and submit your solutions with `uv run adventofcode run`.
43
+ * Benchmark all your solutions with `uv run adventofcode benchmark`.
37
44
  * No copy-pasting puzzle inputs or loading inputs from files.
38
- * Submit the answer immediately when your code returns the result 🏅
45
+ * Submit the answer immediately when your code returns the result. 🏅
39
46
 
40
47
  ## Usage
41
48
 
@@ -102,12 +109,12 @@ def part2(inp: str) -> str | int | None:
102
109
  Implement your solution in `part1` and `part2` functions and run
103
110
 
104
111
  ```bash
105
- uv run adventofcode run
112
+ uv run adventofcode run 01.py
106
113
  ```
107
114
 
108
115
  This will:
109
116
 
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!
117
+ * 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!
111
118
  * If all the `part1_asserts` pass, `part1` will be called with your puzzle input fetched from adventofcode.com using your session cookie.
112
119
  * 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
120
  * If your answer was correct the same process repeats for `part2`.
@@ -144,42 +151,47 @@ uv run adventofcode benchmark
144
151
 
145
152
  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
153
 
154
+ Example console output:
155
+
156
+
157
+
147
158
  Example README:
148
159
 
160
+ <!-- BENCHMARK_RESULTS_START -->
149
161
  | Day | Status | Part 1 Time | Part 2 Time | Total Time |
150
162
  |:---:|:------:|------------:|------------:|-----------:|
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 🔴 |
163
+ | 01 | ✅ | 0.28ms 🟢 | 0.41ms 🟢 | 0.69ms 🟢 |
164
+ | 02 | ✅ | 0.76ms 🟢 | 1.13ms 🟢 | 1.89ms 🟢 |
165
+ | 03 | ✅ | 0.15ms 🟢 | 0.33ms 🟢 | 0.48ms 🟢 |
166
+ | 04 | ✅ | 21.43ms 🟢 | 4.79ms 🟢 | 26.22ms 🟢 |
167
+ | 05 | ✅ | 1.95ms 🟢 | 3.51ms 🟢 | 5.46ms 🟢 |
168
+ | 06 | ✅ | 3.04ms 🟢 | 3.91s 🔴 | 3.91s 🔴 |
169
+ | 07 | ✅ | 30.58ms 🟢 | 1.01s 🔴 | 1.04s 🔴 |
170
+ | 08 | ✅ | 0.42ms 🟢 | 0.60ms 🟢 | 1.02ms 🟢 |
171
+ | 09 | ✅ | 5.75ms 🟢 | 1.01s 🔴 | 1.02s 🔴 |
172
+ | 10 | ✅ | 2.85ms 🟢 | 3.05ms 🟢 | 5.90ms 🟢 |
173
+ | 11 | ✅ | 0.97ms 🟢 | 37.60ms 🟢 | 38.57ms 🟢 |
174
+ | 12 | ✅ | 30.75ms 🟢 | 31.96ms 🟢 | 62.71ms 🟢 |
175
+ | 13 | ✅ | 108.79ms 🟡 | 342.44ms 🟡 | 451.23ms 🟡 |
176
+ | 14 | ✅ | 3.03ms 🟢 | 380.22ms 🟡 | 383.25ms 🟡 |
177
+ | 15 | ✅ | 2.28ms 🟢 | 4.71ms 🟢 | 6.99ms 🟢 |
178
+ | 16 | ✅ | 80.55ms 🟢 | 124.54ms 🟡 | 205.09ms 🟡 |
179
+ | 17 | ✅ | 0.02ms 🟢 | 19.99ms 🟢 | 20.01ms 🟢 |
180
+ | 18 | ✅ | 5.66ms 🟢 | 6.98s 🔴 | 6.99s 🔴 |
181
+ | 19 | ✅ | 9.05ms 🟢 | 99.83ms 🟢 | 108.88ms 🟡 |
182
+ | 20 | ✅ | 47.46s 🔴 | 4.28s 🔴 | 51.74s 🔴 |
183
+ | 21 | ✅ | 0.22ms 🟢 | 0.25ms 🟢 | 0.47ms 🟢 |
184
+ | 22 | ✅ | 603.65ms 🟡 | 1.87s 🔴 | 2.47s 🔴 |
185
+ | 23 | ✅ | 223.80ms 🟡 | 222.87ms 🟡 | 446.67ms 🟡 |
186
+ | 24 | ⚠️ | 0.94ms 🟢 | - | 0.94ms 🟢 |
187
+ | 25 | ✅ | 6.02ms 🟢 | - | 6.02ms 🟢 |
188
+ | **Total** | | 48.60s 🔴 | 20.34s 🔴 | 68.94s 🔴 |
177
189
 
178
190
  Legend:
179
191
  * 🟢 < 100ms
180
192
  * 🟡 100ms - 1s
181
193
  * 🔴 > 1s
182
-
194
+ <!-- BENCHMARK_RESULTS_END -->
183
195
 
184
196
  ### Alternatively, you can build your own workflow using the lower level AoC class
185
197
 
@@ -199,7 +211,10 @@ aoc.print_p2() # prints the second part of the puzzle
199
211
  aoc.submit_p2('part 2 answer') # submits the answer to the second part of the puzzle
200
212
  ```
201
213
 
202
-
203
214
  ### Happy solving 🎄
204
215
 
205
216
  Enjoy and have fun!
217
+
218
+ ### Similar projects
219
+
220
+ * [elf](https://pypi.org/project/elf/)
@@ -1,12 +1,19 @@
1
- # adventofcode
1
+ # 🎄 adventofcode
2
2
 
3
- Helper utilities for solving Advent of Code puzzles.
4
3
 
5
- * Project scaffolding with `uv run adventofcode init`
6
- * Assert and submit your solutions with `uv run adventofcode run`
7
- * Benchmark all your solutions with `uv run adventofcode benchmark`
4
+ ## Your framework for solving and benchmarking Advent of Code puzzles 🧩
5
+
6
+ <p align="center">
7
+ <img src="https://github.com/user-attachments/assets/a00cec03-ab16-47c9-b9bf-a5c9162bcdfd" width="742" alt="benchmark results">
8
+ </p>
9
+
10
+ ## Features
11
+
12
+ * Project scaffolding with `uv run adventofcode init`.
13
+ * Assert and submit your solutions with `uv run adventofcode run`.
14
+ * Benchmark all your solutions with `uv run adventofcode benchmark`.
8
15
  * No copy-pasting puzzle inputs or loading inputs from files.
9
- * Submit the answer immediately when your code returns the result 🏅
16
+ * Submit the answer immediately when your code returns the result. 🏅
10
17
 
11
18
  ## Usage
12
19
 
@@ -73,12 +80,12 @@ def part2(inp: str) -> str | int | None:
73
80
  Implement your solution in `part1` and `part2` functions and run
74
81
 
75
82
  ```bash
76
- uv run adventofcode run
83
+ uv run adventofcode run 01.py
77
84
  ```
78
85
 
79
86
  This will:
80
87
 
81
- * 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!
88
+ * 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!
82
89
  * If all the `part1_asserts` pass, `part1` will be called with your puzzle input fetched from adventofcode.com using your session cookie.
83
90
  * 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.
84
91
  * If your answer was correct the same process repeats for `part2`.
@@ -115,42 +122,47 @@ uv run adventofcode benchmark
115
122
 
116
123
  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.
117
124
 
125
+ Example console output:
126
+
127
+
128
+
118
129
  Example README:
119
130
 
131
+ <!-- BENCHMARK_RESULTS_START -->
120
132
  | Day | Status | Part 1 Time | Part 2 Time | Total Time |
121
133
  |:---:|:------:|------------:|------------:|-----------:|
122
- | 01 | ✅ | 2.1ms 🟢 | 0.6ms 🟢 | 2.6ms 🟢 |
123
- | 02 | ✅ | 1.9ms 🟢 | 1.2ms 🟢 | 3.1ms 🟢 |
124
- | 03 | ✅ | 1.5ms 🟢 | 0.5ms 🟢 | 2.0ms 🟢 |
125
- | 04 | ✅ | 22.5ms 🟢 | 5.2ms 🟢 | 27.8ms 🟢 |
126
- | 05 | ✅ | 3.6ms 🟢 | 4.1ms 🟢 | 7.7ms 🟢 |
127
- | 06 | ✅ | 3.6ms 🟢 | 4.14s 🔴 | 4.14s 🔴 |
128
- | 07 | ✅ | 33.8ms 🟢 | 1.07s 🔴 | 1.11s 🔴 |
129
- | 08 | ✅ | 1.0ms 🟢 | 0.7ms 🟢 | 1.7ms 🟢 |
130
- | 09 | ✅ | 6.3ms 🟢 | 1.08s 🔴 | 1.09s 🔴 |
131
- | 10 | ✅ | 3.2ms 🟢 | 3.2ms 🟢 | 6.4ms 🟢 |
132
- | 11 | ✅ | 1.7ms 🟢 | 45.0ms 🟢 | 46.7ms 🟢 |
133
- | 12 | ✅ | 33.3ms 🟢 | 31.0ms 🟢 | 64.4ms 🟢 |
134
- | 13 | ✅ | 118.1ms 🟡 | 360.8ms 🟡 | 478.9ms 🟡 |
135
- | 14 | ✅ | 3.7ms 🟢 | 411.4ms 🟡 | 415.1ms 🟡 |
136
- | 15 | ✅ | 3.5ms 🟢 | 5.0ms 🟢 | 8.4ms 🟢 |
137
- | 16 | ✅ | 87.1ms 🟢 | 133.9ms 🟡 | 221.1ms 🟡 |
138
- | 17 | ✅ | 0.7ms 🟢 | 21.0ms 🟢 | 21.7ms 🟢 |
139
- | 18 | ✅ | 7.2ms 🟢 | 7.49s 🔴 | 7.50s 🔴 |
140
- | 19 | ✅ | 9.7ms 🟢 | 111.7ms 🟡 | 121.4ms 🟡 |
141
- | 20 | ✅ | 50.54s 🔴 | 4.46s 🔴 | 54.99s 🔴 |
142
- | 21 | ✅ | 0.4ms 🟢 | 0.3ms 🟢 | 0.8ms 🟢 |
143
- | 22 | ✅ | 603.7ms 🟡 | 1.90s 🔴 | 2.50s 🔴 |
144
- | 23 | ✅ | 255.0ms 🟡 | 263.4ms 🟡 | 518.4ms 🟡 |
145
- | 24 | ⚠️ | 1.4ms 🟢 | - | 1.4ms 🟢 |
146
- | 25 | ✅ | 7.2ms 🟢 | - | 7.2ms 🟢 |
147
- | **Total** | | 51.75s 🔴 | 21.53s 🔴 | 73.28s 🔴 |
134
+ | 01 | ✅ | 0.28ms 🟢 | 0.41ms 🟢 | 0.69ms 🟢 |
135
+ | 02 | ✅ | 0.76ms 🟢 | 1.13ms 🟢 | 1.89ms 🟢 |
136
+ | 03 | ✅ | 0.15ms 🟢 | 0.33ms 🟢 | 0.48ms 🟢 |
137
+ | 04 | ✅ | 21.43ms 🟢 | 4.79ms 🟢 | 26.22ms 🟢 |
138
+ | 05 | ✅ | 1.95ms 🟢 | 3.51ms 🟢 | 5.46ms 🟢 |
139
+ | 06 | ✅ | 3.04ms 🟢 | 3.91s 🔴 | 3.91s 🔴 |
140
+ | 07 | ✅ | 30.58ms 🟢 | 1.01s 🔴 | 1.04s 🔴 |
141
+ | 08 | ✅ | 0.42ms 🟢 | 0.60ms 🟢 | 1.02ms 🟢 |
142
+ | 09 | ✅ | 5.75ms 🟢 | 1.01s 🔴 | 1.02s 🔴 |
143
+ | 10 | ✅ | 2.85ms 🟢 | 3.05ms 🟢 | 5.90ms 🟢 |
144
+ | 11 | ✅ | 0.97ms 🟢 | 37.60ms 🟢 | 38.57ms 🟢 |
145
+ | 12 | ✅ | 30.75ms 🟢 | 31.96ms 🟢 | 62.71ms 🟢 |
146
+ | 13 | ✅ | 108.79ms 🟡 | 342.44ms 🟡 | 451.23ms 🟡 |
147
+ | 14 | ✅ | 3.03ms 🟢 | 380.22ms 🟡 | 383.25ms 🟡 |
148
+ | 15 | ✅ | 2.28ms 🟢 | 4.71ms 🟢 | 6.99ms 🟢 |
149
+ | 16 | ✅ | 80.55ms 🟢 | 124.54ms 🟡 | 205.09ms 🟡 |
150
+ | 17 | ✅ | 0.02ms 🟢 | 19.99ms 🟢 | 20.01ms 🟢 |
151
+ | 18 | ✅ | 5.66ms 🟢 | 6.98s 🔴 | 6.99s 🔴 |
152
+ | 19 | ✅ | 9.05ms 🟢 | 99.83ms 🟢 | 108.88ms 🟡 |
153
+ | 20 | ✅ | 47.46s 🔴 | 4.28s 🔴 | 51.74s 🔴 |
154
+ | 21 | ✅ | 0.22ms 🟢 | 0.25ms 🟢 | 0.47ms 🟢 |
155
+ | 22 | ✅ | 603.65ms 🟡 | 1.87s 🔴 | 2.47s 🔴 |
156
+ | 23 | ✅ | 223.80ms 🟡 | 222.87ms 🟡 | 446.67ms 🟡 |
157
+ | 24 | ⚠️ | 0.94ms 🟢 | - | 0.94ms 🟢 |
158
+ | 25 | ✅ | 6.02ms 🟢 | - | 6.02ms 🟢 |
159
+ | **Total** | | 48.60s 🔴 | 20.34s 🔴 | 68.94s 🔴 |
148
160
 
149
161
  Legend:
150
162
  * 🟢 < 100ms
151
163
  * 🟡 100ms - 1s
152
164
  * 🔴 > 1s
153
-
165
+ <!-- BENCHMARK_RESULTS_END -->
154
166
 
155
167
  ### Alternatively, you can build your own workflow using the lower level AoC class
156
168
 
@@ -170,7 +182,10 @@ aoc.print_p2() # prints the second part of the puzzle
170
182
  aoc.submit_p2('part 2 answer') # submits the answer to the second part of the puzzle
171
183
  ```
172
184
 
173
-
174
185
  ### Happy solving 🎄
175
186
 
176
187
  Enjoy and have fun!
188
+
189
+ ### Similar projects
190
+
191
+ * [elf](https://pypi.org/project/elf/)
@@ -0,0 +1 @@
1
+ __version__ = "25.5"
@@ -1 +0,0 @@
1
- __version__ = "25.4"
File without changes
File without changes
File without changes
File without changes