-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
99 lines (67 loc) · 2.74 KB
/
config.py
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
91
92
93
94
95
96
97
98
99
LOGGING_LEVEL = 'INFO'
LOG_STDOUT = True
'''
configuration for ADSJournals database manager
'''
# COLLECTIONS is a list of which collections/databases are stored
COLLECTIONS = ['ast', 'phy', 'gen', 'pre']
BIBSTEM_VOLUMES = ['book', 'conf', 'work', 'proc', 'rept', 'symp', 'prop']
# list of tables that can be exported to google sheets
EDITABLE_TABLES = ['abbrevs', 'master', 'idents', 'names', 'publisher', 'titlehistory']
# list of tables that can be automatically dropped and reloaded
CLEARABLE_TABLES = ['raster', 'rastervol', 'refsource']
# Data files used to initialize the DB (run.py -lf option)
# DATA_DIRECTORY:
JDB_DATA_DIR = '/data_source/'
# BIBSTEMS has bibstem, R/J/C/etc, and canonical name
BIBSTEMS_FILE = '/bibstems.dat'
# PUBLISHER has bibstem, publisher abbrev
BIBSTEM_PUBLISHER_FILE = '/publisher_bibstem.dat'
# JOURNAL_ABBREV has bibstem and multiple title abbreviations (e.g.
# A&A, AA, Astron. & Astrophys.)
JOURNAL_ABBREV_FILE = '/journals_abbrev.dat'
# some bibstems are tracked for disambiguation but aren't indexed
NONINDEXED_FILE = '/non_indexed.txt'
# ISSN - Bibstem mappings
JOURNAL_ISSN_FILE = '/journal_issn'
ISSN_JOURNAL_FILE = '/issn2journal'
# ISSN-Identifier mapping for ADSManualParser
ISSN_IDENTIFIER = '/issn_identifiers'
# Journal name data for nodejs autocomplete function
JOURNALS_AUTOCOMPLETE_FILE = '/journals_autocomplete.json'
# Backoffice ranking data files for nodejs autocomplete function
CANONICAL_BIBS = '/canonical_bibcodes.current'
CITATION_COUNTS = '/citation.counts'
# REFSOURCE_FILE
BIB_TO_REFS_FILE = '/citing2file.dat'
# RASTERIZING.xml directory
RASTER_CONFIG_DIR = '/raster_config/'
# Completeness statistics from completeness_statistics_pipeline
COMPLETENESS_JSON_FILE = '/completeness_export.json'
COMPLETENESS_CRIT_VALUE = 0.95
#------------------------------------------------------
'''
configuration for Google Sheets service
'''
SECRETS_PATH = '/secrets/'
CREDENTIALS_FILE = SECRETS_PATH + 'foo.dat'
TOKEN_FILE = SECRETS_PATH + 'bar.dat'
HOME_FOLDER_ID = 'dummy_folder_id'
EDITORS = ['mygmailaccount@gmail.com']
PADCOUNT_DEFAULT = 500
#----------------------------------------------------------
'''
configuration for journalsdb_service microservice
'''
VERSION = 'v1.0'
# Holdings ADS query config
HOLDINGS_ADS_QUERY_URL = 'https://api.adsabs.harvard.edu/v1/search/query'
# Specify the maximum number of bibstems the microservice can query
JOURNALSDB_MAX_SUBMITTED = 100
# Specify where the journals database lives
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://user:pwd@localhost:5432/journals'
SQLALCHEMY_ECHO = False
SQLALCHEMY_TRACK_MODIFICATIONS = False
DISCOVERER_PUBLISH_ENDPOINT = '/resources'
# Advertise its own route within DISCOVERER_PUBLISH_ENDPOINT
DISCOVERER_SELF_PUBLISH = False