Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Export annotations as a CSV (annotations pt. 5) #504

Open
wants to merge 8 commits into
base: feature/annotation-visualization
Choose a base branch
from

Conversation

ShrimpCryptid
Copy link
Contributor

@ShrimpCryptid ShrimpCryptid commented Dec 24, 2024

Problem

Part 5 of 5(?) for #484, annotation prototype.

This change adds the ability to export a CSV containing the annotation data! Each object ID is a row and the labels are listed as columns.

Estimated review size: small, 15 minutes (faster if whitespace changes are disabled)

Solution

  • Adds a CSV export button in the annotation.
  • Adds a new toCsv() method in AnnotationData, which serializes the annotations to a CSV string.
  • Added unit tests for handling bad label names and inputs.

Type of change

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. Open preview link: https://allen-cell-animated.github.io/timelapse-colorizer/pr-preview-internal/pr-504/
  2. Enable annotation mode and annotate several cells with different labels.
  3. Click the "Export as CSV" button to save a CSV file.
  4. Open the CSV file. It should render with the correct header names in Excel.

Screenshots (optional):

Video Talk-through (🔊):

2024-12-24.11-10-34.mp4

image

@ShrimpCryptid ShrimpCryptid added the new feature New feature or request label Dec 24, 2024
@ShrimpCryptid ShrimpCryptid self-assigned this Dec 24, 2024
Copy link

github-actions bot commented Dec 24, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://allen-cell-animated.github.io/timelapse-colorizer/pr-preview/pr-504/
on branch gh-pages at 2025-01-07 17:44 UTC

Copy link

github-actions bot commented Dec 24, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 76.31% 5632 / 7380
🔵 Statements 76.31% 5632 / 7380
🔵 Functions 60.7% 156 / 257
🔵 Branches 81.74% 479 / 586
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/colorizer/AnnotationData.ts 97.07% 90.9% 93.33% 97.07% 181-183, 187-188, 197-198, 249-250
Generated in workflow #1338

@ShrimpCryptid ShrimpCryptid changed the title feat: Export annotations as a CSV feat: Export annotations as a CSV (annotations pt. 5) Dec 24, 2024
@ShrimpCryptid ShrimpCryptid marked this pull request as ready for review December 24, 2024 19:09
@ShrimpCryptid ShrimpCryptid requested a review from a team as a code owner December 24, 2024 19:09
@ShrimpCryptid ShrimpCryptid requested review from meganrm and ascibisz and removed request for a team December 24, 2024 19:09
@ShrimpCryptid ShrimpCryptid linked an issue Dec 24, 2024 that may be closed by this pull request
@ShrimpCryptid ShrimpCryptid changed the title feat: Export annotations as a CSV (annotations pt. 5) feature: Export annotations as a CSV (annotations pt. 5) Jan 6, 2025
@ShrimpCryptid ShrimpCryptid force-pushed the feature/annotation-export-csv branch from abf9e9e to d5195f6 Compare January 6, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Annotation labels - prototype
3 participants