From 6dad9691e408eaf433f9f3707dc73b21778510d6 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 9 Nov 2023 17:01:48 +0100 Subject: [PATCH] 1.0.5 --- .github/scripts/release.py | 2 +- CHANGES.txt | 10 ++++++---- README.md | 5 +++++ chorusapi/utils/chorus_utils.py | 4 ++-- setup.cfg | 2 +- setup.py | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/scripts/release.py b/.github/scripts/release.py index ff12a0d..4e4c75a 100755 --- a/.github/scripts/release.py +++ b/.github/scripts/release.py @@ -32,7 +32,7 @@ def create_new_patch_release(): except subprocess.CalledProcessError as err: if err.stderr.decode("utf8").startswith("HTTP 404:"): # The project doesn't have any releases yet. - new_version_number = "1.0.4" + new_version_number = "1.0.5" else: raise else: diff --git a/CHANGES.txt b/CHANGES.txt index 6071173..3f42836 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,9 +1,11 @@ # Change Log / journal des changements -# 22/08/2023 -## IMPLEMENTATION OF CHORUS API - +# 09/11/2023 +## Fix base64 encoding method, Allow user can pass enconding # 23/08/2023 ## Add Etat courant du flux pour la methode consulter CR -## Reformat code and documentation \ No newline at end of file +## Reformat code and documentation + +# 22/08/2023 +## IMPLEMENTATION OF CHORUS API \ No newline at end of file diff --git a/README.md b/README.md index e8aa624..3369a70 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,11 @@ Chorus API Package [https://piste.gouv.fr](https://piste.gouv.fr) pip install chorus-api ``` +## 1.0.5 +#### CHANGES +* Fix **_base_64_encode_file_** method in utils +* Allow pass encoding + ## 1.0.4 #### CHANGES diff --git a/chorusapi/utils/chorus_utils.py b/chorusapi/utils/chorus_utils.py index 5bba67a..5b4f723 100644 --- a/chorusapi/utils/chorus_utils.py +++ b/chorusapi/utils/chorus_utils.py @@ -5,8 +5,8 @@ def base_64_encode(data: str): return base64.b64encode(data.encode()).decode() -def base_64_encode_file(filepath): - return base_64_encode(open(filepath).read()) +def base_64_encode_file(filepath, encoding="ISO-8859-1"): + return base_64_encode(open(filepath, encoding=encoding).read()) def base_64_decode(data: str): diff --git a/setup.cfg b/setup.cfg index 5153998..0878b07 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chorus-api -version = 1.0.4 +version = 1.0.5 author = Joel ONIPOH author_email = technique@cinego.net description = Chorus API Package https://piste.gouv.fr diff --git a/setup.py b/setup.py index 9056dff..15257f7 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="chorus-api", - version="1.0.4", + version="1.0.5", author="Joel ONIPOH", author_email="technique@cinego.net", description="Chorus API Package https://piste.gouv.fr",