better print statements, implement update project function

This commit is contained in:
Justus Kuhlmann 2024-08-26 14:17:10 +00:00
parent 486c81d7ac
commit 7af22b04ec

View file

@ -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)