""" Shared dates, taxonomy, and helpers for the insights suite. Raw datasets (ISRCS, NMF_PLAYLISTS, playlist CSVs) live in `app.data` and should be imported directly from there. """ import os from app.utils import get_dates, get_date_range # --------------------------------------------------------------------------- # Test parameters (lists used in `@pytest.mark.parametrize`). # --------------------------------------------------------------------------- markets_to_test = ["es"] # Default playlists used when the PLAYLISTS env var is not set. DEFAULT_PLAYLISTS = ["5WVIgjeB6gvHVhCvYxuGvZ"] _env_playlists = os.environ.get("PLAYLISTS") playlists_to_test = ( [p.strip() for p in _env_playlists.split(",") if p.strip()] if _env_playlists else DEFAULT_PLAYLISTS ) # --------------------------------------------------------------------------- # Date range used by most tests. # --------------------------------------------------------------------------- _dates = get_dates() start_date = _dates["start_date"] end_date = _dates["end_date"] date_range = get_date_range() # --------------------------------------------------------------------------- # GraphQL enum values. # --------------------------------------------------------------------------- PLAYLIST_TYPES = ( "ALGORITHMIC", "CHART", "CURATED", "EDITORIAL", "NEW_MUSIC_FRIDAY", "PERSONALIZED", "RADIO", "USER_GENERATED", "STATION", ) APPEARANCE_CURRENT = "current" APPEARANCE_PAST = "past"