Skip to content

Commit

Permalink
chore: removing some debug statements, minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Dec 12, 2024
1 parent 8aa4e35 commit 7c764d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/aind_qc_portal/panel/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _parse_type(reference, data):
data : _type_
_description_
"""
print(f"Parsing type: {reference} with data: {data}")
# print(f"Parsing type: {reference} with data: {data}")

if "https://s3" in data:
data = _get_s3_file(data, os.path.splitext(reference)[1])
Expand Down Expand Up @@ -281,7 +281,7 @@ def _get_s3_data(bucket, key):
S3 key name
"""

print((f"Getting S3 data for {bucket}/{key}"))
# print((f"Getting S3 data for {bucket}/{key}"))
try:
response = s3_client.get_object(Bucket=bucket, Key=key)
data = BytesIO(response["Body"].read())
Expand All @@ -301,7 +301,7 @@ def _get_kachery_cloud_url(hash: str):
"""
timestamp = int(time.time() * 1000)

print(f"Getting kachery-cloud URL for {hash}")
# print(f"Getting kachery-cloud URL for {hash}")

# take the full hash string, e.g. sha1://fb558dff5ed3c13751b6345af8a3128b25c4fa70?label=vid_side_camera_right_start_0_end_0.1.mp4 and just get the hash
simplified_hash = hash.split("?")[0].split("://")[1]
Expand Down
8 changes: 3 additions & 5 deletions src/aind_qc_portal/panel/quality_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ def status_panel(self):
# We'll loop over stage and modality to build a table

data = []
for modality in self.modalities:
for stage in self.stages:
for stage in self.stages:
for modality in self.modalities:
data.append(
{
"Group": modality.abbreviation,
Expand All @@ -191,8 +191,7 @@ def status_panel(self):
),
}
)
for tag in self.tags:
for stage in self.stages:
for tag in self.tags:
data.append(
{
"Group": tag,
Expand All @@ -204,7 +203,6 @@ def status_panel(self):
)

df = pd.DataFrame(data, columns=["Group", "Stage", "Status"])
print(df)

# Reshape the DataFrame using pivot_table
df_squashed = df.pivot_table(
Expand Down

0 comments on commit 7c764d1

Please sign in to comment.