-
Notifications
You must be signed in to change notification settings - Fork 24
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
Metadata for Segments & Trees #7875
Conversation
I created a first version of this in the backend. It works for Trees, Nodes and Segments (not yet for groups). In proto, each of these now has a field
They can be set both in the “Create” and “Update” UpdateActions of the respective items. For example, the
The backend expects all update actions to include the full list for the edited item. So if it was nonempty first and is then updated to None, it is all cleared. The frontend should ensure that only one of stringValue, boolValue, numberValue, stringListValue is set for each item, and that each key is used only once per item. I also updated the NML format as written and parsed by the backend to include the userDeinedProperties. Looks like this:
|
…needed and not more than the user-specified (via drag) height
@fm3 I have two questions regarding the nml format:
<thing ...>
<nodes>...</nodes>
<edges>...</nodes>
<userDefinedProperties>
<userDefinedProperty ... />
...
</userDefinedProperties>
</thing> I think this would fit more nicely with the existing structure, but I'm happy to be convinced otherwise.
Having all values for the array in the same XML tag would be easier to parse for the front-end because we process each xml tag individually. also it would be less redundant because the key would only be stated once. what do you think? |
Sure, no objections :)
Yes! |
@fm3 Can I review the backend part? |
Yes. There is on open checkbox about which I am unsure (“Add assertions on duplicate keys”). Since the update actions are applied lazily, adding assertions there will break the next annotation loading. On the other hand, maybe there should rather be a readable error message than an inconsistent state. What do you think? I think for the other update actions, the backend does not do much checking 🤔 Other than that, the backend changes should be complete. |
I am unfamiliar with the backend code responsible for receiving the update actions. But in case the code iterates over the actions, one could run a simple duplicate key assertion over the metadata. Of cause, this needs to be done before the update actions are stored to be lazily applied. Another way to handle this could be to simply choose the first occurring entry with a key when applying the metadata update in the fossildb. Meaning dropping the duplicate key. This is already how the frontend behaves and I would say that this is fair to handle a "broken" update action this way.
How do you expect the user to escape from this error message state and recover such a broken annotation? |
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.
Checked frontend code again and works 🎉
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.
sorry, misclick 🙈, looking at the backend code now. I'll look at the "assertion" changes when they are pushed :)
Just to do the first review while I am still in context of this pr :)
That’s a good plan, I’ll go for that |
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.
Backend looks good except for the fact, that it supports metadata for treenodes but the frontend doesn't. I am unsure wherther to keep it.
And the changelog entry is missing. Will check your newest commit now :)
...scalableminds/webknossos/tracingstore/tracings/skeleton/updating/SkeletonUpdateActions.scala
Outdated
Show resolved
Hide resolved
...scalableminds/webknossos/tracingstore/tracings/skeleton/updating/SkeletonUpdateActions.scala
Outdated
Show resolved
Hide resolved
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.
- Ok changelog entry is done already :D
- Found one occurrence where the deduplication was still missing
Ok and lets wait for your answer on:
Backend looks good except for the fact, that it supports metadata for treenodes but the frontend doesn't. I am unsure wherther to keep it.
Before I give it a final green :D
...tore/app/com/scalableminds/webknossos/tracingstore/tracings/volume/VolumeUpdateActions.scala
Outdated
Show resolved
Hide resolved
@MichaelBuessemeyer good catch, maybe you could fix that here directly? |
Yeah sure, do you think it looks visually fine this way? I mean the second image from my previous post |
I think it’s fine, yes. Mostly it’s consistent. We can discuss later if we want to adapt the visual design again. (In fact, I’d probably vote to remove the illustration entirely. But not in this PR) |
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.
Then mergy merge?
URL of deployed dev instance (used for testing):
Steps to test:
TODOs:
[ ] nodes-> follow-up[ ] boolean-> follow-upIssues: