From 7f59af4356d827d96b795b79c3e348a4d2e97c4d Mon Sep 17 00:00:00 2001 From: Christophe Morisset Date: Thu, 7 Nov 2024 13:36:07 -0600 Subject: [PATCH 1/4] resolve bug in extract_flt --- pyneb/utils/manage_atomic_data.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pyneb/utils/manage_atomic_data.py b/pyneb/utils/manage_atomic_data.py index 810f1af..cc80f1c 100644 --- a/pyneb/utils/manage_atomic_data.py +++ b/pyneb/utils/manage_atomic_data.py @@ -617,18 +617,15 @@ def extract_flt(str_): extract_flt('(123.00?') -> 123.00 """ res = '' - if len(str_) > 0: - if str_.decode()[0] in ('(', '['): - str_ = str_[1:] - for l in str_.decode(): + this_str_ = str_.decode() if isinstance(str_, bytes) else str_ + if len(this_str_) > 0 and this_str_[0] in ('(', '['): + this_str_ = this_str_[1:] + for l in this_str_: if l.isdigit() or l == '.': res += l else: break - if res == '': - return np.nan - else: - return float(res) + return np.nan if res == '' else float(res) def readNIST(NISTfile,NLevels=None): """ From 1bcd97586f102e9d8e00217d35e9d618f73a5c3a Mon Sep 17 00:00:00 2001 From: Christophe Morisset Date: Thu, 7 Nov 2024 13:37:31 -0600 Subject: [PATCH 2/4] 1.1.21b1 --- pyneb/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyneb/version.py b/pyneb/version.py index 8867348..c7a7454 100644 --- a/pyneb/version.py +++ b/pyneb/version.py @@ -1,2 +1,2 @@ # PyNeb version -__version__ = '1.1.20' +__version__ = '1.1.21b1' From 90e948e867f3a2472e517e69f08947a2b197e9ef Mon Sep 17 00:00:00 2001 From: Christophe Morisset Date: Thu, 7 Nov 2024 13:40:22 -0600 Subject: [PATCH 3/4] add pull in updatePyNeb --- updatePyNeb.md | 1 + 1 file changed, 1 insertion(+) diff --git a/updatePyNeb.md b/updatePyNeb.md index 2f08cfb..b613d74 100644 --- a/updatePyNeb.md +++ b/updatePyNeb.md @@ -27,6 +27,7 @@ Publish the new version on the pypi server ============================= * Switch to master branch +* synchronize with repository: git pull * Run the following from the root directory (where dist is) and check the tar file is created in dist: `python setup.py sdist` * Run the following to upload the tar file to pypi server. **Update the value of the distribution in {0}:** From 19888a9274c7a52aa8d016089d818c1ca7d2116f Mon Sep 17 00:00:00 2001 From: Christophe Morisset Date: Thu, 7 Nov 2024 13:47:04 -0600 Subject: [PATCH 4/4] 1.1.21 --- pyneb/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyneb/version.py b/pyneb/version.py index c7a7454..a058468 100644 --- a/pyneb/version.py +++ b/pyneb/version.py @@ -1,2 +1,2 @@ # PyNeb version -__version__ = '1.1.21b1' +__version__ = '1.1.21'