This repository was archived by the owner on Feb 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
90 lines (73 loc) · 2 KB
/
config.py
File metadata and controls
90 lines (73 loc) · 2 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import os
from pathlib import Path
IS_TEST = True
CMSSW_REPOSITORY = os.environ.get("CMSSW_REPOSITORY", "cms-sw/cmssw")
def get_repo_url():
return "https://github.com/" + CMSSW_REPOSITORY + "/"
CERN_SSO_CERT_FILE = "private/cert.pem"
CERN_SSO_KEY_FILE = "private/cert.key"
CERN_SSO_COOKIES_LOCATION = Path(
os.environ.get("CERN_SSO_COOKIES_LOCATION", Path("/tmp"))
)
TWIKI_CONTACTS_URL = "https://ppdcontacts.web.cern.ch/PPDContacts/ppd_contacts.txt"
TWIKI_TAG_COLLECTOR_URL = (
"https://twiki.cern.ch/twiki/bin/edit/CMS/DQMP5TagCollector?nowysiwyg=1"
)
TWIKI_TAG_COLLECTOR_CANCEL_EDIT_URL = (
"https://twiki.cern.ch/twiki/bin/save/CMS/DQMP5TagCollector"
)
CATEGORIES_MAP_URL = os.environ.get(
"CATEGORIES_MAP_URL",
"https://raw.githubusercontent.com/cms-sw/cms-bot/master/categories_map.py",
)
TWIKI_TIMEOUT_SECONDS = int(os.environ.get("TWIKI_TIMEOUT_SECONDS", 10))
__github_client_id = None
__github_client_secret = None
def get_github_client_id():
global __github_client_id
if __github_client_id is None:
__github_client_id = (
open("private/github_oauth_data.txt", "r").readlines()[1].strip()
)
return __github_client_id
def get_github_client_secret():
global __github_client_secret
if __github_client_secret is None:
__github_client_secret = (
open("private/github_oauth_data.txt", "r").readlines()[2].strip()
)
return __github_client_secret
def get_subsystems():
return [
"l1t",
"hlt",
"tracker",
"sistrip",
"pixel",
"ecal",
"hcal",
"dt",
"rpc",
"csc",
"ct-pps",
"ctpps",
"bril",
"gem",
"hgcal",
"tracking",
"btag",
"vertexing",
"e-gamma",
"jetmet",
"lumi",
"muon",
"tau",
"generators",
"hfnose",
"beamspot",
"jme",
"jet",
"eventdisplay",
"castor",
"validation",
]