forked from xstreck1/TREMPPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.py
More file actions
69 lines (61 loc) · 2.73 KB
/
Copy pathheader.py
File metadata and controls
69 lines (61 loc) · 2.73 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
# Created by Adam Streck, 2013-2015, adam.streck@fu-berlin.de
#
# This file is part of the Toolkit for Reverse Engineering of Molecular Pathways
# via Parameter Identification (TREMPPI)
#
# This program 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.
#
# This program 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
# this program. If not, see <http://www.gnu.org/licenses/>.
from os.path import dirname, abspath, join, normpath, basename, isfile
from os import getcwd
version = "1.3.1"
model_size_limit = 1048577
default_port = "8080"
configure_filename = "configure.js"
projects_filename = "projects.js"
last_page_filename = "last_page.txt"
server_config_filename = 'tremppi_server.ini'
database_file = 'database.sqlite'
source_folder = 'javascript'
template_folder = 'templates'
static_folder = 'static'
server_folder = 'server'
data_folder = 'data'
reports = ['witness', 'regulations', 'correlations', 'quantitative', 'qualitative', 'group']
widgets = ['index', 'properties', 'editor', 'select', 'witness', 'regulations', 'correlations', 'quantitative', 'qualitative', 'group', 'tools']
folders = ['common', 'libs', 'index', 'properties', 'editor', 'select', 'witness', 'regulations', 'correlations', 'quantitative', 'qualitative', 'group', 'tools']
model_file = 'editor.json'
properties_file = 'properties.json'
class System:
EXEC_PATH = ''
BIN_PATH = ''
HOME_PATH = ''
DEST_PATH = ''
system = System()
def system_init(exec_path, args):
global system
system.EXEC_PATH = abspath(exec_path)
if basename(exec_path) == 'tremppi' or basename(exec_path) == 'tremppi.exe':
system.BIN_PATH = abspath(dirname(exec_path))
system.HOME_PATH = system.BIN_PATH
elif isfile(join(dirname(dirname(exec_path)), 'tremppi')) or isfile(join(dirname(dirname(exec_path)), 'tremppi.exe')):
system.BIN_PATH = abspath(dirname(dirname(exec_path)))
system.HOME_PATH = system.BIN_PATH
elif isfile(join(dirname(dirname(exec_path)), join('Release','tremppi.exe'))):
system.BIN_PATH = abspath(join(dirname(dirname(exec_path)), 'Release'))
system.HOME_PATH = dirname(system.BIN_PATH)
else:
raise Exception('TREMPPI binary not found')
if args.path is not None:
system.DEST_PATH = normpath(args.path)
else:
system.DEST_PATH = getcwd()
return system