I installed syndccutils from the python setup.py and ran this code
and the CSBC/PSON Project View (syn10142562) turned into a File View.
My version of the python and the terminal synapse client is 1.9.0.
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.
, 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.
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?
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.
With the proposed fix, viewTypeMask is set correctly and deprecated type is gone: