Merge the remote area: remote tokens, role_remote, remote_from, model wins for remote (wp-remote-a)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	app/models.py
This commit is contained in:
Wolf committed 2026-09-30 16:21:57 +02:00
commit e5572cab9d
21 files changed
+1250 -143

No files matched your search

+12 -3
View File
@@ -970,6 +970,10 @@ class Role(Model):
#: Every place of the role, in the host's order. Not a column: filled by
#: `Store.role` from `role_places`.
places: list[RolePlace] = []
#: Where a remote hire may live, as a label: "anywhere", "Europe",
#: "United States, Canada". '' when the role is not remote or its area is
#: not stated. Not a column: filled by `Store` from `role_remote`.
remote_where: str = ""
@computed_field # type: ignore[prop-decorator]
@property
@@ -1076,6 +1080,9 @@ class RoleRow(Model):
excerpt: str = ""
#: How many open roles are copies of this one (`Role.copies`), 0 when none.
copies: int = 0
#: As `Role.remote_where`: the area a remote hire may live in, '' when
#: the role is not remote or does not say.
remote_where: str = ""
@computed_field # type: ignore[prop-decorator]
@property
@@ -1170,11 +1177,13 @@ class Application(Model):
#: `region:skane`, `place:malmo`, bare text a `place:`) on whole words; `title`
#: matches a value as whole words anywhere in the title, folded as `title_key`
#: folds it, so `account executive` finds "Enterprise Account Executive, UK"
#: and `data engineer` does not find "Data Engineering Manager"; the rest are
#: and `data engineer` does not find "Data Engineering Manager"; `remote_from`
#: takes place tokens (`country:DK`, `country:EU`, `anywhere`) and is met by a
#: remote role whose area overlaps one, as a `remote:` chip is; the rest are
#: case-insensitive equality, except `salary_min` (at least the value) and
#: `languages` (every language the role requires is one of the values).
GateField = Literal["place", "country", "remote", "seniority", "function", "salary_min",
"currency", "permit", "languages", "company", "title"]
GateField = Literal["place", "country", "remote", "remote_from", "seniority", "function",
"salary_min", "currency", "permit", "languages", "company", "title"]
GATE_FIELDS: tuple[str, ...] = get_args(GateField)
GateMode = Literal["require", "any", "prefer", "exclude"]