From 2e5c1856477cb0bf50ad1de50cddf09d841acfbb Mon Sep 17 00:00:00 2001 From: SekouDiaoNlp Date: Wed, 12 May 2021 08:17:59 +0200 Subject: [PATCH 1/4] Handles Unicode decode errors. --- pylexique/pylexique.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pylexique/pylexique.py b/pylexique/pylexique.py index be2fd512d..c5fcbaa54 100644 --- a/pylexique/pylexique.py +++ b/pylexique/pylexique.py @@ -132,7 +132,7 @@ def __init__(self, lexique_path: Optional[str] = None) -> None: try: self._parse_lexique(self.lexique_path) except UnicodeDecodeError: - sys.exit(0) + raise UnicodeDecodeError(f"There was a unicod error while parsing {type(lexique_path)}.") except FileNotFoundError: if isinstance(lexique_path, str): raise ValueError(f"Argument 'lexique_path' must be a valid path to Lexique383") @@ -143,7 +143,7 @@ def __init__(self, lexique_path: Optional[str] = None) -> None: # Tries to load the pre-shipped Lexique38X if no path file to the lexicon is provided. self._parse_lexique(_RESOURCE_PATH) except UnicodeDecodeError: - sys.exit(0) + raise UnicodeDecodeError(f"There was a unicod error while parsing {type(lexique_path)}.") except FileNotFoundError: if isinstance(_RESOURCE_PATH, str): raise ValueError(f"Argument 'lexique_path' must be a valid path to Lexique383") From deb93efe00f193888867b1a3f3809ca76227a43c Mon Sep 17 00:00:00 2001 From: SekouDiaoNlp Date: Wed, 12 May 2021 08:19:58 +0200 Subject: [PATCH 2/4] =?UTF-8?q?Bump=20version:=201.3.0=20=E2=86=92=201.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pylexique/__init__.py | 2 +- setup.cfg | 9 ++++----- setup.py | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pylexique/__init__.py b/pylexique/__init__.py index 580056ff7..af7562aba 100644 --- a/pylexique/__init__.py +++ b/pylexique/__init__.py @@ -4,7 +4,7 @@ __author__ = """SekouDiaoNlp""" __email__ = 'diao.sekou.nlp@gmail.com' -__version__ = '1.3.0' +__version__ = '1.3.1' __copyright__ = "Copyright (c) 2021, SekouDiaoNlp" __credits__ = ("Lexique383",) __license__ = "MIT" diff --git a/setup.cfg b/setup.cfg index 82d00bb52..365e38603 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.3.0 +current_version = 1.3.1 commit = True tag = True @@ -21,8 +21,7 @@ exclude = docs test = pytest [tool:pytest] -filtererrors = - error - ignore::SystemExit +filtererrors = + error + ignore::SystemExit collect_ignore = ['setup.py'] - diff --git a/setup.py b/setup.py index 3b41833cb..cfe74a0ec 100644 --- a/setup.py +++ b/setup.py @@ -65,6 +65,6 @@ test_suite='tests', tests_require=test_requirements, url='https://github.com/SekouDiaoNlp/pylexique', - version='1.3.0', + version='1.3.1', zip_safe=False, ) From 1c267160a06ba83c82a270a4099c33bc7375ce54 Mon Sep 17 00:00:00 2001 From: SekouDiaoNlp Date: Wed, 12 May 2021 08:22:51 +0200 Subject: [PATCH 3/4] Updated the release notes --- HISTORY.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index d09c21d8f..7120adc0a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,13 @@ History ======= +1.3.1 (2021-05-12) +------------------ + +* Uses pandas for now for faster resource loading. +* Uses xlsb file for storage and faster load times +* Updated dependencies. + 1.3.0 (2021-05-11) ------------------ From cc7e38bcb7fc8cd935e50af465ea65892930b93f Mon Sep 17 00:00:00 2001 From: Sekou Diao Date: Thu, 13 May 2021 12:37:37 +0200 Subject: [PATCH 4/4] fixed typo. --- docs/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.rst b/docs/usage.rst index 60cccd5f5..16b765974 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -3,7 +3,7 @@ Usage ===== .. NOTE:: The language of the lexical entries is French. - The cLexical Corpus is based on `Lexique383`_. + The Lexical Corpus is based on `Lexique383`_. Also note that pylexique only works on Python 3.X.