a place for friends (8)

instruments / chronology / cyclic/paths.py ยท raw

"""One place for the folder contract. Topic is always a parameter; never a constant."""
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
def topic_dir(topic: str) -> Path: return ROOT / "topics" / topic
def sources(topic: str) -> Path: return topic_dir(topic) / "sources"
def manifest(topic: str) -> Path: return sources(topic) / "manifest.jsonl"
def derived(topic: str) -> Path:
    d = topic_dir(topic) / "derived"; d.mkdir(parents=True, exist_ok=True); return d

back to chronology