-
Notifications
You must be signed in to change notification settings - Fork 47
[DAR-5929] Allow annotation and text properties import #1009
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
[DAR-5929] Allow annotation and text properties import #1009
Conversation
JBWilkie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add text properties to 1 additional E2E test: test_annotation_classes_are_created_with_properties_on_import
This creates a fresh ontology of classes and properties from local annotation files and an accompanying metadata.json file, then runs the standard import test. This will ensure we can create new text properties from manifest files. To do this, we'll need to:
- 1: Add text property values to some JSON files in the
e2e_tests/data/import/image_new_annotations_with_propertiesdirectory - 2: Add a text property to the
.v7/metadata.jsonfile in the same directory, such as:
"properties": [
{
"name": "ms1",
"type": "multi_select",
"description": "",
"required": true,
"property_values": [
{
"value": "1",
"color": "rgba(173,255,0,1.0)"
},
{
"value": "2",
"color": "rgba(143,255,0,1.0)"
}
]
},
{
"name": "my_text_prop",
"type": "text",
"description": "Write some text",
"required": false,
"property_values": []
},
umbertoDifa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM a part from the ugly size of what this import has become which isn't the purpose of this PR anyways.
A few tests we should have:
- Have we tested the scenario when we set a text section-level property to empty?
- Have we tested the scenario when we set a text annotation-level property to empty?
- What happens if we have text section level property with the same name of text annotation level property?
- What happens if the have a text annotation level property and an item level property with the same name?
…e for item and section/annotation level props
|
…f github.com:v7labs/darwin-py into dar-5929-importing-text-properties-fails-in-darwinpy
|
Can we add some tests to ensure fixes work as expected? Or the are already there and just data were missing? |
There are tests present, I've just expanded them with new data |
Problem
Currently importing annotation or section text properties fails.
Solution
Add support for annotation and section text properties. Expand e2e tests to cover this.
Changelog
Allow annotation and text properties import