Bring the Python side to the ADR: the judge scores 0 to 10 with the cap at 4 and migration 33 clears every judgement, summarise reads the top 30 of the want and the match order, a hidden company's roles are never in the feed, and the company switch is called All locations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6cad9713ac
commit
6d82287402
27 files changed
+390
-247
No files matched your search
+20
-18
@@ -70,7 +70,6 @@ def _feed_filters(
|
||||
function: str = "",
|
||||
remote: str = "",
|
||||
days: int | None = None,
|
||||
show_muted: bool = False,
|
||||
include_read: bool = True,
|
||||
tags: list[str] = Query(default=[]),
|
||||
tag_mode: Literal["any", "all"] = "any",
|
||||
@@ -96,7 +95,8 @@ def _feed_filters(
|
||||
them (`levels_between`), which is what the store filters on. `order=cv`
|
||||
is the score order with the agent's judged roles first by `cv_score`
|
||||
(`by_cv`). A request that names an agent keeps to its fetch gate in
|
||||
every order, newest included (`fetch_gate`), unless `gated`."""
|
||||
every order, newest included (`fetch_gate`), unless `gated`, and never
|
||||
shows a company the agent hid."""
|
||||
for token in tokens:
|
||||
if not places.known(token):
|
||||
raise HTTPException(422, f"No place is known as {token!r}.")
|
||||
@@ -115,7 +115,7 @@ def _feed_filters(
|
||||
return {
|
||||
"q": q or None, "company": company or None, "place": place or None,
|
||||
"function": function or None, "remote": remote or None, "days": days,
|
||||
"hide_muted": not show_muted, "include_read": include_read, "tags": tags,
|
||||
"include_read": include_read, "tags": tags,
|
||||
"tag_mode": tag_mode, "agent": _agent_id(store, agent),
|
||||
"by_score": agent is not None and order in ("score", "cv"),
|
||||
"by_cv": agent is not None and order == "cv", "gated": gated,
|
||||
@@ -155,7 +155,8 @@ def role_facets(store: StoreDep, filters: FeedFilters) -> Facets:
|
||||
def get_role(uid: str, store: StoreDep, agent: int | None = None) -> ScoredRole:
|
||||
"""One role, open or closed, for the read page, with `agent`'s vote and
|
||||
score, the prompt that gave its fit, its `judgement` against the agent's
|
||||
CV and the language flag (the default agent's when absent;
|
||||
CV (`skills`, `experience` and `career` 0 to 10, `cv_score` 0 to 100)
|
||||
and the language flag (the default agent's when absent;
|
||||
None when there is no agent). `copies` lists the open copies of a kept
|
||||
role (`RoleCopy`, for "Also posted"); a copy itself opens too, with
|
||||
`dup_of` naming its kept role."""
|
||||
@@ -235,9 +236,9 @@ def list_roles(
|
||||
`Store.roles` for what each filter does.
|
||||
|
||||
`agent` says whose votes, hidden companies and scores are meant. Each
|
||||
role carries that agent's `vote`; a company it hid is left out unless
|
||||
`show_muted` is set; `judged` keeps the liked, the unjudged or the
|
||||
passed. Every order keeps to the roles that agent's fetch gate passes,
|
||||
role carries that agent's `vote`; a company it hid is always left out,
|
||||
in every order, the total and the facets; `judged` keeps the liked, the
|
||||
unjudged or the passed. Every order keeps to the roles that agent's fetch gate passes,
|
||||
a gated one only with `gated=1`: with `order=score` (the default) best
|
||||
first by final score, carrying `score` and `gated_reason`; with
|
||||
`order=newest` newest first, carrying `gated_reason` and no score; with
|
||||
@@ -255,8 +256,8 @@ def list_roles(
|
||||
as well. `closing=1` keeps the roles whose `deadline` is today or in
|
||||
the next four days (Closing soon).
|
||||
|
||||
Each row carries `deadline`, the agent's `cv_score` (None when not
|
||||
judged), and `lang_flag` and `lang_note`, the posting's languages
|
||||
Each row carries `deadline`, the agent's `cv_score` (0 to 100, None
|
||||
when not judged), and `lang_flag` and `lang_note`, the posting's languages
|
||||
against the agent's (`app.models.language_flag`).
|
||||
|
||||
`company` and `place` are substrings, kept for links from other pages.
|
||||
@@ -290,14 +291,13 @@ class FiltersOut(BaseModel):
|
||||
|
||||
|
||||
@router.get("/filters")
|
||||
def list_filters(store: StoreDep, show_muted: bool = False,
|
||||
agent: int | None = None) -> FiltersOut:
|
||||
def list_filters(store: StoreDep, agent: int | None = None) -> FiltersOut:
|
||||
"""The tag vocabulary for the feed's filter row, most-used first. The
|
||||
companies `agent` hid (the default agent's without one) are left out
|
||||
unless `show_muted`, matching `/api/roles`."""
|
||||
companies `agent` hid (the default agent's without one) are left out,
|
||||
matching `/api/roles`."""
|
||||
hidden_for = _agent_id(store, agent)
|
||||
return FiltersOut(tags=[TagCount(tag=tag, count=count, unread=unread)
|
||||
for tag, count, unread in store.tag_counts(hidden_for, show_muted)])
|
||||
for tag, count, unread in store.tag_counts(hidden_for)])
|
||||
|
||||
|
||||
# ------------------------------------------------------------ suggestions
|
||||
@@ -506,9 +506,10 @@ class CompanyOut(BaseModel):
|
||||
`careers_opened_at` are the Watchlist's (`Company`'s), the latter also
|
||||
when a person last looked at the careers page. `by_hand` marks a company
|
||||
with no board shown that is not `from_search`, and `hand_reason` says why
|
||||
it is read by hand (`app.models.HAND_REASONS`). `all_countries` and
|
||||
`all_roles` are the company's two fetch overrides: its big boards read
|
||||
with the agents' wide reach, and with no role-type narrowing. `target` is
|
||||
it is read by hand (`app.models.HAND_REASONS`). `all_countries` (All
|
||||
locations) and `all_roles` (All roles) are the company's two fetch
|
||||
overrides: its big boards read with the agents' wide reach, and with no
|
||||
role-type narrowing. `target` is
|
||||
the attached board in full, `host:slug`, where `board` is its host alone;
|
||||
the page compares it with the board typed to know whether a replacement
|
||||
closes anything. `ats_slug` cannot stand in for it, since the careers site
|
||||
@@ -826,7 +827,8 @@ def _override(store: Store, queue: Any, key: str, on: bool, setter: str) -> Comp
|
||||
@router.post("/companies/{key}/all-countries")
|
||||
def set_all_countries(key: str, body: OverrideBody, store: StoreDep,
|
||||
queue: QueueDep) -> Company:
|
||||
"""All countries on or off: global, apart from affinity. On, the
|
||||
"""All locations on or off (the field and the path keep the name
|
||||
`all_countries`): global, apart from affinity. On, the
|
||||
company's roles skip the place part of every agent's fetch gate (the
|
||||
`any` gates, `jobs.score.failed_gates`), and its big boards are read
|
||||
with the agents' wide reach, Europe today, rather than their places
|
||||
|
||||
Reference in new issue
Block a user