File size: 722 Bytes
fc329a3 | 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 | from __future__ import annotations
import shutil
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
DATA = ROOT.parent / 'SimplexTasks-12-data'
OUTPUTS = ROOT / 'outputs' / 'tables'
def main() -> None:
if not DATA.exists():
raise SystemExit('SimplexTasks-12-data bundle not found next to the code bundle')
OUTPUTS.mkdir(parents=True, exist_ok=True)
for src_dir_name in ['table_inputs', 'figure_inputs']:
src_dir = DATA / 'data' / 'summaries' / src_dir_name
if not src_dir.exists():
continue
for src in src_dir.iterdir():
if src.is_file():
shutil.copy2(src, OUTPUTS / src.name)
if __name__ == '__main__':
main()
|