Declare READS for Oracle, Personio, Phenom, Pinpoint, Recruitee, Rippling, SmartRecruiters, SuccessFactors, Teamtailor, Workable and Workday

Every row carries places (Personio additionalOffices, Workable and Recruitee
locations[], every SuccessFactors address, Workday's own read), the list
teaser of Phenom and Oracle is kept in teaser, and the level, employment and
country a host states are mapped. Workday "N Locations" and "Country - City",
and Recruitee "Remote job", are no longer places. Phenom takes dateCreated
as posted. robots_page and ROBOTS_ANY_CASE go; READS.robots records the
decision. Signatures are feed_url(slug, ask) and page(get, slug, cursor, ask),
with an empty Ask as the default so the runner of today still calls them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:14:27 +02:00
1 parent 4c0da58da7
commit 4316624769
42 files changed
+3126 -199

No files matched your search

+33 -36
View File
@@ -1,6 +1,6 @@
"""The Workday host module: rows from saved listings, the paging quirks of a
tenant's list endpoint against a fake `get`, `detail` from saved responses,
the slug and its allow-list, robots.txt and discovery's patterns. No network
the slug and its allow-list and discovery's patterns. No network
-- every answer is a file under `tests/fixtures/ats/` or written here."""
from __future__ import annotations
@@ -74,7 +74,10 @@ def test_rows_of_a_site_called_jobs_state_the_requisition_id_and_no_date_past_30
rows = workday.rows(_load("workday-redhat.json"), "redhat.wd5/jobs")
assert [r["source_id"] for r in rows] == [
"R-059377", "R-058740", "R-059566", "R-058743"] # not the reposts' "-1" and "-2"
assert rows[2]["location"] == "2 Locations"
# "2 Locations" is a count, not a place: the role's own read names them.
assert rows[2]["location"] == "" and rows[2]["places"] == []
assert rows[0]["places"] == [{"text": "Raleigh", "remote": False}] # Onsite
assert rows[1]["places"] == [{"text": "Remote US TX", "remote": True}]
assert rows[2]["url"].startswith("https://redhat.wd5.myworkdayjobs.com/jobs/job/")
assert rows[3]["posted"] is None # "Posted 30+ Days Ago" says only that it is older
assert [r["remote"] for r in rows] == ["onsite", "remote", "remote", "hybrid"]
@@ -272,11 +275,13 @@ def test_detail_reads_the_description_date_remote_and_place_of_the_role() -> Non
SLUG, row)
assert asked == [f"https://{HOST}/wday/cxs/zendesk/zendesk"
"/job/Remote-Mexico-City-Mexico/Associate-Solutions-Architect_R35358"]
assert set(got) <= set(ats.DETAIL_FIELDS)
assert set(got) == {"description", "location", "posted", "remote"}
assert set(got) == {"description", "location", "places", "posted", "remote", "country",
"employment"}
assert got["posted"] == datetime(2026, 9, 29, tzinfo=UTC)
assert got["remote"] == "remote"
assert got["location"] == "Remote, Mexico City, Mexico"
assert got["places"] == [{"text": "Remote, Mexico City, Mexico", "remote": True}]
assert (got["country"], got["employment"]) == ("MX", "full_time")
assert got["description"].startswith("Job Description") or len(got["description"]) > 200
assert "<" not in got["description"] and "&nbsp;" not in got["description"]
assert " " not in got["description"]
@@ -290,6 +295,8 @@ def test_detail_names_every_location_of_a_role_listed_as_several() -> None:
assert asked == ["https://redhat.wd5.myworkdayjobs.com/wday/cxs/redhat/jobs"
"/job/Remote-Italy/Telco-Cloud-Consultant_R-059566-2"]
assert got["location"] == "Remote Italy; Remote Spain"
assert [p["text"] for p in got["places"]] == ["Remote Italy", "Remote Spain"]
assert "country" not in got # the code belongs to the main location alone
def _detail(**info: Any) -> bytes:
@@ -303,6 +310,7 @@ def test_detail_of_a_tenant_without_remote_type_leaves_it_out() -> None:
startDate="2026-09-28"), []),
"saxobank.wd3/CareeratSaxoBank", row)
assert got == {"description": "Trade & settle", "location": "Singapore",
"places": [{"text": "Singapore", "remote": None}],
"posted": datetime(2026, 9, 28, tzinfo=UTC)}
@@ -310,7 +318,23 @@ def test_detail_adds_the_country_to_a_place_that_does_not_name_it() -> None:
row = workday.rows(_load("workday.json"), SLUG)[0]
got = workday.detail(
_get_of(_detail(location="Billund", country={"descriptor": "Denmark"}), []), SLUG, row)
assert got == {"location": "Billund, Denmark"}
assert got == {"location": "Billund, Denmark",
"places": [{"text": "Billund, Denmark", "remote": None}]}
def test_a_country_dash_city_place_is_turned_round() -> None:
row = workday.rows(_load("workday.json"), SLUG)[0]
got = workday.detail(
_get_of((FIXTURES / "workday-places-detail.json").read_bytes(), []), SLUG, row)
# Twice the same city is once; a place that starts with a work mode is kept as written.
assert [p["text"] for p in got["places"]] == [
"Copenhagen, Denmark", "Stockholm, Sweden", "Remote, Mexico City, Mexico"]
assert got["location"] == "Copenhagen, Denmark; Stockholm, Sweden; Remote, Mexico City, Mexico"
assert all(p["remote"] is False for p in got["places"]) # remoteType Hybrid
assert workday._place("USA - Texas - Austin", None)["text"] == "Austin, Texas, USA"
assert workday._place("Remote - Germany", None)["text"] == "Remote - Germany"
assert workday._place("Denmark - Copenhagen, DK", None)["text"] == "Denmark - Copenhagen, DK"
assert workday._place("12 Locations", None) is None
def test_detail_takes_no_word_for_remote_it_does_not_know() -> None:
@@ -423,37 +447,10 @@ def test_the_case_of_the_site_is_kept() -> None:
assert "workday" in ats.HOSTS and ats.HOSTS["workday"] == "Workday"
def test_robots_page_is_the_site_with_its_closing_slash() -> None:
page = workday.robots_page("novonesis.wd103/Novonesis_Careers")
assert page == "https://novonesis.wd103.myworkdayjobs.com/Novonesis_Careers/"
assert httpx.URL(page).host == "novonesis.wd103.myworkdayjobs.com"
assert workday.allowed("novonesis.wd103/Novonesis_Careers")(httpx.URL(page).host)
@pytest.mark.parametrize(("slug", "robots", "allowed"), [
# As the tenants write them: a site that is disallowed, and one that is not.
("novonesis.wd103/Novonesis_Careers",
"User-agent: *\nDisallow: /Novonesis_Careers/\nDisallow: /Novonesis_Careers_Private/\n"
"Disallow: /refreshFacet/\n", False),
("darktrace.wd3/DarktaceExternal", "User-agent: *\nDisallow: /DarktaceExternal/\n", False),
("lego.wd103/LEGO_External",
"Sitemap: https://lego.wd103.myworkdayjobs.com/LEGO_External/siteMap.xml\n"
"User-agent: *\nAllow: /LEGO_External/\nDisallow: /LEGO_Executive/\n"
"Disallow: /refreshFacet/\n", True),
# Paths are case-sensitive: Red Hat's `Jobs` rule and its site `jobs`.
("redhat.wd5/jobs", "User-agent: *\nAllow: /Jobs/\nDisallow: /refreshFacet/\n", True),
("zendesk.wd1/zendesk", "User-agent: *\nAllow: /zendesk/\nDisallow: /refreshFacet/\n", True),
])
def test_robots_txt_is_read_against_the_site_page(slug: str, robots: str, allowed: bool) -> None:
assert ats._robots_allows(robots.encode(), workday.robots_page(slug)) is allowed
def test_the_site_page_without_its_slash_would_have_slipped_past_the_rule() -> None:
"""Why `robots_page` ends in a slash."""
rule = b"User-agent: *\nDisallow: /Novonesis_Careers/\n"
assert ats._robots_allows(rule, "https://novonesis.wd103.myworkdayjobs.com/Novonesis_Careers")
assert not ats._robots_allows(
rule, "https://novonesis.wd103.myworkdayjobs.com/Novonesis_Careers/")
def test_the_runtime_robots_check_has_left_the_module() -> None:
"""Decided when the reader was built (`READS.robots`): nothing to ask now."""
assert not hasattr(workday, "robots_page") and not hasattr(workday, "ROBOTS_ANY_CASE")
assert "robots.txt allows /<Site>/" in workday.READS.robots
# -------------------------------------------------------------- discovery