forked from robcarver17/pysystemtrade
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdirectories.py
58 lines (35 loc) · 1.37 KB
/
directories.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
import os
from syscore.fileutils import get_resolved_pathname
from sysdata.config.production_config import get_production_config
from sysproduction.data.backtest import get_directory_store_backtests
production_config = get_production_config()
def get_main_backup_directory():
ans = production_config.get_element("offsystem_backup_directory")
return get_resolved_pathname(ans)
def get_csv_backup_directory():
main_backup = get_main_backup_directory()
ans = os.path.join(main_backup, "csv")
return ans
def get_csv_dump_dir():
ans = production_config.get_element("csv_backup_directory")
return get_resolved_pathname(ans)
def get_mongo_dump_directory():
ans = production_config.get_element("mongo_dump_directory")
return get_resolved_pathname(ans)
def get_mongo_backup_directory():
main_backup = get_main_backup_directory()
ans = os.path.join(main_backup, "mongo")
return ans
def get_statefile_directory():
ans = get_directory_store_backtests()
return get_resolved_pathname(ans)
def get_statefile_backup_directory():
main_backup = get_main_backup_directory()
ans = os.path.join(main_backup, "statefile")
return ans
def get_echo_file_directory():
ans = production_config.get_element("echo_directory")
return ans
def get_echo_extension():
ans = production_config.get_element("echo_extension")
return ans