from dataclasses import dataclass, field @dataclass class SIG: """Data class that defines a Special Interest Group. Each contains a name and a longer form description. They also contain comment_names which attempts to separate out the way people might refer to it in cluster comments from how it is referred to in the UI & API. (For example, "TOTA" in cluster spot comments almost always means Towers on the Air, but no single programme is referred to in the UI as "TOTA" as it's ambiguous between Towers, Toilets and Tiles. And while Beaches got the name "BOTA" first, "BOTA" spots are much more likely to be bunkers.) Finally, there is a ref_regex which provides a regular expression to match what references (such as parks and summits) look like for that programme.""" # SIG name as used in the UI and API, e.g. "Towers" name: str # Description, e.g. "Towers on the Air" description: str # SIG names as they might appear in cluster spot comments, e.g. ["TOTA"] comment_names: list[str] = field(default_factory=list) # Regex matcher for references, e.g. for POTA r"[A-Z]{2}\-\d+". ref_regex: str | None = None