v7labs / darwin-py

Library and commandline tool for managing datasets on darwin.v7labs.com
MIT License
115 stars 42 forks source link

[PLA-639][External] Allow properties to be imported for annotations without IDs #803

Closed JBWilkie closed 5 months ago

JBWilkie commented 5 months ago

Problem

Currently, annotations with properties can only be imported if the annotation has an ID in the JSON file. Annotation IDs are not required for any other import functionality, so we should remove this requirement

Solution

When importing annotations, if an annotation does not have an ID, give it one with uuid.uuid4(). This works because we don't actually respect the ID that's assigned during import (to avoid clashes), it just needs to be a unique value per annotation

Changelog

Removed the requirement for annotation IDs to be present in imported JSON to successfully import properties

linear[bot] commented 5 months ago

PLA-639 Remove the annotation_id requirement from properties imports