Skip to content

Commit 0995006

Browse files
committed
Merge branch 'main' into functions
2 parents 1e6b667 + 95e5935 commit 0995006

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ Options:
216216
#### `datacustomcode zip`
217217
Zip a transformation job in preparation to upload to Data Cloud. Make sure to change directory into your code package folder (e.g., `my_package`) before running this command.
218218

219+
Arguments:
220+
- `PATH`: Path to the code directory i.e. the payload folder (default: "payload")
221+
219222
Options:
220-
- `--path TEXT`: Path to the code directory i.e. the payload folder (default: ".")
221223
- `--network TEXT`: docker network (default: "default")
222224

223225

src/datacustomcode/deploy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,9 @@ def zip(
427427
# Skip .DS_Store files when adding to zip
428428
for file in files:
429429
if file != ".DS_Store":
430-
file_path = os.path.join(root, file)
431-
zipf.write(file_path)
430+
abs_path = os.path.join(root, file)
431+
arcname = os.path.relpath(abs_path, directory)
432+
zipf.write(abs_path, arcname)
432433

433434
logger.debug(f"Created zip file: {ZIP_FILE_NAME}")
434435

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{}
1+
{
2+
"dataspace": "default"
3+
}

0 commit comments

Comments
 (0)