Merge branch 'review_ThorstenBR'

This commit is contained in:
2024-04-25 09:06:03 +02:00
4 changed files with 8132 additions and 6 deletions

View File

@ -0,0 +1,3 @@
under review
submitted
submitted

File diff suppressed because it is too large Load Diff

View File

@ -94,20 +94,34 @@ def make_dtype_yaml_compatible(value):
return value
def is_structured_array(attr_val):
if isinstance(attr_val,np.ndarray):
return True if attr_val.dtype.names is not None else False
else:
return False
def construct_attributes_dict(attrs_obj):
attr_dict = {}
for key, value in attrs_obj.items():
attr_dict[key] = {}
if not key in ['file_list','filtered_file_list']:
value = make_dtype_yaml_compatible(value)
if is_structured_array(value):
for subattr in value.dtype.names:
attr_dict[key][subattr] = make_dtype_yaml_compatible(value[subattr])
else:
value = make_dtype_yaml_compatible(value)
attr_dict[key] = {"rename_as" : key,
"value" : value
}
#if isinstance(value,str):
# value.replace('\\','\\\\')
attr_dict[key] = {"rename_as" : key,
"value" : value
}
return attr_dict
def print_metadata(name, obj, folder_depth, yaml_dict):

View File

@ -155,7 +155,8 @@ def second_save_metadata_review(review_yaml_file_path, reviewer_attrs):
# 3. git add review/ and git commit -m "Submitted metadata review"
initials = reviewer_attrs['initials']
branch_name = '-'.join([reviewer_attrs['type'],'review','by',initials])
#branch_name = '-'.join([reviewer_attrs['type'],'review','by',initials])
branch_name = '_'.join(['review',initials])
# TODO: replace with subprocess + git
#checkout_review_branch(repo_obj, branch_name)