diff --git a/docs/index.md b/docs/index.md index add9aef37..c8fbac296 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,6 +2,15 @@ [![Supported Python Versions](https://img.shields.io/pypi/pyversions/synapseclient.svg)](https://pypi.org/project/synapseclient/) +### **Notice for the upcoming v5.0 release:** + +- The upcoming v5.0 release will include a number of breaking changes. Take a look at +this [pubpub](https://sagebionetworks.pubpub.org/pub/828a3x4k/release/1) article +detailing some of the changes. +- A release date has not been set. A number of these changes will be available within +the 4.x.x versions hidden behind optional feature flags or different import paths. Any +breaking changes will not be included until v5.0. + The `synapseclient` package provides an interface to [Synapse](http://www.synapse.org), a collaborative, open-source research platform that allows teams to share data, track analyses, and collaborate, providing support for: - integrated presentation of data, code and text diff --git a/docs/news.md b/docs/news.md index 16434b0da..b06f2c9c1 100644 --- a/docs/news.md +++ b/docs/news.md @@ -1,5 +1,41 @@ # Release Notes +### **Notice for the upcoming v5.0 release:** + +- The upcoming v5.0 release will include a number of breaking changes. Take a look at +this [pubpub](https://sagebionetworks.pubpub.org/pub/828a3x4k/release/1) article +detailing some of the changes. +- A release date has not been set. A number of these changes will be available within +the 4.x.x versions hidden behind optional feature flags or different import paths. Any +breaking changes will not be included until v5.0. + +## 4.3.0 (2024-05-30) +### Highlights +- **New tutorial:** + - [Uploading data in bulk](../tutorials/python/upload_data_in_bulk) + is our newest tutorial. It covers the basics of working with manifest files to manage synapse projects. +- **Updates to syncToSynapse:** + - The `syncToSynapse` function has been refactored to improve performance and + reliability. + - **Minor behavior change:** File entities will no longer have it's version + incremented during no-op changes. Only when file content, or fields on the file + has been updated will a version number be incremented. + - Optional booleans `merge_existing_annotations` and + `associate_activity_to_new_version` have been added. Both are used to give more + fine tuned control when working with this interface. + - Check out the changes in the [reference docs](../reference/synapse_utils/#synapseutils.sync.syncToSynapse). + +### Bug Fixes +- \[[SYNPY-1456](https://sagebionetworks.jira.com/browse/SYNPY-1456)\] - Flaky Integration tests due to duplicate entity names +- \[[SYNPY-1466](https://sagebionetworks.jira.com/browse/SYNPY-1466)\] - user-agent not being set properly for synapse command line client +- \[[SYNPY-1474](https://sagebionetworks.jira.com/browse/SYNPY-1474)\] - Order of credentials being used does not match docstring + +### Stories +- \[[SYNPY-1356](https://sagebionetworks.jira.com/browse/SYNPY-1356)\] - Refactor `syncToSynapse` +- \[[SYNPY-1384](https://sagebionetworks.jira.com/browse/SYNPY-1384)\] - Uploading data in bulk +- \[[SYNPY-1427](https://sagebionetworks.jira.com/browse/SYNPY-1427)\] - Upgrade Pytest to v7 or later +- \[[SYNPY-1470](https://sagebionetworks.jira.com/browse/SYNPY-1470)\] - Make sure that sonarcloud executes even when tests fail + ## 4.2.0 (2024-04-17) ### Highlights diff --git a/docs/scripts/print_release_issues.py b/docs/scripts/print_release_issues.py index 9182ac4df..643381414 100755 --- a/docs/scripts/print_release_issues.py +++ b/docs/scripts/print_release_issues.py @@ -14,8 +14,9 @@ import argparse import collections import json -import urllib.request +import base64 import sys +import httpx JQL_ISSUE_URL = "https://sagebionetworks.jira.com/rest/api/2/search?jql=project={project}%20AND%20fixVersion={version}%20ORDER%20BY%20created%20ASC&startAt={start_at}" # noqa ISSUE_URL_PREFIX = "https://sagebionetworks.jira.com/browse/{key}" @@ -29,17 +30,35 @@ def _get_issues(project, version): start_at = 0 issues_by_type = {} - + client = httpx.Client() while True: - response = urllib.request.urlopen( - JQL_ISSUE_URL.format( - project=project, - version=version, - start_at=start_at, - ) + url = JQL_ISSUE_URL.format( + project=project, + version=version, + start_at=start_at, ) + # In order to use this script you need to create an API token + # Follow the link below and create a token - DO NOT COMMIT YOUR TOKEN TO VCS + # https://id.atlassian.com/manage-profile/security/api-tokens + # Use the following format for the token + # `username:token`, ie: `first.last@sagebase.org:token` + sample_string_bytes = "".encode("ascii") + if not sample_string_bytes: + raise RuntimeError( + "As of May 2024 you must authenticate in order to query jira. See the comments in the script for more information." + ) + + basic_auth = base64.b64encode(sample_string_bytes).decode("ASCII") + + client.headers["Authorization"] = f"Basic {basic_auth}" + response = client.get(url=url) response_json = json.loads(response.read()) + if response.status_code != 200: + raise RuntimeError( + f"Failed to get issues from JIRA: {response.status_code} {response.text}" + ) + issues = response_json["issues"] if not issues: break diff --git a/docs/tutorials/python/upload_data_in_bulk.md b/docs/tutorials/python/upload_data_in_bulk.md index 64934ea1f..45ed891d5 100644 --- a/docs/tutorials/python/upload_data_in_bulk.md +++ b/docs/tutorials/python/upload_data_in_bulk.md @@ -112,7 +112,7 @@ point. ## 5. Create an Activity/Provenance -Let's create an [Activity/Provenance](../../../explanations/domain_models_of_synapse/#activityprovenance) +Let's create an [Activity/Provenance](../../explanations/domain_models_of_synapse.md#activityprovenance) record for one of our files. In otherwords, we will record the steps taken to generate the file. @@ -152,4 +152,4 @@ navigated to the Files tab and selected the file that we added a Provenance reco - [syn.findEntityId][synapseclient.Synapse.findEntityId] - [synapseutils.generate_sync_manifest][] - [synapseutils.syncToSynapse][] -- [Activity/Provenance](../../../explanations/domain_models_of_synapse/#activityprovenance) +- [Activity/Provenance](../../explanations/domain_models_of_synapse.md#activityprovenance) diff --git a/synapseclient/synapsePythonClient b/synapseclient/synapsePythonClient index 4d29618b3..8f62ad73d 100644 --- a/synapseclient/synapsePythonClient +++ b/synapseclient/synapsePythonClient @@ -1,6 +1,6 @@ { "client": "synapsePythonClient", - "latestVersion": "4.2.0", + "latestVersion": "4.3.0", "blacklist": [ "0.0.0", "0.4.1",