adventofcode 25.10__tar.gz → 25.11__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.11]
9
+
10
+ ### Fixed
11
+
12
+ * Variant column not showing for certain file patterns
13
+
8
14
  ## [25.10]
9
15
 
10
16
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: adventofcode
3
- Version: 25.10
3
+ Version: 25.11
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
@@ -0,0 +1 @@
1
+ __version__ = "25.11"
@@ -158,12 +158,23 @@ def split_day_name(day_name: str) -> tuple[str, str]:
158
158
  '01' -> ('01', '')
159
159
  '01-alt' -> ('01', 'alt')
160
160
  '03-numpy' -> ('03', 'numpy')
161
+ '03_numpy' -> ('03', 'numpy')
162
+ 'numpy03' -> ('03', 'numpy')
163
+ 'fast03numpy' -> ('03', 'fast-numpy')
161
164
  """
162
- match = re.match(r"(\d\d)(?:-(.+))?", day_name)
165
+ match = re.search(r"(\d\d)", day_name)
163
166
  if match:
164
167
  day_num = match.group(1)
165
- variant = match.group(2) or ""
168
+ # Extract parts before and after the day number
169
+ before = day_name[: match.start()].rstrip("-_")
170
+ after = day_name[match.end() :].lstrip("-_")
171
+ # Combine before and after parts with a hyphen if both exist
172
+ if before and after:
173
+ variant = f"{before}-{after}"
174
+ else:
175
+ variant = before or after
166
176
  return day_num, variant
177
+
167
178
  return day_name, ""
168
179
 
169
180
 
@@ -0,0 +1,28 @@
1
+ import pytest
2
+
3
+ from src.adventofcode.cli import split_day_name
4
+
5
+
6
+ def test_version():
7
+ from src.adventofcode.__about__ import __version__ # noqa: PLC0415
8
+
9
+ assert __version__
10
+
11
+
12
+ @pytest.mark.parametrize(
13
+ ("day_name", "expected"),
14
+ [
15
+ ("01", ("01", "")),
16
+ ("01-alt", ("01", "alt")),
17
+ ("03-numpy", ("03", "numpy")),
18
+ ("03_numpy", ("03", "numpy")),
19
+ ("fast-03", ("03", "fast")),
20
+ ("maybe-03-fast", ("03", "maybe-fast")),
21
+ ("fast03", ("03", "fast")),
22
+ ("maybe03fast", ("03", "maybe-fast")),
23
+ ("maybe_03_fast", ("03", "maybe-fast")),
24
+ ("numpy03", ("03", "numpy")),
25
+ ],
26
+ )
27
+ def test_split_day_name(day_name: str, expected: tuple[str, str]):
28
+ assert split_day_name(day_name) == expected
@@ -1 +0,0 @@
1
- __version__ = "25.10"
@@ -1,4 +0,0 @@
1
- def test_version():
2
- from src.adventofcode.__about__ import __version__ # noqa: PLC0415
3
-
4
- assert __version__
File without changes
File without changes
File without changes