From 77f5e921d5b83f4e863ddc5eef9008a39e8632f0 Mon Sep 17 00:00:00 2001 From: Pascal Salzbrenner Date: Wed, 23 Apr 2025 10:13:42 +0100 Subject: [PATCH 1/3] Remove chemdataextractor from requirements (deprecated); fix pymatgen version --- requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5a56548..78f425a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,6 @@ monty>=2.0.4 regex>=2019.6.8 requests>=2.22.0 unidecode>=1.1.0 -pymatgen>=2019.6.20 -chemdataextractor>=1.3.0 +pymatgen==2024.5.1 gensim>=3.7.1 tqdm>=4.32.2 \ No newline at end of file From 6c1e03e45469a42a391b172858bdcdcae7961c35 Mon Sep 17 00:00:00 2001 From: Pascal Salzbrenner Date: Wed, 23 Apr 2025 10:14:01 +0100 Subject: [PATCH 2/3] Explain the need for a manual install of chemdataextractor2 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 70745a8..73f1b9e 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ and run `pip install --ignore-installed -r requirements.txt`. Note: If you are u If the download fails, manually download the [model](https://storage.googleapis.com/mat2vec/pretrained_embeddings), [word embeddings](https://storage.googleapis.com/mat2vec/pretrained_embeddings.wv.vectors.npy) and [output embeddings](https://storage.googleapis.com/mat2vec/pretrained_embeddings.trainables.syn1neg.npy) and put them in mat2vec/training/models. +1. Manually run `pip install chemdataextractor2`. Unfortunately, this cannot be installed directly from `requirements.txt` as it depends on the `TableDataExtractor` package, which is not hosted on PyPI. 1. Finalize your chemdataextractor installation by executing ``cde data download`` (You may need to restart your virtual environment for the cde command line interface to be found). 1. You are ready to go! From 6842689e902de0cb03c80f5d159454d619cbe2d3 Mon Sep 17 00:00:00 2001 From: Pascal Salzbrenner Date: Wed, 23 Apr 2025 10:38:17 +0100 Subject: [PATCH 3/3] Simpler way of installing chemdataextractor2 & tabledataextractor using constraints.txt --- README.md | 3 +-- constraints.txt | 1 + requirements.txt | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 constraints.txt diff --git a/README.md b/README.md index 73f1b9e..f0f55d2 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,12 @@ For those interested in the *ab initio* thermoelectric data, [see below](#thermo 1. Make sure you have `python3.6` and the `pip` module installed. We recommend using [conda environments](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html). 1. Navigate to the root folder of this repository (the same folder that contains this README file) -and run `pip install --ignore-installed -r requirements.txt`. Note: If you are using a conda env and any packages fail to compile during this step, you may need to first install those packages separately with `conda install package_name`. +and run `pip install --ignore-installed -r requirements.txt -c constraints.txt`. Note: If you are using a conda env and any packages fail to compile during this step, you may need to first install those packages separately with `conda install package_name`. 1. Wait for all the requirements to be downloaded and installed. 1. Run `python setup.py install` to install this module. This will also download the Word2vec model files. If the download fails, manually download the [model](https://storage.googleapis.com/mat2vec/pretrained_embeddings), [word embeddings](https://storage.googleapis.com/mat2vec/pretrained_embeddings.wv.vectors.npy) and [output embeddings](https://storage.googleapis.com/mat2vec/pretrained_embeddings.trainables.syn1neg.npy) and put them in mat2vec/training/models. -1. Manually run `pip install chemdataextractor2`. Unfortunately, this cannot be installed directly from `requirements.txt` as it depends on the `TableDataExtractor` package, which is not hosted on PyPI. 1. Finalize your chemdataextractor installation by executing ``cde data download`` (You may need to restart your virtual environment for the cde command line interface to be found). 1. You are ready to go! diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 0000000..01a8dd6 --- /dev/null +++ b/constraints.txt @@ -0,0 +1 @@ +TableDataExtractor @ git+https://github.com/CambridgeMolecularEngineering/tabledataextractor#egg=tabledataextractor \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 78f425a..83d898a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ requests>=2.22.0 unidecode>=1.1.0 pymatgen==2024.5.1 gensim>=3.7.1 -tqdm>=4.32.2 \ No newline at end of file +tqdm>=4.32.2 +chemdataextractor2 \ No newline at end of file