Link the German towns, Villach, Americas and Asia Pacific; map the unmapped host words
Fifteen towns join Germany and Villach joins Austria. Americas is a spelling of the United States, and Asia Pacific (APAC) is a continent over no country. The Lever, HiBob, Jobylon, Personio, SmartRecruiters and Recruitee tables learn the 40 words the Unmapped list showed, most of Lever's commitments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e03305ff87
commit
b2c9a9ec29
9 files changed
+49
-17
No files matched your search
+7
-3
@@ -325,7 +325,7 @@ TZ Tanzania
|
||||
UA Ukraine | Україна | Ukraina
|
||||
UG Uganda
|
||||
UM United States Minor Outlying Islands
|
||||
US United States | United States of America | USA | U.S.A. | US | U.S.
|
||||
US United States | United States of America | USA | U.S.A. | US | U.S. | Americas
|
||||
UY Uruguay
|
||||
UZ Uzbekistan
|
||||
VA Vatican City | Holy See
|
||||
@@ -368,7 +368,8 @@ _REGIONS = ("europe", "emea", "eu", "european union", "eea")
|
||||
#: state or a Canadian province in the same part of the line beats one of
|
||||
#: these ("London, Ontario" is Canada); a country name does not lose to it.
|
||||
_CITIES: dict[str, str] = {
|
||||
**dict.fromkeys(("vienna", "wien", "graz", "linz", "salzburg", "innsbruck"), "AT"),
|
||||
**dict.fromkeys(("vienna", "wien", "graz", "linz", "salzburg", "innsbruck", "villach"),
|
||||
"AT"),
|
||||
**dict.fromkeys(("brussels", "bruxelles", "antwerp", "ghent", "bruges", "brugge", "liege",
|
||||
"luik"), "BE"),
|
||||
**dict.fromkeys(("sofia",), "BG"),
|
||||
@@ -389,7 +390,10 @@ _CITIES: dict[str, str] = {
|
||||
"mannheim", "gottingen", "riederich", "rosenheim", "rostock", "bremen",
|
||||
"bochum", "augsburg", "potsdam", "munster", "deggendorf", "luneburg",
|
||||
"kassel", "braunschweig", "wurzburg", "remscheid", "osnabruck",
|
||||
"oldenburg", "emmendingen", "wuppertal", "wiesbaden", "tubingen", "mainz", "lubeck"), "DE"),
|
||||
"oldenburg", "emmendingen", "wuppertal", "wiesbaden", "tubingen", "mainz", "lubeck",
|
||||
"bayreuth", "bad homburg", "homburg", "ettlingen", "bremerhaven",
|
||||
"breidenbach", "bielefeld", "saarbrucken", "hildesheim", "moers", "kiel",
|
||||
"ulm", "regensburg", "freiburg", "obersulm"), "DE"),
|
||||
**dict.fromkeys(("athens", "thessaloniki"), "GR"),
|
||||
**dict.fromkeys(("budapest",), "HU"),
|
||||
**dict.fromkeys(("dublin", "cork", "galway", "limerick"), "IE"),
|
||||
|
||||
+6
-1
@@ -134,6 +134,7 @@ _ALIAS_GROUPS: tuple[tuple[str, ...], ...] = (
|
||||
("Tübingen", "Tuebingen", "Tubingen"),
|
||||
("Lübeck", "Luebeck", "Lubeck"),
|
||||
("Münster", "Muenster", "Munster"),
|
||||
("Saarbrücken", "Saarbruecken", "Saarbrucken"),
|
||||
# Austria
|
||||
("Vienna", "Wien", "Vienne"),
|
||||
("Salzburg",),
|
||||
@@ -734,7 +735,8 @@ def seed() -> tuple[list[Seed], list[tuple[tuple[str, str], tuple[str, str]]]]:
|
||||
Region and Skåne, which lie in two countries).
|
||||
|
||||
Europe is a continent over the countries of `_EUROPE`, and is also what
|
||||
`EU`, `EMEA` and `European Union` name. Every country of `_COUNTRY_NAMES`
|
||||
`EU`, `EMEA` and `European Union` name. Asia Pacific (`APAC`) is a continent over
|
||||
nothing. Every country of `_COUNTRY_NAMES`
|
||||
by its names; the US states and Canadian provinces as regions; the
|
||||
regions of `REGIONS`; the towns of the alias groups, of the regions and
|
||||
of `_CITIES`, one place per group (`Copenhagen`, `København`,
|
||||
@@ -754,6 +756,9 @@ def seed() -> tuple[list[Seed], list[tuple[tuple[str, str], tuple[str, str]]]]:
|
||||
seeds[(kind, key)] = Seed(kind, key, name, parent, folds)
|
||||
|
||||
add(*europe, "Europe", None, (fold(name) for name in ("Europe", *_REGIONS)))
|
||||
# Asia Pacific holds no country: a role placed there alone keeps the
|
||||
# host's country, and one beside a country is that country.
|
||||
add("continent", "asia-pacific", "Asia Pacific", None, ("asia pacific", "apac"))
|
||||
for code, names in _COUNTRY_LABELS.items():
|
||||
add("country", code, names[0], europe if code in _EUROPE else None, _COUNTRY_FOLDS[code])
|
||||
for country, code, name in _subdivisions():
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
"""HiBob's words, mapped to the app's."""
|
||||
|
||||
#: `employmentType`, the company's own name for it. "Permanent" says nothing
|
||||
#: about hours and stays unmapped.
|
||||
#: about hours and maps to none.
|
||||
EMPLOYMENT: dict[str, str] = {
|
||||
"regular full time": "full_time", "full time": "full_time",
|
||||
"full-time": "full_time", "regular part time": "part_time",
|
||||
"part time": "part_time", "part-time": "part_time", "contract": "contract",
|
||||
"contractor": "contract", "temporary": "temporary", "fixed term": "temporary",
|
||||
"intern": "internship", "internship": "internship", "freelance": "freelance"}
|
||||
"intern": "internship", "internship": "internship", "freelance": "freelance",
|
||||
"permanent": ""}
|
||||
|
||||
#: `workspaceTypeId`.
|
||||
REMOTE: dict[str, str] = {"remote": "remote", "hybrid": "hybrid", "on_site": "onsite", "onsite": "onsite"}
|
||||
@@ -2,20 +2,21 @@
|
||||
|
||||
#: The embed's `experience`. Only the coarse levels are mapped; "Experienced"
|
||||
#: sits between "Mid level" and the managerial levels and says too little to
|
||||
#: place, so it stays unmapped.
|
||||
#: place, so it maps to none.
|
||||
SENIORITY: dict[str, str] = {
|
||||
"student": "intern", "internship": "intern", "trainee": "intern",
|
||||
"entry level": "junior", "entry-level": "junior", "junior": "junior",
|
||||
"graduate": "junior", "mid level": "mid", "mid-level": "mid", "mid": "mid",
|
||||
"senior": "senior", "lead": "lead", "manager": "manager", "director": "director",
|
||||
"executive": "exec", "not applicable": ""}
|
||||
"executive": "exec", "not applicable": "", "experienced": ""}
|
||||
|
||||
#: The embed's `employment_type`.
|
||||
EMPLOYMENT: dict[str, str] = {
|
||||
"full-time": "full_time", "full time": "full_time", "part-time": "part_time",
|
||||
"part time": "part_time", "contract": "contract", "consultant": "contract",
|
||||
"temporary": "temporary", "internship": "internship", "intern": "internship",
|
||||
"freelance": "freelance", "summer job": "temporary", "seasonal": "temporary"}
|
||||
"freelance": "freelance", "summer job": "temporary", "seasonal": "temporary",
|
||||
"not applicable": ""}
|
||||
|
||||
#: `workspace`.
|
||||
REMOTE: dict[str, str] = {"remote": "remote", "hybrid": "hybrid", "on-site": "onsite", "onsite": "onsite"}
|
||||
+21
-3
@@ -1,9 +1,27 @@
|
||||
"""Lever's words, mapped to the app's."""
|
||||
|
||||
#: `categories.commitment`. A commitment is free text on Lever ("Permanent" is
|
||||
#: seen too and says nothing about hours).
|
||||
#: `categories.commitment`. A commitment is free text on Lever. "Permanent",
|
||||
#: a country's employee ("GE Employee") or "All work types" say nothing about
|
||||
#: hours and map to none; a working student is an internship, as on Personio.
|
||||
EMPLOYMENT: dict[str, str] = {
|
||||
"full-time": "full_time", "full time": "full_time", "fulltime": "full_time",
|
||||
"part-time": "part_time", "part time": "part_time", "parttime": "part_time",
|
||||
"intern": "internship", "internship": "internship", "contract": "contract",
|
||||
"contractor": "contract", "temporary": "temporary", "freelance": "freelance"}
|
||||
"contractor": "contract", "temporary": "temporary", "freelance": "freelance",
|
||||
"employee / full-time": "full_time", "full-time permanent": "full_time",
|
||||
"full-time (long term)": "full_time", "employee, full time": "full_time",
|
||||
"employee, full time (100%)": "full_time", "eor / full-time": "full_time",
|
||||
"full-time, remote": "full_time",
|
||||
"fixed term contract": "temporary", "fixed-term": "temporary", "fixed-terms": "temporary",
|
||||
"ftc": "temporary", "temporary contract": "temporary", "short term": "temporary",
|
||||
"freelancer": "freelance", "full time contractor": "contract",
|
||||
"early careers internship contract": "internship", "fr intern": "internship",
|
||||
"fr apprentice": "internship", "working student": "internship",
|
||||
"permanent": "", "permanent employment": "", "employee - permanent": "",
|
||||
"permanent contract": "", "uk permanent employee": "", "ge employee": "",
|
||||
"es employee": "", "fr executive/cadre": "",
|
||||
"employee, full or part time flexible (100-80%)": "", "all work types": "",
|
||||
"general opportunity application": "", "hourly": "", "remote": ""}
|
||||
|
||||
#: `workplaceType`.
|
||||
REMOTE: dict[str, str] = {"unspecified": ""}
|
||||
@@ -8,4 +8,5 @@ SENIORITY = {"entry-level": "junior", "student": "intern", "executive": "exec",
|
||||
#: (which says nothing about the hours), its `schedule`.
|
||||
EMPLOYMENT = {"temporary": "temporary", "freelance": "contract", "intern": "internship",
|
||||
"working_student": "internship", "trainee": "internship",
|
||||
"permanent": "", "full-time": "full_time", "part-time": "part_time"}
|
||||
"permanent": "", "full-time": "full_time", "part-time": "part_time",
|
||||
"full-or-part-time": ""}
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
#: `experience_code`. `experienced` names no level and is known, so it maps
|
||||
#: to none.
|
||||
SENIORITY = {"student_school": "intern", "entry_level": "junior", "mid_level": "mid",
|
||||
"experienced": ""}
|
||||
SENIORITY = {"student_school": "intern", "student_college": "intern", "entry_level": "junior",
|
||||
"mid_level": "mid", "experienced": "", "manager": "manager",
|
||||
"senior_manager": "senior_manager", "executive": "exec"}
|
||||
|
||||
#: The words of `employment_type_code` (`fulltime_permanent`), which is
|
||||
#: lowercased and split at "_" and "-"; the first entry found among its words
|
||||
|
||||
@@ -8,4 +8,5 @@ SENIORITY = {"internship": "intern", "entry_level": "junior", "director": "direc
|
||||
|
||||
#: `typeOfEmployment.id`.
|
||||
EMPLOYMENT = {"permanent": "", "intern": "internship", "temporary": "temporary",
|
||||
"contract": "contract", "part_time": "part_time", "full_time": "full_time"}
|
||||
"contract": "contract", "part_time": "part_time", "full_time": "full_time",
|
||||
"part-time": "part_time"}
|
||||
@@ -50,7 +50,7 @@ def names(text: str) -> list[str]:
|
||||
def test_the_seed_holds_the_dictionaries_in_code() -> None:
|
||||
seeds, includes = seed()
|
||||
kinds = Counter(s.kind for s in seeds)
|
||||
assert kinds["continent"] == 1
|
||||
assert {s.key for s in seeds if s.kind == "continent"} == {"europe", "asia-pacific"}
|
||||
assert kinds["country"] == sum(1 for line in _COUNTRY_NAMES.split("\n") if line)
|
||||
keys = {(s.kind, s.key) for s in seeds}
|
||||
assert {("region", key) for key in places.REGIONS} <= keys
|
||||
|
||||
Reference in new issue
Block a user