syncToSynapse adds empty annotation values

Description

When users upload with a manifest that contains missing values (see attached example, e.g. specimenID etc.), keys with empty values are assigned to the entity.

There are several cases where empty values will end up in the manifest. For one, the schema might only be applicable to a subset of entities in the manifest.

Before creating a dictionary from the manifest, keys with empty values should be removed.

Environment

mac Os 10.15.6

Activity

Show:
Kelsey Montgomery
February 17, 2021, 1:29 AM

Tested the new release with the same file linked in the above bug report.

Kelsey Montgomery
February 17, 2021, 1:29 AM

works perfectly!

Jordan Kiang
February 10, 2021, 7:11 PM

could you validate that this is working as you expect it to in the release candidate for Synapse Client Python 2.3.

It can be installed e.g.

pip3 install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "synapseclient>=2.3.0"

Milen Nikolov
October 23, 2020, 10:26 PM

Great, in this case I can confirm there aren’t any stoppers on my end for implementing the change.

Jordan Kiang
October 23, 2020, 9:54 PM

This is in the context of the existing behavior for the current client’s syncToSynapse manifest upload only, where there is some ambiguity in a TSV file upload if an empty column in a file means apply no annotation or apply an empty annotation.

If we made this change, it would only apply in that context and other existing behavior would remain unchanged, i.e. you’d still be able to explicitly set_annotations with an empty value.

This change would not affect any plans for the upcoming newer annotation system.

Fixed

Assignee

Jordan Kiang

Reporter

Kelsey Montgomery

Labels

None

Validator

Kelsey Montgomery

Development Area

None

Release Version History

None

Slack Channel

None

Fix versions

Affects versions

Priority

Major