Coverage for scripts/missing_places.py: 0%
15 statements
« prev ^ index » next coverage.py v7.6.1, created at 2025-07-22 06:43 -0400
« prev ^ index » next coverage.py v7.6.1, created at 2025-07-22 06:43 -0400
1import json
2from collections import Counter
4from src.overturetoosm.resources import places_tags
5from src.overturetoosm.objects import PlaceProps
7missing = []
8with open(f"scripts/test_place2.geojson", "r", encoding="utf-8") as f:
9 data = json.load(f)
11 for feature in data["features"]:
12 place = PlaceProps(**feature["properties"])
13 if place.categories:
14 try:
15 places_tags[place.categories.main]
16 except KeyError:
17 missing += [place.categories.main]
19print(Counter(missing))