Skip to content

Commit

Permalink
Sort bitstreams
Browse files Browse the repository at this point in the history
* Refactor get_files_from_s3 method to sort bitstreams
  • Loading branch information
ehanson8 committed Apr 10, 2024
1 parent ff1f2e0 commit 7863340
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dsaps/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def get_files_from_s3(
continue
item_identifier = parse_value_from_text(file_name, id_regex)
files.setdefault(item_identifier, []).append(file_path)
for key, value in files.items():
files[key] = sorted(
value, key=lambda x: x.split(parse_value_from_text(x, id_regex))[1]
)
return dict(sorted(files.items()))


Expand Down

0 comments on commit 7863340

Please sign in to comment.