-
Notifications
You must be signed in to change notification settings - Fork 1
/
conf.py
37 lines (29 loc) · 1.01 KB
/
conf.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
"""
Available configurations:
prtr_db_file_path: full file path in the filesystem to the raw PRTR data in
.accdb file format.
country_code: country code by which the data is filtered in the import.
csv_out_dir: directory to which the imported data is saved in CSV format
(facilities.csv & releases.csv)
"""
from dataclasses import dataclass
import common.conf as conf_utils
conf_utils.read_env_variables_from_env_file('data_import')
@dataclass(frozen=True)
class Conf():
prtr_db_file_path: str
country_code: str
first_year: int
proj_crs_epsg: int
csv_out_dir: str
log_file: str
print_uniq_values_from_columns: bool
conf = Conf(
prtr_db_file_path=conf_utils.read_env_var('PRTR_DB_FILE_PATH'),
country_code=conf_utils.read_env_var('COUNTRY_CODE', default='FI'),
first_year=conf_utils.read_env_var('FIRST_YEAR', default=2017),
proj_crs_epsg=3067,
csv_out_dir='api/assets',
log_file=r'data_import.log',
print_uniq_values_from_columns=False
)