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:
1 parent
a66aac95cf
commit
06eb929eaf
48 files changed
+460
-388
No files matched your search
@@ -12,7 +12,6 @@ from __future__ import annotations
|
||||
|
||||
import html
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
@@ -22,8 +21,6 @@ from desk.sources import strip_html
|
||||
from ._contract import Ask, Fields, Place, Reads
|
||||
from ._shared import Get, Row, add_place, parse_dt, yearly_amount
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
NAME = "rippling"
|
||||
LABEL = "Rippling"
|
||||
KEEP_CASE = True
|
||||
@@ -46,11 +43,6 @@ _SITE = "ats.rippling.com"
|
||||
#: whole; it is also what discovery's patterns take.
|
||||
_SLUG = re.compile(r"[A-Za-z0-9][A-Za-z0-9_-]*")
|
||||
|
||||
#: The words of `employmentType.label` (`SALARIED_FT`), split at "_".
|
||||
_EMPLOYMENT = {"FT": "full_time", "PT": "part_time", "INTERN": "internship",
|
||||
"INTERNSHIP": "internship", "CONTRACT": "contract", "CONTRACTOR": "contract",
|
||||
"TEMP": "temporary", "TEMPORARY": "temporary", "SEASONAL": "temporary"}
|
||||
|
||||
#: A role's id in the board's own links.
|
||||
_UUID = re.compile(r"[0-9A-Za-z-]{8,64}")
|
||||
|
||||
@@ -86,8 +78,7 @@ def parse(body: bytes, slug: str) -> list[Row]:
|
||||
role and place, so a role in three cities is three entries with one
|
||||
`uuid` (Rippling's own board: 638 entries, 326 roles); the rows merge
|
||||
them, the places kept as a list and joined with "; " for `location`. The entry has no description, date
|
||||
or pay: `detail` reads them. `remote` is True only when every place is a
|
||||
"Remote (...)" one, since a label says nothing else about the work."""
|
||||
or pay: `detail` reads them."""
|
||||
data = json.loads(body)
|
||||
if not isinstance(data, list):
|
||||
raise ValueError("not a Rippling board: the answer is not a list")
|
||||
@@ -114,19 +105,12 @@ def parse(body: bytes, slug: str) -> list[Row]:
|
||||
for job_id, row in roles.items():
|
||||
row["places"] = places[job_id]
|
||||
row["location"] = "; ".join(p["text"] for p in places[job_id])
|
||||
row["remote"] = True if places[job_id] and all(
|
||||
p["remote"] for p in places[job_id]) else None
|
||||
return list(roles.values())
|
||||
|
||||
|
||||
def _employment(kind: Any) -> str | None:
|
||||
label = str((kind or {}).get("label") or "").strip().upper() if isinstance(kind, dict) else ""
|
||||
for word in label.split("_"):
|
||||
if word in _EMPLOYMENT:
|
||||
return _EMPLOYMENT[word]
|
||||
if label:
|
||||
log.debug("rippling: unknown employmentType %r", label)
|
||||
return None
|
||||
"""The host's `employmentType.label` (`SALARIED_FT`), as given."""
|
||||
return (str(kind.get("label") or "").strip() or None) if isinstance(kind, dict) else None
|
||||
|
||||
|
||||
def detail(get: Get, slug: str, row: Row) -> dict[str, Any]:
|
||||
|
||||
Reference in new issue
Block a user