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
@@ -0,0 +1,27 @@
|
||||
"""Recruitee's word tables for prep: the host's codes, and what they mean."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
|
||||
recruitee = importlib.import_module("app.prep.hosts.recruitee")
|
||||
|
||||
|
||||
def _match(word: str) -> str | None:
|
||||
"""The first entry of `MATCH` found among the words of a code."""
|
||||
words = set(word.strip().lower().replace("-", "_").split("_"))
|
||||
return next((value for fragment, value in recruitee.MATCH if fragment in words), None)
|
||||
|
||||
|
||||
def test_experience_codes_read() -> None:
|
||||
seniority = recruitee.SENIORITY
|
||||
assert [seniority[w] for w in ("student_school", "entry_level", "mid_level")] == [
|
||||
"intern", "junior", "mid"]
|
||||
assert seniority["experienced"] == ""
|
||||
assert "senior_level" not in seniority
|
||||
|
||||
|
||||
def test_employment_type_codes_read_by_their_words() -> None:
|
||||
assert [_match(w) for w in ("fulltime_permanent", "parttime_permanent", "internship",
|
||||
"fulltime_fixed_term", "freelance", "odd_job")] == [
|
||||
"full_time", "part_time", "internship", "temporary", "contract", None]
|
||||
Reference in new issue
Block a user