From 6a5bc34845a9326a2895e26db00ece5dce4a9b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Gon=C3=A7alves?= <32108175+gfngoncalves@users.noreply.github.com> Date: Wed, 19 Apr 2023 17:27:30 +0100 Subject: [PATCH 1/7] ci: add building dependencies --- .github/workflows/test-cde.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-cde.yml b/.github/workflows/test-cde.yml index 9a836721..c3112c53 100644 --- a/.github/workflows/test-cde.yml +++ b/.github/workflows/test-cde.yml @@ -24,6 +24,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + pip install wheel setuptools pip install nbsphinx==0.3.5 nbsphinx-link m2r ipython ipykernel sphinx-rtd-theme pip install future==0.17.1 pip install unittest2==1.1.0 From 70fe08f3c18bd8001f7dc7aa172e222d70cf69f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Gon=C3=A7alves?= <32108175+gfngoncalves@users.noreply.github.com> Date: Thu, 20 Apr 2023 13:08:48 +0100 Subject: [PATCH 2/7] fix: add build requirements --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..9787c3bd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta" From 669904aa699f7e59d8955df6f5777e51d55ccc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Gon=C3=A7alves?= <32108175+gfngoncalves@users.noreply.github.com> Date: Thu, 20 Apr 2023 13:23:26 +0100 Subject: [PATCH 3/7] fix: pin wheel version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9787c3bd..593aa4f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools", "wheel<0.33.0,>0.32.0"] build-backend = "setuptools.build_meta" From f12d99f31cef86e9a518a397bef0d8693207adaa Mon Sep 17 00:00:00 2001 From: Oscar Giles Date: Thu, 20 Apr 2023 15:50:17 +0100 Subject: [PATCH 4/7] Remove playsound --- .github/workflows/test-cde.yml | 1 - chemdataextractor/eval/evaluation.py | 6 +++--- setup.py | 17 ++++++++--------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-cde.yml b/.github/workflows/test-cde.yml index c3112c53..6fdf96cf 100644 --- a/.github/workflows/test-cde.yml +++ b/.github/workflows/test-cde.yml @@ -28,7 +28,6 @@ jobs: pip install nbsphinx==0.3.5 nbsphinx-link m2r ipython ipykernel sphinx-rtd-theme pip install future==0.17.1 pip install unittest2==1.1.0 - pip install playsound pip install -r requirements/development.txt pip install . cde data download diff --git a/chemdataextractor/eval/evaluation.py b/chemdataextractor/eval/evaluation.py index f9b811f6..738adfdc 100644 --- a/chemdataextractor/eval/evaluation.py +++ b/chemdataextractor/eval/evaluation.py @@ -26,7 +26,7 @@ import sys import os import webbrowser -from playsound import playsound +# from playsound import playsound import pickle import pkg_resources import os @@ -155,7 +155,7 @@ def eval(self): print(" Updated: {}".format(record.updated)) if self.play_sound: sound_file = pkg_resources.resource_filename('chemdataextractor', 'eval/sound.mp3') - playsound(sound_file) + # playsound(sound_file) if not doc_opened and self.show_website: webbrowser.open(doc[0].metadata.html_url) @@ -272,7 +272,7 @@ def eval(self): if self.limits_reached: if self.play_sound: sound_end_file = pkg_resources.resource_filename('chemdataextractor', 'eval/sound_end.mp3') - playsound(sound_end_file) + # playsound(sound_end_file) break print("") f.close() diff --git a/setup.py b/setup.py index 5ab12c9c..fa9c29af 100644 --- a/setup.py +++ b/setup.py @@ -47,15 +47,14 @@ 'numpy<1.20; python_version >= "3.7.0"', "protobuf==3.*", # 'scipy', - "yaspin", - "deprecation", - "allennlp==0.9.0", - "tokenizers", - "scikit-learn==0.22.1", - "overrides==3.1.0", - "boto3==1.15.18", - "unittest2", - "playsound", + 'yaspin', + 'deprecation', + 'allennlp==0.9.0', + 'tokenizers', + 'scikit-learn==0.22.1', + 'overrides==3.1.0', + 'boto3==1.15.18', + 'unittest2', ], classifiers=[ "Intended Audience :: Developers", From d4dde49770ff5eecf7760a8279394946a9afc487 Mon Sep 17 00:00:00 2001 From: Oscar Giles Date: Thu, 20 Apr 2023 16:04:31 +0100 Subject: [PATCH 5/7] remove more playsound --- chemdataextractor/relex/snowball.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chemdataextractor/relex/snowball.py b/chemdataextractor/relex/snowball.py index 9bff86c7..a3f3f1fb 100644 --- a/chemdataextractor/relex/snowball.py +++ b/chemdataextractor/relex/snowball.py @@ -30,7 +30,7 @@ import logging from os.path import basename -from playsound import playsound +# from playsound import playsound import pkg_resources log = logging.getLogger(__name__) @@ -250,7 +250,7 @@ def train_from_sentence(self, s): if self.play_sound: sound_file = pkg_resources.resource_filename('chemdataextractor', 'eval/sound.mp3') - playsound(sound_file) + # playsound(sound_file) res = six.moves.input("...: ").replace(' ', '') if res: chosen_candidate_idx = res.split(',') From 814de5c731092cd2a5b0a0ba9e87f1f352b6dd66 Mon Sep 17 00:00:00 2001 From: Oscar Giles Date: Thu, 20 Apr 2023 16:14:00 +0100 Subject: [PATCH 6/7] Remove wheel version constraints: --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 593aa4f5..9787c3bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools", "wheel<0.33.0,>0.32.0"] +requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" From 7fabea34365725ea23654e3d4ff29880c55f894d Mon Sep 17 00:00:00 2001 From: Oscar Giles Date: Thu, 20 Apr 2023 16:32:41 +0100 Subject: [PATCH 7/7] Add wheel constraints back. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9787c3bd..593aa4f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools", "wheel<0.33.0,>0.32.0"] build-backend = "setuptools.build_meta"