Releases: Sage-Bionetworks/synapsePythonClient
v2.1.0
Highlights:
-
A
max_threadsproperty of the Synapse object has been added to customize the number of concurrent threads that will be used during file transfers.import synapseclient syn = synapseclient.login() syn.max_threads = 20If not customized the default value is (CPU count + 4). Adjusting this value
higher may speed up file transfers if the local system resources can take advantage of the higher setting.
Currently this value applies only to files whose underlying storage is AWS S3.Alternately, a value can be stored in the synapseConfig configuration file that will automatically apply
as the default if a value is not explicitly set.[transfer] max_threads=16 -
This release includes support for directly accessing S3 storage locations using AWS Security Token Service
credentials. This allows use of external AWS clients and libraries with Synapse storage, and can be used to
accelerate file transfers under certain conditions. To create an STS enabled folder and set-up direct access to S3 storage, see here. -
The
getAnnotationsandsetAnnotationsmethods of the Synapse object have been deprecated in
favor of newerget_annotationsandset_annotationsmethods, respectively. The newer versions
are parameterized with a typedAnnotationsdictionary rather than a plain Python dictionary to prevent
existing annotations from being accidentally overwritten. The expected usage for setting annotations is to first retrieve the existingAnnotationsfor an entity before saving changes by passing back a modified value.annos = syn.get_annotations('syn123') # set key 'foo' to have value of 'bar' and 'baz' annos['foo'] = ['bar', 'baz'] # single values will automatically be wrapped in a list once stored annos['qwerty'] = 'asdf' annos = syn.set_annotations(annos)The deprecated annotations methods may be removed in a future release.
A full list of issues addressed in this release are below.
Bug
- [SYNPY-913] - Travis Build badge for develop branch is pointing to pull request
- [SYNPY-960] - AppVeyor build badge appears to be failed while the builds are passed
- [SYNPY-1036] - different users storing same file to same folder results in 403
- [SYNPY-1056] - syn.getSubmissions fails due to new Annotation class in v2.1.0-rc
Improvement
- [SYNPY-1036] - Make upload speeds comparable to those of the AWS S3 CLI
- [SYNPY-1049] - Expose STS-related APIs
Task
- [SYNPY-1059] - Use collections.abc instead of collections
v2.0.0
Highlights
-
Multi-threaded download of files from Synapse can be enabled by setting
syn.multi_threadedtoTrueon asynapseclient.Synapseobject. This will become the default implementation in the future, but to ensure stability for the first release of this feature, it must be intentionally enabled.import synapseclient syn = synapseclient.login() syn.multi_threaded = True # syn123 now will be downloaded via the multi-threaded implementation syn.get("syn123")Currently, multi-threaded download only works with files stored in AWS S3, where most files on Synapse reside. This also includes custom storage locations that point to an AWS S3 bucket. Files not stored in S3 will fall back to single-threaded download even if
syn.multi_threaded==True. -
synapseutils.copy()now has limitations on what can be copied- A user must have download permissions on the entity they want to copy.
- Users cannot copy any entities that have access requirements.
-
contentTypesandfileNamesare optional parameters insynapseutils.copyFileHandles() -
Synapse Docker Repository(
synapseclient.DockerRepository) objects can now be submitted to Synapse evaluation queues using theentityargument insynapseclient.Synapse.submit(). An optional argumentdocker_tag="latest"has also been added tosynapseclient.Synapse.submit()" to designate which tagged Docker image to submit.
A full list of issues addressed in this release are below.
Bug
- [SYNPY-271] - cache.remove fails to return the file handles we removed
- [SYNPY-1032] - Support new columnTypes defined in backend
Task
- [SYNPY-999] - Remove unsafe copy functions from client
- [SYNPY-1027] - Copy function should copy things when users are part of a Team
that has DOWNLOAD access
Improvement
- [SYNPY-389] - submission of Docker repository
- [SYNPY-537] - synapseutils.copyFileHandles requires fields that does not require
at rest - [SYNPY-680] - synapseutils.changeFileMetaData() needs description in
documentation - [SYNPY-682] - improve download speeds to be comparable to AWS
- [SYNPY-807] - Drop support for Python 2
- [SYNPY-907] - Replace `from <module> import ...` with `import <module>`
- [SYNPY-962] - remove 'password' as an option in default synapse config file
- [SYNPY-972] - Link on Synapse Python Client Documentation points back at itself
v1.9.4
Bug
- [SYNPY-881] -
Synu.copy fails when copying a file with READ permissions - [SYNPY-888] -
Docker repositories cannot be copied - [SYNPY-927] -
trying to create a project with name that already exists hangs - [SYNPY-1005] -
cli docs missing sub-commands - [SYNPY-1018] -
Synu.copy shouldn't copy any files with access restrictions
New Feature
- [SYNPY-851] -
invite user or list of users to a team
Improvement
- [SYNPY-608] -
Add how to contribute md to github project - [SYNPY-735] -
command line for building a table - [SYNPY-864] -
docstring for the command line client doesn't have complete list of
sub-commands available - [SYNPY-926] -
allow forceVersion false for command line client - [SYNPY-1013] -
Documentation of "store" command for Synapse command line client - [SYNPY-1021] -
change email contact for code of conduct
v1.9.2
In version 1.9.2, we improved Views' usability by exposing set_entity_types() function to change the entity types that will show up in a View:
import synapseclient
from synapseclient.table import EntityViewType
syn = synapseclient.login()
view = syn.get("syn12345")
view.set_entity_types([EntityViewType.FILE, EntityViewType.FOLDER])
view = syn.store(view)
Features
- [SYNPY-919] - Expose a way to update entity types in a view using EntityViewType
Bug Fixes
- [SYNPY-855] - Single thread uploading fails in Lambda python3.6 environment
- [SYNPY-910] - Store Wiki shows deprecation warning
- [SYNPY-920] - Project View turned into File View after using syndccutils template
Tasks
- [SYNPY-790] - Pin to a fixed version of the request package
- [SYNPY-866] - Update Synapse logo in Python docs :)
Improvements
v1.9.1
In version 1.9.1, we fix various bugs and added two new features:
- Python 3.7 is supported.
- Deprecation warnings are visible by default.
Features
Bug Fixes
- [SYNPY-454] -Some integration tests do not clean up after themselves
- [SYNPY-456] -Problems with updated query system
- [SYNPY-515] -sphinx documentation not showing for some new classes
- [SYNPY-526] -deprecate downloadTableFile()
- [SYNPY-578] -switch away from POST /entity/#/table/deleterows
- [SYNPY-594] -Getting error from dev branch in integration test against staging
- [SYNPY-796] -fix or remove PyPI downloads badge in readme
- [SYNPY-799] -Unstable test: Test PartialRow updates to entity views from rowset queries
- [SYNPY-846] -error if password stored in config file contains a '%'
Tasks
- [SYNPY-491] -Figure out custom release note fitlers
- [SYNPY-840] -Install not working on latest python
- [SYNPY-847] -uploadFileHandle should not be deprecated nor removed
- [SYNPY-852] -Check and update docs.synapse.org to reflect the change in the Python client
- [SYNPY-860] -vignette for how to upload a new version of a file directly to a Synapse entity
- [SYNPY-863] -Update public documentation to move away from the query services
- [SYNPY-866] -Update Synapse logo in Python docs :)
- [SYNPY-873] -consolidate integration testing to platform dev account
Improvements
- [SYNPY-473] -Change syn.list to no longer use deprecated function chunkedQuery
- [SYNPY-573] -synapse list command line shouldn't list the parent container
- [SYNPY-581] -<entity>.annotations return object is inconsistent with
getAnnotations() - [SYNPY-612] -Rename view_type to viewType in EntityViewSchema for consistency
- [SYNPY-777] -Python client _list still uses chunckedQuery and result seem out of date
- [SYNPY-804] -Update styling in the python docs to more closely match the Docs site styling
- [SYNPY-815] -Update the build to use test user instead of migrationAdmin
- [SYNPY-848] -remove outdated link to confluence for command line query
- [SYNPY-856] -build_table example in the docs does not look right
- [SYNPY-858] -Write file view documentation in python client that is similar to Synapser
- [SYNPY-870] -Submitting to an evaluation queue can't accept team as int
v1.9.0
In version 1.9.0, we deprecated and removed query() and chunkedQuery(). These functions used the old query services which does not perform well. To query for entities filter by annotations, please use EntityViewSchema.
We also deprecated the following functions and will remove them in Synapse Python client version 2.0. In the Activity object:
usedEntity()usedURL()
In the Synapse object:
getEntity()loadEntity()createEntity()updateEntity()deleteEntity()downloadEntity()uploadFile()uploadFileHandle()uploadSynapseManagedFileHandle()downloadTableFile()
Please see our documentation for more details on how to migrate your code away from these functions.
Features
- SYNPY-806 - Support Folders and Tables in View
Bug Fixes
- SYNPY-195 - Dangerous exception handling
- SYNPY-261 - error downloading data from synapse (python client)
- SYNPY-694 - Uninformative error in copyWiki function
- SYNPY-805 - Uninformative error when getting View that does not exist
- SYNPY-819 - command-line clients need to be updated to replace the EntityView
viewTypewithviewTypeMask
Tasks
- SYNPY-759 - Look for all functions that are documented as “Deprecated” and apply the deprecation syntax
- SYNPY-812 - Add Github issue template
- SYNPY-824 - Remove the deprecated function query() and chunkedQuery()
Improvements
v1.8.2
Release notes - Synapse Python Client - Version 1.8.2
Install Instructions: pip install --upgrade synapseclient or see http://docs.synapse.org/python/#installation
Documentation: http://sage-bionetworks.github.io/synapsePythonClient
Release Date: 17-August-2018
In this release, we have been performed some house-keeping on the code base. The two major changes are:
- making
syn.move()available to move an entity to a new parent in Synapse. For example:
import synapseclient
from synapseclient import Folder
syn = synapseclient.login()
file = syn.get("syn123")
folder = Folder("new folder", parent="syn456")
folder = syn.store(folder)
# moving file to the newly created folder
syn.move(file, folder)
- exposing the ability to use the Synapse Python client with single threaded. This feature is useful when running Python script in an environment that does not support multi-threading. However, this will negatively impact upload speed. To use single threaded:
import synapseclient
synapseclient.config.single_threaded = True
Bug
- [SYNPY-535] - Synapse Table update: Connection Reset
- [SYNPY-603] - Python client and synapser cannot handle table column type LINK
- [SYNPY-688] - Recursive get (sync) broken for empty folders.
- [SYNPY-744] - KeyError when trying to download using Synapse Client 1.8.1
- [SYNPY-750] - Error in downloadTableColumns for file view
- [SYNPY-758] - docs in Sphinx don't show for synapseclient.table.RowSet
- [SYNPY-760] - Keyring related error on Linux
- [SYNPY-766] - as_table_columns() returns a list of columns out of order for python 3.5 and 2.7
- [SYNPY-776] - Cannot log in to Synapse - error(54, 'Connection reset by peer')
- [SYNPY-795] - Not recognizable column in query result
New Feature
- [SYNPY-582] - move file or folder in the client
- [SYNPY-788] - Add option to use syn.store() without exercising multithreads
Task
- [SYNPY-729] - Deprecate query() and chunkedQuery()
- [SYNPY-797] - Check Python client code base on using PLFM object model
- [SYNPY-798] - Using github.io to host documentation
Improvement
v1.8.1
Release notes - Synapse Python Client - Version 1.8.1
Install Instructions: pip install --upgrade synapseclient or see http://docs.synapse.org/python/#installation
Documentation: http://docs.synapse.org/python/
Release Date: 7-May-2018
This release is a hotfix for a bug.
Please refer to 1.8.0 release notes for information about additional changes.
Bug
- [SYNPY-706] - syn.username can cause attribute not found if user not logged in
v1.8.0
Release notes - Synapse Python Client - Version 1.8.0
Install Instructions: pip install --upgrade synapseclient or see http://docs.synapse.org/python/#installation
Documentation: http://docs.synapse.org/python/
Release Date: 7-May-2018
This release has 2 major changes:
-
The client will no longer store your saved credentials in your synapse cache (
~/synapseCache/.session). The python client now relies on keyring to handle credential storage of your Synapse credentials. -
The client also now uses connection pooling, which means that all method calls that connect to Synapse should now be faster.
The remaining changes are bugfixes and cleanup of test code.
Below are the full list of issues addressed by this release:
Bug
- [SYNPY-654] - syn.getColumns does not terminate
- [SYNPY-658] - Security vunerability on clusters
- [SYNPY-689] - Wiki's attachments cannot be None
- [SYNPY-692] - synapseutils.sync.generateManifest() sets contentType incorrectly
- [SYNPY-693] - synapseutils.sync.generateManifest() UnicodeEncodingError in python 2
Task
- [SYNPY-617] - Remove use of deprecated service to delete table rows
- [SYNPY-673] - Fix Integration Tests being run on Appveyor
- [SYNPY-683] - Clean up print()s used in unit/integration tests