Format python

This commit is contained in:
Andras Schmelczer 2026-01-31 13:07:09 +00:00
parent 85f5770e09
commit 4c258018c3
17 changed files with 348 additions and 248 deletions

View file

@ -584,9 +584,7 @@ def transform(input_path: Path) -> pl.LazyFrame:
if cat not in DROP_CATEGORIES and cat not in CATEGORY_MAP:
unmapped.append(cat)
if unmapped:
raise ValueError(
f"Categories missing from CATEGORY_MAP: {sorted(unmapped)}"
)
raise ValueError(f"Categories missing from CATEGORY_MAP: {sorted(unmapped)}")
# Verify every CATEGORY_MAP key actually exists in the data (catch typos)
mapped_but_absent = []
@ -623,9 +621,15 @@ def transform(input_path: Path) -> pl.LazyFrame:
def main():
parser = argparse.ArgumentParser(description="Transform raw POIs to filtered version with friendly names")
parser.add_argument("--input", type=Path, required=True, help="Raw POIs parquet file")
parser.add_argument("--output", type=Path, required=True, help="Output filtered POIs parquet file")
parser = argparse.ArgumentParser(
description="Transform raw POIs to filtered version with friendly names"
)
parser.add_argument(
"--input", type=Path, required=True, help="Raw POIs parquet file"
)
parser.add_argument(
"--output", type=Path, required=True, help="Output filtered POIs parquet file"
)
args = parser.parse_args()
df = transform(args.input).collect()