Project View turned into File View after using syndccutils template

Description

I installed syndccutils from the python setup.py and ran this code

and the CSBC/PSON Project View (syn10142562) turned into a File View.

Environment

My version of the python and the terminal synapse client is 1.9.0.

Activity

Show:
Kimyen Truong
February 7, 2019, 1:37 AM

In constructing the EntityViewSchema, we check for the deprecated type and convert it to viewTypeMask: https://github.com/Sage-Bionetworks/synapsePythonClient/blob/master/synapseclient/table.py#L773

However, syn.get does not end up calling the constructor with the explicit information: https://github.com/Sage-Bionetworks/synapsePythonClient/blob/master/synapseclient/entity.py#L214

This results in the constructor not knowing that type exists in the properties to extract and does the migration correctly.

Kimyen Truong
February 7, 2019, 1:43 AM

, what do you think about the priority of this issue?
The implication here is anyone using Synapse Python client version 1.9.1 modifying a view that was created before viewTypeMask was added to PLFM will accidentally convert their view to a File View.

Before viewTypeMask, we only have the following view type: file, project, file_and_table (https://docs.synapse.org/rest/org/sagebionetworks/repo/model/table/ViewType.html).
So views with types “project” or “file_and_table” are prone to this bug.

Meredith Slota
February 7, 2019, 5:52 PM

I'd say this is an important one to fix – what would you think about doing a 1.9.2 version that could contain fixes to this? Are there other small fixes (documentation, for example) that could go into a 1.9.2?

Kimyen Truong
February 7, 2019, 5:55 PM

I agree with fixing this in 1.9.2. I do not know if there are other tickets that could go into 1.9.2. But I will start with assign this one to py-1.9.2 and go over py-2.0 issues to see if there are any ticket that can be move to 1.9.2.

Kimyen Truong
February 7, 2019, 8:19 PM

With the proposed fix, viewTypeMask is set correctly and deprecated type is gone:

Assignee

Kimyen Truong

Reporter

Xengie Doan

Labels

Validator

Xengie Doan

Development Area

None

Release Version History

None

Components

Sprint

None

Fix versions

Affects versions

Priority

Major
Configure