Integration check: wp-p-prep with wp-r1-raw and wp-r2-raw
Resolves tests/test_readers_shared.py, adds MATCH_MODE to the pinpoint, recruitee and rippling tables, and removes table_word, country_if_single and remote_word from plugins/readers/_shared.py with their tests and the Helpers paragraph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
55757c41e5
51 files changed
+445
-502
No files matched your search
@@ -178,28 +178,18 @@ posting per place, each with its own id, declares `places="copies"`: each
|
||||
copy is a row with its one place, and `dupes.py` folds them into one role
|
||||
that keeps each copy's link.
|
||||
|
||||
**Helpers.** `._shared` holds what more than one host needs; a module keeps
|
||||
only its own word tables and uses these:
|
||||
**Helpers.** `._shared` holds what more than one host needs. A module maps
|
||||
no word to the app's vocabulary: it hands on the host's own words under
|
||||
`seniority`, `employment`, `remote` and `country`, and `app.prep` maps them
|
||||
through the host's table in `app/prep/hosts/<name>.py`.
|
||||
|
||||
- `place(text, remote=None)` makes a `Place`: remote when the text has the
|
||||
word `remote`, otherwise as `remote` says. `add_place(found, entry)`
|
||||
appends a place unless its text is empty or already in `found`, in the
|
||||
host's order. A host that states remote itself passes it to `place`, or
|
||||
builds the dict and passes that to `add_place`.
|
||||
- `table_word(table, value, log, what)` maps a host's word (stated seniority
|
||||
or employment) through the module's table, without case. The table's keys
|
||||
are lowercase. Empty gives None; a known word mapped to `""` (`experienced`,
|
||||
`permanent`) names no level and gives None; an unknown word gives None and
|
||||
a debug line naming the host, so the table can grow.
|
||||
- `EMPLOYMENTS`, the one employment vocabulary: `full_time`, `part_time`,
|
||||
`contract`, `temporary`, `internship`, `freelance`. Every value of a
|
||||
module's `_EMPLOYMENT` table is one of these or `""`; the test in
|
||||
`tests/test_readers_shared.py` holds every module to it. Seniority values
|
||||
are `app.models.SENIORITIES`.
|
||||
- `country_if_single(codes)` is the code when the role's places share exactly
|
||||
one, else None, for a host that states a country per place.
|
||||
- `remote_word(text)` reads `remote` or `hybrid` from a search provider's
|
||||
headline or town line (Danish, Swedish, English).
|
||||
- `EMPLOYMENTS` is a copy of `app.models.EMPLOYMENTS` for the readers'
|
||||
tests, since a plugin imports nothing from `app`.
|
||||
|
||||
**Teaser.** A short text the list carries (an excerpt, a summary) is handed
|
||||
over as `teaser`, plain text, whether or not the full text comes later. It
|
||||
|
||||
Reference in new issue
Block a user