Skip to content

Commit 5c538b8

Browse files
saisri27claude
andcommitted
fix: rename remaining Arts & Culture → Arts & Workshops references
CI broke after the category merge because: 1. recommendation_bigquery.SEGMENT_TO_CATEGORY still mapped Ticketmaster's "Arts & Theatre" segment to the old "Arts & Culture" name. The runtime invariant in that module compares this mapping against ALLOWED_CATEGORIES and asserts at import time — which is why every test file errored at collection rather than just one test. 2. test_events_endpoint.py hardcoded "Arts & Culture" in two assertions. All 88 tests pass locally now. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0340422 commit 5c538b8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

recommendation_bigquery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _bq_client() -> bigquery.Client:
5050
# "Family"/"Film" feed.
5151
SEGMENT_TO_CATEGORY: dict[str, str] = {
5252
"Music": "Music & Live Shows",
53-
"Arts & Theatre": "Arts & Culture",
53+
"Arts & Theatre": "Arts & Workshops",
5454
"Sports": "Sports & Recreation",
5555
"Family": "Entertainment",
5656
"Film": "Entertainment",
@@ -220,7 +220,7 @@ def fetch_events_from_bigquery(
220220
221221
Args:
222222
categories: user-selected canonical categories (e.g. ["Entertainment",
223-
"Arts & Culture"]). Empty list returns []. We SELECT all upcoming
223+
"Arts & Workshops"]). Empty list returns []. We SELECT all upcoming
224224
events whose Ticketmaster segment maps to one of these.
225225
max_distance_km: filter on distance_miles converted to km in SQL.
226226
days_ahead: only include events starting within this many days; clamps

tests/test_events_endpoint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def __init__(self, *a, **kw):
6666
"segment, expected",
6767
[
6868
("Music", "Music & Live Shows"), # Music has its own chip — 51% of event volume
69-
("Arts & Theatre", "Arts & Culture"),
69+
("Arts & Theatre", "Arts & Workshops"),
7070
("Sports", "Sports & Recreation"),
7171
("Family", "Entertainment"),
7272
("Film", "Entertainment"),
@@ -138,10 +138,10 @@ def test_fetch_events_maps_segment_to_canonical_category():
138138
},
139139
]
140140
out = rb.fetch_events_from_bigquery(
141-
["Arts & Culture"], 10.0, client=_make_fake_client(fake_rows)
141+
["Arts & Workshops"], 10.0, client=_make_fake_client(fake_rows)
142142
)
143143
assert len(out) == 1
144-
assert out[0]["category"] == "Arts & Culture"
144+
assert out[0]["category"] == "Arts & Workshops"
145145
assert out[0]["segment"] == "Arts & Theatre"
146146

147147

0 commit comments

Comments
 (0)