Skip to content
Snippets Groups Projects

Feat/dss cimprove master rebasing

Closed Andrey Samartsev requested to merge feat/DSSCimproveMasterRebasing into feat/DSSCdarksImprove
1 file
+ 9
2
Compare changes
  • Side-by-side
  • Inline
@@ -3,7 +3,7 @@ from importlib.machinery import SourceFileLoader
from os import chdir, listdir, makedirs, path, remove, stat
from os.path import isdir, isfile, splitext
import re
from shutil import copy, copytree, move
from shutil import copy, copytree, move, rmtree
from subprocess import CalledProcessError, check_call, check_output
from textwrap import dedent
from time import sleep
@@ -273,10 +273,17 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
return
print("Moving report to final location: {}".format(out_path))
copy('{}/_build/latex/{}.pdf'.format(run_path, report_name), out_path)
temp_dirs = glob(f'{tmp_path}/*/')
# Remove folders with figures and sphinx files.
print(f"Removing directories [{temp_dirs}] in temp folder: {tmp_path}")
[rmtree(f'{dtmp}/') for dtmp in temp_dirs]
# Moving temporary files to out-folder after successful execution
# This helps in keeping elements needed for reproducability.
print(f"Moving temporary files to final location"
f": {out_path}/temp_{time_now}")
f": {out_path}/{os.path.basename(tmp_path)}")
move(tmp_path, f"{out_path}/{os.path.basename(tmp_path)}")
Loading