Files
jobboard/tests/test_prep_hosts_recruitee.py
WolfandClaude Opus 5.5 322db49773 Title levels on the ladder: principal, senior manager, distinguished, lead split (WP A)
from_title matches a title twice, for the highest people level and the
highest individual grade. A people level wins on its own rung; a grade
above that rung lifts it one rung (Principal Engineering Manager is a
senior manager). Senior Staff is principal, Senior Principal, Distinguished
and Technical Fellow are distinguished; Associate Director, AVP and Senior
Manager are senior managers. lead is now a team lead only (Team Lead, Shift
Lead, Supervisor, Teamleiter); Tech Lead, Lead X and X Lead(er) are staff.
A slash names two levels, so Senior/Staff is staff.

- Jobylon "lead" maps to staff; Recruitee maps student_college, manager,
  senior_manager and executive.
- extract's prompt describes the ladder and its two tracks; enum from LEVELS.
- prep VERSION 2, so the next prep maps every open role again.
- Migration 25 clears seniority_model where it is staff, lead, manager or
  director, so extract reads those roles again, and sets roles.seniority to
  the first filled of model, stated and title.
- The coverage test of tests/test_seniority.py passes; its xfail is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:11:26 +02:00

30 lines
1.2 KiB
Python

"""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 [seniority[w] for w in ("student_college", "manager", "senior_manager",
"executive")] == ["intern", "manager", "senior_manager", "exec"]
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]