summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/config.py
blob: 43b03a3e41448bac464df10137331eae3ab44a1a (plain)
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
28
29
30
31
import subprocess

from dynaconf import Dynaconf

settings = Dynaconf(
    settings_file="settings.toml",
    environments=True,
)

GIT_REVISION = (
    subprocess.check_output(["git", "describe", "--always"]).strip().decode("utf-8")
)

I18N_LANG_OPTIONS = [
    "ar",
    "de",
    "el",
    "es",
    "en",
    "fa",
    "fr",
    "hr",
    "it",
    "ko",
    "nb",
    "nl",
    "pt",
    "ru",
    "zh",
]
assert settings.I18N_LANG_DEFAULT in I18N_LANG_OPTIONS