Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD committed Aug 16, 2024
1 parent b2b9640 commit 1fb8a09
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/dandi_s3_log_parser/_dandiset_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _map_reduced_logs_to_dandiset(

all_reduced_logs = []
for asset in dandiset_version.get_assets():
asset_id = asset.identifier
asset_id = asset.identifier.replace("-", "_")
asset_suffixes = pathlib.Path(asset.path).suffixes

blob_or_zarr = "blobs" if ".zarr" not in asset_suffixes else "zarr"
Expand All @@ -91,7 +91,7 @@ def _map_reduced_logs_to_dandiset(
for ip_address in reduced_log["ip_address"]
]

reordered_reduced_log = reduced_log.reindex(columns=("asset_id", "timestamp", "bytes_sent", "region"))
reordered_reduced_log = reduced_log.reindex(columns=("filename", "timestamp", "bytes_sent", "region"))
all_reduced_logs.append(reordered_reduced_log)

if len(all_reduced_logs) == 0:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
asset_id timestamp bytes_sent region
filename timestamp bytes_sent region
0 5e9e92e1-f044-4aa0-ab47-1cfcb8899348 2022-03-16 02:21:12 512 unknown
1 5e9e92e1-f044-4aa0-ab47-1cfcb8899348 2022-05-04 05:06:35 512 unknown
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
asset_id timestamp bytes_sent region
filename timestamp bytes_sent region
0 5e9e92e1-f044-4aa0-ab47-1cfcb8899348 2022-03-16 02:21:12 512 unknown
1 5e9e92e1-f044-4aa0-ab47-1cfcb8899348 2022-05-04 05:06:35 512 unknown
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
asset_id timestamp bytes_sent region
filename timestamp bytes_sent region
0 5e9e92e1-f044-4aa0-ab47-1cfcb8899348 2022-03-16 02:21:12 512 unknown
1 5e9e92e1-f044-4aa0-ab47-1cfcb8899348 2022-05-04 05:06:35 512 unknown
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
asset_id timestamp bytes_sent region
filename timestamp bytes_sent region
0 cbcf1d6d-7f64-4d1f-8692-75e09e177ca6 2021-04-24 12:03:05 1443 unknown
1 cbcf1d6d-7f64-4d1f-8692-75e09e177ca6 2021-12-31 23:06:42 1443 unknown
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
asset_id timestamp bytes_sent region
filename timestamp bytes_sent region
0 cbcf1d6d-7f64-4d1f-8692-75e09e177ca6 2021-04-24 12:03:05 1443 unknown
1 cbcf1d6d-7f64-4d1f-8692-75e09e177ca6 2021-12-31 23:06:42 1443 unknown

0 comments on commit 1fb8a09

Please sign in to comment.