diff --git a/src/aind_metadata_viz/app.py b/src/aind_metadata_viz/app.py index c6d9213..0673c8a 100644 --- a/src/aind_metadata_viz/app.py +++ b/src/aind_metadata_viz/app.py @@ -102,19 +102,23 @@ def build_top(): return pane -missing_selector = pn.widgets.Select(name='Value state', options=['Missing', 'Present']) +missing_selector = pn.widgets.Select( + name="Value state", options=["Missing", "Present"] +) def build_csv(file, field): # For everybody who is missing the currently active file/field id_fields = ["name", "_id", "location", "creation"] - get_present = missing_selector.value == 'Present' + get_present = missing_selector.value == "Present" df_data = [] for data in data_list: if not data[file] is None: - if mid_selector.value == " " or check_present(field, data[file], check_present=get_present): + if mid_selector.value == " " or check_present( + field, data[file], check_present=get_present + ): # This file/field combo is present/missing, get all the id information id_data = {} for id_field in id_fields: @@ -140,11 +144,13 @@ def build_csv_jscode(event): '"', '\\"' ) # Escape newlines and double quotes - get_missing = missing_selector.value == 'Missing' - missing_text = 'missing' if get_missing else 'present' + get_missing = missing_selector.value == "Missing" + missing_text = "missing" if get_missing else "present" if not mid_selector.value == " ": - filename = f"{top_selector.value}-{mid_selector.value}-{missing_text}.csv" + filename = ( + f"{top_selector.value}-{mid_selector.value}-{missing_text}.csv" + ) else: filename = f"{top_selector.value}-{missing_text}.csv" @@ -231,7 +237,12 @@ def build_mid(selected): # Left column (controls) left_col = pn.Column( - header_pane, top_selector, mid_selector, missing_selector, download_button, width=400 + header_pane, + top_selector, + mid_selector, + missing_selector, + download_button, + width=400, ) mid_plot = pn.bind(build_mid, selected=top_selector)