From 70286cad56141a46d03d7082a67f0390e7964269 Mon Sep 17 00:00:00 2001 From: Daniel Thonon Date: Sun, 7 Nov 2021 23:59:47 +0100 Subject: [PATCH 1/4] Fixed Issue #178 --- src/export_vn/data/evn_template.yaml | 2 +- src/newsfragments/178.bugfix | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 src/newsfragments/178.bugfix diff --git a/src/export_vn/data/evn_template.yaml b/src/export_vn/data/evn_template.yaml index a71fc1b..7109140 100644 --- a/src/export_vn/data/evn_template.yaml +++ b/src/export_vn/data/evn_template.yaml @@ -210,7 +210,7 @@ tuning: # Longer lists are split by API in max_list_length chunks. max_list_length: 100 # Max chunks in a request before aborting. - max_chunks: 10 + max_chunks: 1000 # Max retries of API calls before aborting. max_retry: 5 # Maximum number of API requests, for debugging only. diff --git a/src/newsfragments/178.bugfix b/src/newsfragments/178.bugfix new file mode 100644 index 0000000..f07ecc6 --- /dev/null +++ b/src/newsfragments/178.bugfix @@ -0,0 +1,3 @@ +Parameter max_chunks has been raised, by default to 1000, +to allow for much larger transfers. +Please consider modifying your existing YAML configuration files. \ No newline at end of file -- GitLab From c41f8052853390aefc3c186dbfc55c141ac44159 Mon Sep 17 00:00:00 2001 From: Daniel Thonon Date: Mon, 8 Nov 2021 14:35:49 +0100 Subject: [PATCH 2/4] Fix Issue #171 --- src/export_vn/download_vn.py | 2 +- src/newsfragments/171.bugfix | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 src/newsfragments/171.bugfix diff --git a/src/export_vn/download_vn.py b/src/export_vn/download_vn.py index febd65b..e417fd3 100755 --- a/src/export_vn/download_vn.py +++ b/src/export_vn/download_vn.py @@ -719,7 +719,7 @@ class Observations(DownloadVn): _("Getting updates for taxo_group %s since %s"), taxo, since ) items_dict = self._api_instance.api_diff( - taxo, since, modification_type="only_modified" + taxo, since, modification_type="all" ) # List by processing type diff --git a/src/newsfragments/171.bugfix b/src/newsfragments/171.bugfix new file mode 100644 index 0000000..9ada2bb --- /dev/null +++ b/src/newsfragments/171.bugfix @@ -0,0 +1,3 @@ +Observations were not deleted from PG database if deleted in Biolovision site. +This is fixed and deletion are now synchronized. +A full download is required to delete previous observations. \ No newline at end of file -- GitLab From 9e829f908cf8b105e1ba7749481cd55dc12b66e4 Mon Sep 17 00:00:00 2001 From: Daniel Thonon Date: Mon, 8 Nov 2021 14:57:03 +0100 Subject: [PATCH 3/4] Fix flake8 error --- src/biolovision/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biolovision/api.py b/src/biolovision/api.py index 9176ceb..3576386 100755 --- a/src/biolovision/api.py +++ b/src/biolovision/api.py @@ -327,7 +327,7 @@ class BiolovisionAPI: # Logging error and no further processing of empty chunk resp_chunk = json.loads("{}") logger.error(_("Incorrect response content: %s"), resp) - except Exception as e: + except Exception: logger.exception(_("Response text causing exception: %s"), resp.text) raise -- GitLab From 39f70819752f4a936cb49ee5aa66d33660ee419c Mon Sep 17 00:00:00 2001 From: Daniel Thonon Date: Mon, 8 Nov 2021 15:00:46 +0100 Subject: [PATCH 4/4] Preparing v2.9.3 --- CHANGELOG.rst | 14 ++++++++++++++ src/newsfragments/171.bugfix | 3 --- src/newsfragments/178.bugfix | 3 --- 3 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644 src/newsfragments/171.bugfix delete mode 100644 src/newsfragments/178.bugfix diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9bb5ee3..3a19b1c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,17 @@ +Client-API-VN v2.9.3 (2021-11-08) +================================= + +Bugfixes +-------- + +- Observations were not deleted from PG database if deleted in Biolovision site. + This is fixed and deletion are now synchronized. + A full download is required to delete previous observations. (`#171 `_) +- Parameter max_chunks has been raised, by default to 1000, + to allow for much larger transfers. + Please consider modifying your existing YAML configuration files. (`#178 `_) + + Client-API-VN v2.9.2 (2021-11-03) ================================= diff --git a/src/newsfragments/171.bugfix b/src/newsfragments/171.bugfix deleted file mode 100644 index 9ada2bb..0000000 --- a/src/newsfragments/171.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Observations were not deleted from PG database if deleted in Biolovision site. -This is fixed and deletion are now synchronized. -A full download is required to delete previous observations. \ No newline at end of file diff --git a/src/newsfragments/178.bugfix b/src/newsfragments/178.bugfix deleted file mode 100644 index f07ecc6..0000000 --- a/src/newsfragments/178.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Parameter max_chunks has been raised, by default to 1000, -to allow for much larger transfers. -Please consider modifying your existing YAML configuration files. \ No newline at end of file -- GitLab