Skip to content

Commit 0155244

Browse files
authored
Merge pull request #122 from wimglenn/2.0.1
renamed default example parser plugins
2 parents b3e604b + a3a106a commit 0155244

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

aocd/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def main():
5858
"--example-parser",
5959
nargs="?",
6060
choices=plugins,
61-
const="aocd_examples_canned",
61+
const="reference",
6262
help="get the example(s) data, if any",
6363
)
6464
if len(users) > 1:

aocd/examples.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def _get_unique_real_inputs(year, day):
147147
def main():
148148
"""
149149
Summarize an example parser's results with historical puzzles' prose, and
150-
compare the performance against a reference implementation (aocd_examples_canned)
150+
compare the performance against a reference implementation
151151
"""
152152
try:
153153
from rich.console import Console
@@ -166,12 +166,13 @@ def main():
166166
"-e",
167167
"--example-parser",
168168
choices=list(plugins),
169-
default="aocd_examples_canned",
169+
default="reference",
170170
help="plugin to use for example extraction testing (default: %(default)s)",
171171
)
172172
parser.add_argument(
173173
"-y",
174174
"--years",
175+
metavar="2015+",
175176
nargs="+",
176177
help="years to run the parser against (can specify multiple)",
177178
choices=all_years,

aocd/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def examples(self):
243243
"""
244244
return self._get_examples()
245245

246-
def _get_examples(self, parser_name="aocd_examples_canned"):
246+
def _get_examples(self, parser_name="reference"):
247247
# invoke a named example parser to extract examples from cached prose.
248248
# logs warning and returns an empty list if the parser plugin raises an
249249
# exception for any reason.
@@ -824,7 +824,7 @@ def _load_users():
824824

825825

826826
@cache
827-
def _load_example_parser(group="adventofcode.examples", name="aocd_examples_canned"):
827+
def _load_example_parser(group="adventofcode.examples", name="reference"):
828828
# lazy-loads a plugin used to parse sample data, and cache it
829829
try:
830830
# Python 3.10+ - group/name selectable entry points

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "advent-of-code-data"
7-
version = "2.0.0"
7+
version = "2.0.1"
88
description = "Get your puzzle data with a single import"
99
requires-python = ">=3.9"
1010
classifiers = [
@@ -19,7 +19,7 @@ dependencies = [
1919
"pebble",
2020
"urllib3",
2121
'tzdata ; platform_system == "Windows"',
22-
"aocd-example-parser >= 2023.1",
22+
"aocd-example-parser >= 2023.2",
2323
]
2424

2525
[[project.authors]]

0 commit comments

Comments
 (0)