-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
28 lines (23 loc) · 774 Bytes
/
config.py
File metadata and controls
28 lines (23 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
from pathlib import Path
BASE_DIR = Path(__file__).parent
_env_path = BASE_DIR / ".env"
if _env_path.exists():
for line in _env_path.read_text().splitlines():
line = line.strip()
if line and not line.startswith("#") and "=" in line:
key, _, value = line.partition("=")
os.environ.setdefault(key.strip(), value.strip())
DATA_DIR = BASE_DIR / "data"
WHITELIST_DIR = DATA_DIR / "whitelist"
RAW_MANIFESTS_DIR = WHITELIST_DIR / "raw_manifests"
METADATA_DIR = DATA_DIR / "metadata"
METADATA_PAGES_DIR = METADATA_DIR / "pages"
RAW_DIR = DATA_DIR / "raw"
OUTPUT_DIR = DATA_DIR / "output"
RATE_LIMIT_DELAY = 0.5
MIN_LIKES = 3
MIN_MODULES = 8
MAX_MODULES = 50
RACK_VERSION = "2"
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN")