Skip to content

Commit e2be15b

Browse files
committed
get list of datasets in collections, we need this for migration
1 parent 9ca8850 commit e2be15b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

scripts/migration/dataset_collection_json.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@ def get_dataset_collections_map():
3535
dataset_to_collection[dataset] = current_value
3636
return dataset_to_collection
3737

38+
def get_datasets_in_collections():
39+
map = get_dataset_collections_map()
40+
datasets_in_collections = list(map.keys())
41+
return datasets_in_collections
42+

scripts/migration/migrate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,8 @@ def process_user_and_resources_collections(user_v1, USER_MAP, DATASET_MAP, COLLE
12481248
headers=clowder_headers_v1, user_v1=user_v1
12491249
)
12501250

1251+
all_collection = get_clowder_v1_user_collections(headers=clowder_headers_v1, user_v1=user_v1)
1252+
12511253
print(f"Got {len(user_v1_collections)} user collections in the top level")
12521254

12531255
# filter the collections by space

0 commit comments

Comments
 (0)