Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
michalc committed Jul 2, 2024
1 parent 1371466 commit 061f8d4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,15 @@ def semver_key(path):
v_major_str, minor_str, patch_str = path.split('.')
return (int(v_major_str[1:]), int(minor_str), int(patch_str))

folders = aws_list_folders(
signed_s3_request, prefix=request.view_args['dataset_id'] + '/'
)
keys = aws_list_keys(
signed_s3_request, prefix=request.view_args['dataset_id'] + '/'
)
matching_folders = filter(predicate, folders)
folders_with_processed_datasets = set(
key.partition('/')[0]
for key in keys
if '__CSV_VERSION_' in key
)
matching_folders = filter(predicate, folders_with_processed_datasets)
latest_matching_version = max(
matching_folders, default=None, key=semver_key
)
Expand Down

0 comments on commit 061f8d4

Please sign in to comment.