Coverage for scripts/write_tags.py: 0%
6 statements
« prev ^ index » next coverage.py v7.6.0, created at 2024-07-28 10:12 -0400
« prev ^ index » next coverage.py v7.6.0, created at 2024-07-28 10:12 -0400
1import json
3with open("scripts/tags.json", "r+", encoding="utf-8") as f:
4 tags = json.load(f)
6tags_filled = {k: v for k, v in tags.items() if v}
8with open("src/overturetoosm/resources.py", "w+", encoding="utf-8") as f:
9 f.write(
10 f'''"""A mapping of Overture tags to OSM tags."""
12tags: dict[str, dict[str, str]] = {json.dumps(tags_filled, indent=4)}
13"""dict[str, dict[str, str]]: A mapping of Overture to OSM tags,
14excluding blank values. This is downstream from the `scripts/tag.json`
15file."""
16'''
17 )