|
|
|
|
|
|
|
|
|
|
|
import git |
|
|
import imp |
|
|
import os |
|
|
|
|
|
|
|
|
ROOT = '.' |
|
|
|
|
|
PATHS = { |
|
|
'root' : ROOT, |
|
|
'lib' : os.path.join(ROOT, 'lib'), |
|
|
'config' : os.path.join(ROOT, 'config.yaml'), |
|
|
'config_user' : os.path.join(ROOT, 'config_user.yaml'), |
|
|
'input_dir' : 'input', |
|
|
'external_dir' : 'external', |
|
|
'output_dir' : 'output', |
|
|
'output_local_dir' : 'output_local', |
|
|
'makelog' : 'log/make.log', |
|
|
'output_statslog' : 'log/output_stats.log', |
|
|
'source_maplog' : 'log/source_map.log', |
|
|
'source_statslog' : 'log/source_stats.log', |
|
|
} |
|
|
|
|
|
|
|
|
f, path, desc = imp.find_module('gslab_make', [PATHS['lib']]) |
|
|
gs = imp.load_module('gslab_make', f, path, desc) |
|
|
|
|
|
|
|
|
PATHS = gs.update_paths(PATHS) |
|
|
gs.update_executables(PATHS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gs.remove_dir(['input', 'external']) |
|
|
gs.clear_dir(['log']) |
|
|
gs.start_makelog(PATHS) |
|
|
|
|
|
|
|
|
inputs = gs.copy_inputs(PATHS, ['input.txt']) |
|
|
externals = gs.copy_externals(PATHS, ['external.txt']) |
|
|
gs.write_source_logs(PATHS, inputs + externals) |
|
|
gs.get_modified_sources(PATHS, inputs + externals) |
|
|
|
|
|
|
|
|
gs.tablefill(template = 'source/motivation_correlation.lyx', |
|
|
inputs = 'input/treatment_effects/motivation_correlation.txt', |
|
|
output = 'output/motivation_correlation_filled.lyx') |
|
|
|
|
|
|
|
|
gs.run_lyx(PATHS, program = 'source/DigitalAddiction.lyx') |
|
|
|
|
|
|
|
|
gs.log_files_in_output(PATHS) |
|
|
|
|
|
|
|
|
gs.check_module_size(PATHS) |
|
|
|
|
|
|
|
|
gs.end_makelog(PATHS) |
|
|
|