Skip to content

Commit fda81cb

Browse files
committed
directory fix and version upgrade
1 parent e15468e commit fda81cb

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

dsi/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.5"
1+
__version__ = "1.0"

dsi/core.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from itertools import product
55
import os
66
import shutil
7+
from pathlib import Path
78

89
from dsi.backends.filesystem import Filesystem
910
from dsi.backends.sqlite import Sqlite, DataType, Artifact
@@ -346,6 +347,13 @@ def copy(self, local_loc, remote_loc, isVerbose=False):
346347
# Data movement
347348
# Future: have movement service handle type (cp,scp,ftp,rsync,etc.)
348349
for file,file_remote in zip(file_list,rfile_list):
350+
abspath = os.path.dirname(os.path.abspath(file_remote))
351+
if not os.path.exists(abspath):
352+
if isVerbose:
353+
print( " mkdir " + abspath)
354+
path = Path(abspath)
355+
path.mkdir(parents=True)
356+
349357
if isVerbose:
350358
print( " cp " + file + " " + file_remote)
351359
shutil.copyfile(file , file_remote)

examples/datasync/datacopy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from dsi.core import Sync
22

33
#Origin
4-
local_files = "H:/Data/shaped2d/"
4+
local_files = "H:/Data/Scratch/shaped2d/"
55
#Remote
6-
remote_path = "C:/tmp/"
6+
remote_path = "H:/tmp/"
77

88
# Create Sync type with project name
99
s = Sync("shape2d")

0 commit comments

Comments
 (0)