Readers oracle to workday and the providers hand on the host's words; their word tables move to app/prep/hosts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 11:07:07 +02:00
1 parent a66aac95cf
commit 06eb929eaf
48 files changed
+460 -388

No files matched your search

+10 -14
View File
@@ -41,21 +41,18 @@ def test_rows_merge_one_entry_per_place_into_one_role() -> None:
assert first["description"] == "" and first["salary_text"] == "" and first["posted"] is None
def test_remote_is_true_only_when_every_place_is_a_remote_one() -> None:
def test_a_remote_place_is_flagged_and_the_role_states_no_remote() -> None:
by_id = {r["source_id"][:8]: r for r in rippling.parse(BOARD, "rippling")}
assert by_id["46b4af52"]["remote"] is True and by_id["19ae5b34"]["remote"] is True
assert by_id["75ad50c6"]["remote"] is None # an office label says nothing either way
mixed = json.dumps([
{"uuid": "abcdefgh-1", "name": "A", "workLocation": {"label": "Remote (Germany)"}},
{"uuid": "abcdefgh-1", "name": "A", "workLocation": {"label": "Berlin"}}]).encode()
assert rippling.parse(mixed, "x")[0]["remote"] is None
assert [p["remote"] for p in by_id["46b4af52"]["places"]] == [True]
assert [p["remote"] for p in by_id["75ad50c6"]["places"]] == [None] # an office label
assert all("remote" not in r for r in by_id.values()) # prep derives it from the places
def test_prisma_board_reads_two_roles() -> None:
rows = rippling.parse(PRISMA, "prisma-careers")
assert [(r["title"], r["department"], r["location"], r["remote"]) for r in rows] == [
("General Applications: Engineering", "Engineering", "Remote (Germany)", True),
("General Applications: Product", "Product", "Remote (Germany)", True)]
assert [(r["title"], r["department"], r["location"]) for r in rows] == [
("General Applications: Engineering", "Engineering", "Remote (Germany)"),
("General Applications: Product", "Product", "Remote (Germany)")]
def test_an_empty_board_is_no_roles_and_an_error_answer_is_not_a_board() -> None:
@@ -92,7 +89,7 @@ def test_detail_reads_description_places_date_and_a_single_yearly_range() -> Non
assert "<" not in found["description"]
assert found["location"] == "San Francisco, CA; Seattle, WA; New York, NY"
assert [p["text"] for p in found["places"]] == ["San Francisco, CA", "Seattle, WA", "New York, NY"]
assert found["employment"] == "full_time" # employmentType.label SALARIED_FT
assert found["employment"] == "SALARIED_FT" # employmentType.label
assert found["posted"] is not None and found["posted"].isoformat() == \
"2025-04-07T12:29:19.348000-07:00"
assert (found["salary_min"], found["salary_max"], found["currency"]) == (216000, 378000, "USD")
@@ -203,13 +200,12 @@ def test_discovery_finds_the_board_slug() -> None:
("rippling", "prisma-careers"), ("rippling", "Acme"), ("rippling", "beta")]
def test_a_role_at_several_places_keeps_each_once_and_is_remote_only_if_all_are() -> None:
def test_a_role_at_several_places_keeps_each_once() -> None:
rows = {r["source_id"]: r for r in rippling.parse(BOARD, "rippling")}
director = rows[DIRECTOR]
assert [p["text"] for p in director["places"]] == [
"San Francisco, CA", "Seattle, WA", "New York, NY"]
assert director["location"] == "San Francisco, CA; Seattle, WA; New York, NY"
assert director["remote"] is None
remote = next(r for r in rows.values() if r["places"] == [
{"text": "Remote (United States)", "remote": True}])
assert remote["remote"] is True
assert remote["places"][0]["remote"] is True