Skip to content

Commit 42f8dca

Browse files
committed
fix possible issues
1 parent 72043e7 commit 42f8dca

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/simcore-sdk/src/simcore_sdk/node_ports_common/data_items_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def create_simcore_file_id(
1616
s3_file_name = file_path.name
1717
if file_base_path:
1818
s3_file_name = f"{file_base_path / file_path.name}"
19-
20-
return SimcoreS3FileID(f"{project_id}/{node_id}/{s3_file_name}")
19+
clean_path = Path(f"{project_id}/{node_id}/{s3_file_name}")
20+
return SimcoreS3FileID(f"{clean_path}")
2121

2222

2323
_INTERNAL_DIR = Path(tempfile.gettempdir(), "simcorefiles")

packages/simcore-sdk/tests/unit/test_node_ports_common_data_items_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class _SimcoreFileIDParam:
3737
node_id="cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e",
3838
file_base_path=Path("/another/path"),
3939
expected_simcore_file_id=SimcoreS3FileID(
40-
"2c471fb7-af17-408b-bcf4-91d419d0d20e/cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e/path.ext"
40+
"2c471fb7-af17-408b-bcf4-91d419d0d20e/cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e/another/path/path.ext"
4141
),
4242
),
4343
_SimcoreFileIDParam(
@@ -46,7 +46,7 @@ class _SimcoreFileIDParam:
4646
node_id="cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e",
4747
file_base_path=Path("/some/random"),
4848
expected_simcore_file_id=SimcoreS3FileID(
49-
"2c471fb7-af17-408b-bcf4-91d419d0d20e/cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e/file/path.ext"
49+
"2c471fb7-af17-408b-bcf4-91d419d0d20e/cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e/some/random/path.ext"
5050
),
5151
),
5252
_SimcoreFileIDParam(
@@ -55,7 +55,7 @@ class _SimcoreFileIDParam:
5555
node_id="cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e",
5656
file_base_path=Path("/some/random/"),
5757
expected_simcore_file_id=SimcoreS3FileID(
58-
"2c471fb7-af17-408b-bcf4-91d419d0d20e/cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e/file/path.ext"
58+
"2c471fb7-af17-408b-bcf4-91d419d0d20e/cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e/some/random/path.ext"
5959
),
6060
),
6161
_SimcoreFileIDParam(
@@ -64,7 +64,7 @@ class _SimcoreFileIDParam:
6464
node_id="cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e",
6565
file_base_path=Path("/some"),
6666
expected_simcore_file_id=SimcoreS3FileID(
67-
"2c471fb7-af17-408b-bcf4-91d419d0d20e/cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e/random/file/path.ext"
67+
"2c471fb7-af17-408b-bcf4-91d419d0d20e/cd38bee6-9d4d-48e5-a8d5-98d7e049aa5e/some/path.ext"
6868
),
6969
),
7070
],

0 commit comments

Comments
 (0)