-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
72 lines (54 loc) · 2.24 KB
/
settings.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
'''
Copyright (C) 2016 Centro de Computacao Cientifica e Software Livre
Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
This file is part of HOTMapper.
HOTMapper is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
HOTMapper is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with HOTMapper. If not, see <https://www.gnu.org/licenses/>.
'''
'''Settings used by the database module'''
import logging
# SQL dialect used by sqlalchemy.
DATABASE_DIALECT = 'monetdb'
# Login credentials in database
DATABASE_USER = 'monetdb'
DATABASE_USER_PASSWORD = 'monetdb'
# Host to connect to. Bulk inserts won't work remotely unless you can specify an
# absolute path in the server
DATABASE_HOST = 'localhost'
# Database to connect to
DATABASE = 'hotmapper_demo'
# Column used to run aggregations and denormalizations
YEAR_COLUMN = 'ano_censo'
# URI structure. Standards to login:password model, but can be changed as needed.
DATABASE_URI = '{}://{}:{}@{}/{}'.format(DATABASE_DIALECT, DATABASE_USER,
DATABASE_USER_PASSWORD, DATABASE_HOST, DATABASE)
# Folder and file where backup is created - absolute path
BACKUP_FOLDER = '/home/banco/dumps/monetdb/'
BACKUP_FILE = 'backupdadoseducacionais'
# Folder where mapping protocols can be found - relative to root
MAPPING_PROTOCOLS_FOLDER = 'mapping_protocols'
# Folder for table definitions files
TABLE_DEFINITIONS_FOLDER = 'table_definitions'
# Folder for scripts and sql tables
SCRIPTS_FOLDER = 'sql'
# Source table definitions
SOURCE_TABLE_NAME = 'fonte'
SOURCE_TABLE_COLUMNS = {
'table_name': 'tabela',
'source': 'fonte'
}
# If set to True, will display SQL queries sent to database
ECHO = False
# Logging
LOGGING_LEVEL = logging.INFO
LOGGING_FORMAT = "%(levelname)s - %(name)s: %(message)s"
# Info used on file format conversions
CHUNK_SIZE = 500