diff --git a/corrlib/toml.py b/corrlib/toml.py index 2e8bdc0..68fbaf6 100644 --- a/corrlib/toml.py +++ b/corrlib/toml.py @@ -66,8 +66,9 @@ def import_toml(path, file, copy_file=True): if copy_file: import_file = os.path.join(path, "toml_imports", uuid, file) shutil.copy(file, import_file) - dl.save(path + import_file, message="Import using " + import_file, dataset=path) - print("Imported project, file copied to " + import_file) + dl.save(import_file, message="Import using " + import_file, dataset=path) + print("File copied to " + import_file) + print("Imported project.") return @@ -87,3 +88,8 @@ def reimport_project(path, uuid): for fname in filenames: import_toml(path, os.path.join(config_path, fname), copy_file=False) return + + +def update_project(path, uuid): + dl.update(os.path.join(path, "projects", uuid), how='merge', follow='parentds') + reimport_project(path, uuid)