Let the runner drop and count a row without an id, a title or a link, as ADR Plugins 3.8 has it, in one place for whole, paged and search reads: the count is stamped per target, logged, named on the board's row, and over 10% of the rows fails the read; the 28 readers hand every listing over instead of skipping it
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
38c31c830b
commit
911dfe8584
58 files changed
+479
-203
No files matched your search
+14
-10
@@ -82,27 +82,31 @@ def parse(body: bytes, slug: str) -> list[Row]:
|
||||
raise ValueError("not a Rippling board: the answer is not a list")
|
||||
roles: dict[str, Row] = {}
|
||||
places: dict[str, list[Place]] = {}
|
||||
for entry in data:
|
||||
for index, entry in enumerate(data):
|
||||
job_id = str(entry.get("uuid") or "").strip()
|
||||
title = (entry.get("name") or "").strip()
|
||||
if not title or not _UUID.fullmatch(job_id):
|
||||
continue
|
||||
# The id goes into a URL: one of other characters gets no link, and
|
||||
# the runner drops the row. An entry without an id is a role of its
|
||||
# own, not merged with the others that lack one.
|
||||
key = job_id or f"#{index}"
|
||||
place = str(((entry.get("workLocation") or {}).get("label")) or "").strip()
|
||||
places.setdefault(job_id, [])
|
||||
places.setdefault(key, [])
|
||||
if place:
|
||||
add_place(places[job_id], _place(place))
|
||||
roles.setdefault(job_id, {
|
||||
add_place(places[key], _place(place))
|
||||
roles.setdefault(key, {
|
||||
"source_id": job_id,
|
||||
"title": title,
|
||||
"url": f"https://{_SITE}/{slug}/jobs/{job_id}",
|
||||
"url": f"https://{_SITE}/{slug}/jobs/{job_id}" if _UUID.fullmatch(job_id) else "",
|
||||
"posted": None,
|
||||
"department": str(((entry.get("department") or {}).get("label")) or "").strip(),
|
||||
"description": "",
|
||||
"salary_text": "", # the board's list states no pay
|
||||
})
|
||||
for job_id, row in roles.items():
|
||||
row["places"] = places[job_id]
|
||||
row["location"] = "; ".join(p["text"] for p in places[job_id])
|
||||
if title and not roles[key]["title"]:
|
||||
roles[key]["title"] = title # an entry of the role that has one
|
||||
for key, row in roles.items():
|
||||
row["places"] = places[key]
|
||||
row["location"] = "; ".join(p["text"] for p in places[key])
|
||||
return list(roles.values())
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user