upsert_role stores the host's own words (roles.*_host), the place texts unresolved when they change, and the company key unresolved on insert, and marks the role prep_due. app.prep maps seniority, employment, remote and country through the host tables in app/prep/hosts, resolves places and company aliases, lists unknown words in `unmapped`, remaps every open role when the tables' fingerprint changes, and runs rebuild_dupes, which moves out of the pull's settle. Migration 22 adds the columns and the table and fills the host words from raw. Cascade: pull, prep, embed, score, enrich, prep, embed, score, extract, score, summarise. `app prep [unmapped] [--remap]`, /api/prep/unmapped and a fold on the Sources page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
1.0 KiB
Python
23 lines
1.0 KiB
Python
"""Prep: every decision about a role that needs a rule or data across roles.
|
|
|
|
Readers scrape and hand on the host's own words (`Store.upsert_role` keeps
|
|
them in `roles.*_host`); prep maps them, once, centrally, between the pull
|
|
and embedding. One door: `from app.prep import ...`.
|
|
|
|
words.py seniority, employment and remote: the host's table, the
|
|
vocabulary itself, the shared remote words
|
|
country.py the country from the resolved places, else the host's
|
|
hosts/ one table file per reader (`hosts.TABLES`)
|
|
stage.py `run`: the stage over the due roles, `unmapped` and the fold
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from app.prep.country import country
|
|
from app.prep.hosts import TABLES
|
|
from app.prep.stage import STATE, Prepped, company, fingerprint, run
|
|
from app.prep.words import REMOTE_WORDS, VOCABULARIES, employment, lookup, remote, seniority
|
|
|
|
__all__ = ["REMOTE_WORDS", "STATE", "TABLES", "VOCABULARIES", "Prepped", "company", "country",
|
|
"employment", "fingerprint", "lookup", "remote", "run", "seniority"]
|