Skip to content

Commit fd11624

Browse files
committed
feat: display location and fix links
1 parent 7cfb04a commit fd11624

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/aind_metadata_viz/view.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,21 @@ def _toggle_visibility(self, event, file):
119119
def header_panel(self):
120120
"""Return a header panel with simple metadata information"""
121121

122-
md = f"## {self.record['name']}"
122+
# Turn other_identifiers dict[list[str]] into a little table
123+
other_identifiers = self.record["other_identifiers"]
124+
other_identifiers["S3 Path"] = [self.record["location"]]
125+
if other_identifiers:
126+
other_id_md = "### Other Identifiers\n\n"
127+
for key, values in other_identifiers.items():
128+
other_id_md += f"- **{key}**: {', '.join(values)}\n"
129+
else:
130+
other_id_md = ""
131+
132+
md = f"""
133+
## {self.record['name']}
134+
{other_id_md}
135+
136+
"""
123137

124138
return pn.pane.Markdown(md)
125139

@@ -155,7 +169,7 @@ def file_panel(self, file: str):
155169

156170
md_header = pn.pane.Markdown(
157171
f"## {file} \n"
158-
f"aind-data-schema link: [{file}.py]({self.describedBys[file]})"
172+
f'aind-data-schema docs: <a href="https://aind-data-schema.readthedocs.io/en/latest/{file}.html" target="_blank">{file}.json</a>'
159173
)
160174
data = pn.pane.JSON(self.record[file], width=FIXED_WIDTH - 50)
161175

0 commit comments

Comments
 (0)