Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Feb 14, 2025
2 parents e5f157c + 3f0e24a commit 65b5199
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
11 changes: 8 additions & 3 deletions src/aind_qc_portal/projects/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,15 @@ def _get_assets(self):
# Rename some columns and add some additional helper columns
self._df = pd.DataFrame(data)
self._df["timestamp"] = pd.to_datetime(
self._df["session_start_time"], format="mixed"
self._df["session_start_time"], format="mixed", utc=True
)
self._df["Acquisition Time"] = self._df["timestamp"].dt.strftime(
"%Y-%m-%d %H:%M:%S"
# replace None with NaT
self._df["Acquisition Time"] = pd.to_datetime(
self._df["session_start_time"], format="mixed",
).apply(
lambda x: x.strftime("%Y-%m-%d %H:%M:%S")
if x is not None and x is not pd.NaT
else None
)
self._df["S3 link"] = self._df["location"].apply(
lambda x: format_link(x, text="S3 link")
Expand Down
7 changes: 4 additions & 3 deletions src/aind_qc_portal/qc_project_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def __init__(self, **params):
"""Initialize the settings"""
super().__init__(**params)

self.project_name_selector = pn.widgets.Select(name="Project Name", options=get_project_names())
project_names = get_project_names()
project_names = [x for x in project_names if x is not None]
project_names.sort()
self.project_name_selector = pn.widgets.Select(name="Project Name", options=project_names)
self.project_name_selector.link(self, value="project_name")

def panel(self):
Expand Down Expand Up @@ -119,8 +122,6 @@ def refresh(project_name):


# Add the header project dropdown list
project_names = get_project_names()

interactive_header = pn.bind(update_header, settings.project_name_selector)
header = pn.Row(interactive_header, pn.HSpacer(), width=990, styles=OUTER_STYLE)

Expand Down

0 comments on commit 65b5199

Please sign in to comment.