Skip to content

Commit 0f3eb8f

Browse files
committed
Update tags
1 parent aa040db commit 0f3eb8f

File tree

14 files changed

+38
-14
lines changed

14 files changed

+38
-14
lines changed

Diff for: lib/2015/day_01.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2015.Day01 do
33
--- Day 1: Not Quite Lisp ---
44
Problem Link: https://adventofcode.com/2015/day/1
55
Difficulty: xs
6-
Tags: sequential
6+
Tags: sequence
77
"""
88
alias AdventOfCode.Helpers.InputReader
99

Diff for: lib/2015/day_02.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2015.Day02 do
33
--- Day 2: I Was Told There Would Be No Math ---
44
Problem Link: https://adventofcode.com/2015/day/2
55
Difficulty: xs
6-
Tags: geometry2D
6+
Tags: geometry2d
77
"""
88
alias AdventOfCode.Helpers.{InputReader, Transformers}
99

Diff for: lib/2015/day_13.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2015.Day13 do
33
--- Day 13: Knights of the Dinner Table ---
44
Problem Link: https://adventofcode.com/2015/day/13
55
Difficulty: s
6-
Tags: brute-force permutations slow
6+
Tags: brute-force combinatorics slow
77
"""
88
alias AdventOfCode.Helpers.{InputReader, Transformers}
99

Diff for: lib/2015/day_19.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2015.Day19 do
33
--- Day 19: Medicine for Rudolph ---
44
Problem Link: https://adventofcode.com/2015/day/19
55
Difficulty: m
6-
Tags: not-fast-enough revisit vector random-access-list
6+
Tags: not-fast-enough revisit vector random-access
77
88
Helpful Tips for Part II: (,) analogy
99
https://www.reddit.com/r/adventofcode/comments/3xflz8/day_19_solutions/cy4etju

Diff for: lib/2018/day_06.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2018.Day06 do
33
--- Day 6: Chronal Coordinates ---
44
Problem Link: https://adventofcode.com/2018/day/6
55
Difficulty: s
6-
Tags: not-fast-enough grid distance bounded-box
6+
Tags: not-fast-enough grid measurement bounded-box
77
"""
88
@type point :: {integer(), integer()}
99
@type points :: list(point())

Diff for: lib/2019/day_03.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2019.Day03 do
33
--- Day 3: Crossed Wires ---
44
Problem Link: https://adventofcode.com/2019/day/3
55
Difficulty: xs
6-
Tags: grid navigation set not-fast-enough
6+
Tags: grid walk set not-fast-enough
77
"""
88
alias AdventOfCode.Helpers.{InputReader, Transformers}
99

Diff for: lib/2021/day_03.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2021.Day03 do
33
--- Day 3: Binary Diagnostic ---
44
Problem Link: https://adventofcode.com/2021/day/3
55
Difficulty: s
6-
Tags: computation
6+
Tags: calculation
77
"""
88
alias AdventOfCode.Helpers.InputReader
99

Diff for: lib/2022/day_06.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2022.Day06 do
33
--- Day 6: Tuning Trouble ---
44
Problem Link: https://adventofcode.com/2022/day/6
55
Difficulty: xs
6-
Tags: binary-manipulation set
6+
Tags: bitwise set
77
"""
88
alias AdventOfCode.Helpers.InputReader
99

Diff for: lib/2022/day_09.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2022.Day09 do
33
--- Day 9: Rope Bridge ---
44
Problem Link: https://adventofcode.com/2022/day/9
55
Difficulty: m
6-
Tags: erlang grid grid-walk
6+
Tags: erlang grid walk
77
"""
88
alias AdventOfCode.Helpers.InputReader
99

Diff for: lib/2022/day_19.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2022.Day19 do
33
--- Day 19: Not Enough Minerals ---
44
Problem Link: https://adventofcode.com/2022/day/19
55
Difficulty: xl
6-
Tags: erlang slow revisit navigation maximization
6+
Tags: erlang slow revisit grid walk optimization
77
"""
88
alias AdventOfCode.Helpers.InputReader
99

Diff for: lib/2022/day_23.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2022.Day23 do
33
--- Day 23: Unstable Diffusion ---
44
Problem Link: https://adventofcode.com/2022/day/23
55
Difficulty: m
6-
Tags: erlang slow grid2d grid-walk
6+
Tags: erlang slow grid walk
77
"""
88
alias AdventOfCode.Helpers.InputReader
99

Diff for: lib/2023/day_08.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2023.Day08 do
33
--- Day 8: Haunted Wasteland ---
44
Problem Link: https://adventofcode.com/2023/day/8
55
Difficulty: s
6-
Tags: arithmetic lcd sequence
6+
Tags: arithmetic sequence
77
"""
88
alias AdventOfCode.Helpers.{InputReader, Transformers}
99

Diff for: lib/2023/day_09.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule AdventOfCode.Y2023.Day09 do
33
--- Day 9: Mirage Maintenance ---
44
Problem Link: https://adventofcode.com/2023/day/9
55
Difficulty: xs
6-
Tags: sequence reduce
6+
Tags: sequence reduction
77
"""
88
alias AdventOfCode.Helpers.{InputReader, Transformers}
99

Diff for: lib/helpers/meta.ex

+25-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,36 @@ defmodule AdventOfCode.Helpers.Meta do
77

88
@year_range 2015..AdventOfCode.get_latest_year()
99

10+
@doc """
11+
Returns data of all solutions.
12+
"""
1013
def solutions_summary do
1114
for year <- @year_range, into: %{} do
1215
{year, get_info(year, true)}
1316
end
1417
end
1518

19+
@doc """
20+
Returns all the tags that is created. This is useful to run on the REPL and dedupe similar tags with typos.
21+
"""
22+
def all_tags, do: enlist_attr_type(:tag_summary)
23+
24+
@doc """
25+
Returns all the difficulty levels that were added. This is useful to run on the REPL and fix typos.
26+
"""
27+
def all_difficulties, do: enlist_attr_type(:difficulty_summary)
28+
29+
defp enlist_attr_type(attr) do
30+
@year_range
31+
|> Enum.map(&get_info/1)
32+
|> Enum.flat_map(&Map.keys(&1[attr]))
33+
|> Enum.sort()
34+
|> Enum.dedup()
35+
end
36+
37+
@doc """
38+
Gets solutions metadata for given year. Returns either as a map or keyword tuple
39+
"""
1640
def get_info(year, as_map \\ false) do
1741
daywise_summary =
1842
for day <- 1..25 do
@@ -87,7 +111,7 @@ defmodule AdventOfCode.Helpers.Meta do
87111
end
88112
end
89113

90-
def get_metadata(year, day) do
114+
defp get_metadata(year, day) do
91115
"Elixir.AdventOfCode.Y#{year}.Day#{padded(day)}"
92116
|> String.to_existing_atom()
93117
|> Code.fetch_docs()

0 commit comments

Comments
 (0)