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

[PY-664][PY-662] BUG: Rasters import for videos fails on darwin-py 0.8.54 #762

Merged
merged 8 commits into from
Jan 15, 2024

Conversation

saurbhc
Copy link
Member

@saurbhc saurbhc commented Jan 4, 2024

Problem

A customer hit an error with importing rasters 'VideoAnnotation' object has no attribute 'data' that I was able to reproduce on darwin-py 0.8.54 but imported successfully on 0.

Solution

Handle Raster Layer checks for VideoAnnotation object.

Changelog

Support Raster Layer checks for VideoAnnotation object.

@saurbhc saurbhc added bug Something isn't working enhancement New feature or request labels Jan 4, 2024
@saurbhc saurbhc self-assigned this Jan 4, 2024
@saurbhc saurbhc marked this pull request as ready for review January 4, 2024 17:52
Copy link
Contributor

@owencjones owencjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments to consider.

darwin/importer/importer.py Outdated Show resolved Hide resolved
darwin/importer/importer.py Outdated Show resolved Hide resolved
darwin/importer/importer.py Outdated Show resolved Hide resolved
darwin/importer/importer.py Outdated Show resolved Hide resolved
for frame_index, _annotation in annotation.frames.items():
_annotation_id = _annotation.id
if (
frame_index in rl_dense_rle_ids_frames and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be tempted to break this down into a meaningfully named boolean

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, as there's only 1 unique if check like this now - does this still apply? happy to create a variable and write if variable block there instead something like:

variable = (if statement)
if variable:
    ...

What do you think?

darwin/importer/importer.py Outdated Show resolved Hide resolved
@saurbhc saurbhc requested review from owencjones and rslota and removed request for Nathanjp91 and owencjones January 10, 2024 12:31
@saurbhc saurbhc merged commit f8d9e2d into master Jan 15, 2024
16 checks passed
@saurbhc saurbhc deleted the PY-662 branch January 15, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants