diff --git a/CHANGELOG.md b/CHANGELOG.md index da6389f..22c7e54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changes ======= +Beta 0.9.1 +---------- +Changes: +* Changed api method `get_sample_by_name` to use new irida endpoint. +* Minimum IRIDA version is now `23.01` + Beta 0.9.0 ---------- Changes: diff --git a/docs/developers/api.md b/docs/developers/api.md index f8ec68a..3b094c3 100644 --- a/docs/developers/api.md +++ b/docs/developers/api.md @@ -143,8 +143,6 @@ Sample Object or None #### get_sample_by_name(self, project_id, sample_name) Given a project id and sample name, returns a Sample object, or None is sample does not exist -Note: this currently uses the deprecated endpoint "/projects/{project_id}/samples/bySequencerId/{sample_name}" - **arguments:** project_id -- id where sample is located diff --git a/docs/index.md b/docs/index.md index d95eb73..c10fdd3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -19,9 +19,9 @@ ## Version Compatibility -**IRIDA Uploader Version 0.5.0** and later require IRIDA to be at least **IRIDA Version 20.05** +**IRIDA Uploader Version 0.9.1** and later require IRIDA to be at least **IRIDA Version 23.01** -If you are using an older version of IRIDA, you can use **IRIDA Uploader Version 0.4.3**, but we recommend that you speak with your IRIDA administrator to upgrade to the latest version. +If you are using an older version of IRIDA, you can use **IRIDA Uploader Version 0.9.0**, but we recommend that you speak with your IRIDA administrator to upgrade to the latest version. # Getting Started diff --git a/iridauploader/__init__.py b/iridauploader/__init__.py index 484422f..06f3f13 100644 --- a/iridauploader/__init__.py +++ b/iridauploader/__init__.py @@ -1 +1 @@ -VERSION_NUMBER = "0.9.0" +VERSION_NUMBER = "0.9.1" diff --git a/iridauploader/api/api_calls.py b/iridauploader/api/api_calls.py index a42d22d..40746ba 100644 --- a/iridauploader/api/api_calls.py +++ b/iridauploader/api/api_calls.py @@ -51,7 +51,7 @@ JSON_HEADERS = {"headers": {'Content-Type': 'application/json', **SESSION_HEADERS}} -MINIMUM_IRIDA_VERSION = "20.05" +MINIMUM_IRIDA_VERSION = "23.01" class ApiCalls(object): @@ -660,13 +660,11 @@ def get_sample_by_name(self, project_id, sample_name): logging.info("Getting Sample object for project id '{}' and sample name '{}'".format(project_id, sample_name)) - # This is using a deprecated end point. In a future release it will be replaced with - # /projects/{project_id}/samples/bySampleName - # and use params instead - url = f"{self.base_url}projects/{project_id}/samples/bySequencerId/{sample_name}" + url = f"{self.base_url}projects/{project_id}/samples/bySampleName" + params = {'sampleName': sample_name} try: - response = self._session.get(url) + response = self._session.get(url, params=params) except Exception as e: raise ApiCalls._handle_rest_exception(url, e) if response.status_code == HTTPStatus.OK: # 200, return sample object diff --git a/setup.py b/setup.py index ec0b995..9399088 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name='iridauploader', - version='0.9.0', + version='0.9.1', description='IRIDA uploader: upload NGS data to IRIDA system', url='https://github.com/phac-nml/irida-uploader', author='Jeffrey Thiessen', diff --git a/windows-installer.cfg b/windows-installer.cfg index de0e472..5aed2bc 100644 --- a/windows-installer.cfg +++ b/windows-installer.cfg @@ -1,6 +1,6 @@ [Application] name=IRIDA Uploader GUI -version=0.9.0 +version=0.9.1 entry_point=iridauploader.gui.gui:main icon=iridauploader/gui/images/icon.ico # Uncomment this to have a console show alongside the application