Skip to content

Commit

Permalink
Restrict pymatgen version to under 2022 (#235)
Browse files Browse the repository at this point in the history
* Restrict pymatgen version to under 2022

* improve github actions
  • Loading branch information
TsumiNa committed Mar 12, 2021
1 parent 7b48997 commit bfeb571
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .github/config/linux_win_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
- cpuonly
- pytest
- pytest-cov
- pymatgen>=2020.10.9
- pymatgen>=2020.10.9,<2022.0
- ruamel.yaml
- tqdm
- mordred
Expand Down
2 changes: 1 addition & 1 deletion .github/config/macos_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
- pytorch >=1.7.0,<2.0.0
- pytest
- pytest-cov
- pymatgen>=2020.10.9
- pymatgen>=2020.10.9,<2022.0
- ruamel.yaml
- tqdm
- mordred
Expand Down
42 changes: 26 additions & 16 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,37 @@ on:
branches:
- master
paths-ignore:
- 'docs/**'
- '.**'
- '**.md'
- '**.yml'
- '**.txt'
- '**.in'
- '**.cfg'
- "conda_env/**"
- "devtools/**"
- "docs/**"
- "samples/**"
- "licenses/**"
- "hooks/**"
- ".**"
- "**.md"
- "**.yml"
- "**.txt"
- "**.in"
- "**.cfg"
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- '.**'
- '**.md'
- '**.yml'
- '**.txt'
- '**.in'
- '**.cfg'
- "conda_env/**"
- "devtools/**"
- "docs/**"
- "samples/**"
- "licenses/**"
- "hooks/**"
- ".**"
- "**.md"
- "**.yml"
- "**.txt"
- "**.in"
- "**.cfg"

env:
MPLBACKEN: 'Agg'
MPLBACKEN: "Agg"

jobs:
test_macos:
Expand All @@ -35,7 +45,7 @@ jobs:
max-parallel: 4
matrix:
python-version: [3.6, 3.7]
os: ['macos-11.0', 'macos-10.15']
os: ["macos-11.0", "macos-10.15"]

steps:
- uses: actions/checkout@v2
Expand Down
42 changes: 26 additions & 16 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,37 @@ on:
branches:
- master
paths-ignore:
- 'docs/**'
- '.**'
- '**.md'
- '**.yml'
- '**.txt'
- '**.in'
- '**.cfg'
- "conda_env/**"
- "devtools/**"
- "docs/**"
- "samples/**"
- "licenses/**"
- "hooks/**"
- ".**"
- "**.md"
- "**.yml"
- "**.txt"
- "**.in"
- "**.cfg"
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- '.**'
- '**.md'
- '**.yml'
- '**.txt'
- '**.in'
- '**.cfg'
- "conda_env/**"
- "devtools/**"
- "docs/**"
- "samples/**"
- "licenses/**"
- "hooks/**"
- ".**"
- "**.md"
- "**.yml"
- "**.txt"
- "**.in"
- "**.cfg"

env:
MPLBACKEN: 'Agg'
MPLBACKEN: "Agg"

jobs:
test_ubuntu:
Expand All @@ -35,7 +45,7 @@ jobs:
max-parallel: 4
matrix:
python-version: [3.6, 3.7]
os: ['ubuntu-18.04', 'ubuntu-latest']
os: ["ubuntu-18.04", "ubuntu-latest"]

steps:
- uses: actions/checkout@v2
Expand Down
42 changes: 26 additions & 16 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,37 @@ on:
branches:
- master
paths-ignore:
- 'docs/**'
- '.**'
- '**.md'
- '**.yml'
- '**.txt'
- '**.in'
- '**.cfg'
- "conda_env/**"
- "devtools/**"
- "docs/**"
- "samples/**"
- "licenses/**"
- "hooks/**"
- ".**"
- "**.md"
- "**.yml"
- "**.txt"
- "**.in"
- "**.cfg"
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- '.**'
- '**.md'
- '**.yml'
- '**.txt'
- '**.in'
- '**.cfg'
- "conda_env/**"
- "devtools/**"
- "docs/**"
- "samples/**"
- "licenses/**"
- "hooks/**"
- ".**"
- "**.md"
- "**.yml"
- "**.txt"
- "**.in"
- "**.cfg"

env:
MPLBACKEN: 'Agg'
MPLBACKEN: "Agg"

jobs:
test_win:
Expand All @@ -35,7 +45,7 @@ jobs:
max-parallel: 2
matrix:
python-version: [3.6, 3.7]
os: ['windows-latest']
os: ["windows-latest"]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions conda_env/cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ dependencies:
- pandas>=1.1.3
- scikit-learn>=0.23.0
- scipy>=1.5.2
- pymatgen>=2020.10.9
- pymatgen>=2020.10.9,<2022.0
- rdkit=2020.09
- 'libblas=*=*mkl'
- "libblas=*=*mkl"
- jupyter>=1.0.0
- pytorch >=1.7.0,<2.0.0
- jedi=0.17.2
- jedi>=0.16
- cpuonly
- fastcluster
- torchvision
Expand Down
6 changes: 3 additions & 3 deletions conda_env/cuda101.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ dependencies:
- pandas>=1.1.3
- scikit-learn>=0.23.0
- scipy>=1.5.2
- pymatgen>=2020.10.9
- pymatgen>=2020.10.9,<2022.0
- rdkit=2020.09
- 'libblas=*=*mkl'
- "libblas=*=*mkl"
- jupyter>=1.0.0
- pytorch >=1.7.0,<2.0.0
- cudatoolkit=10.1
- magma-cuda101=2.5.2
- jedi=0.17.2
- jedi>=0.16
- torchvision
- torchtext
- fastcluster
Expand Down
6 changes: 3 additions & 3 deletions conda_env/cuda102.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ dependencies:
- pandas>=1.1.3
- scikit-learn>=0.23.0
- scipy>=1.5.2
- pymatgen>=2020.10.9
- pymatgen>=2020.10.9,<2022.0
- rdkit=2020.09
- 'libblas=*=*mkl'
- "libblas=*=*mkl"
- jupyter>=1.0.0
- pytorch >=1.7.0,<2.0.0
- cudatoolkit=10.2
- magma-cuda102=2.5.2
- jedi=0.17.2
- jedi>=0.16
- torchvision
- torchtext
- fastcluster
Expand Down
6 changes: 3 additions & 3 deletions conda_env/cuda110.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ dependencies:
- pandas>=1.1.3
- scikit-learn>=0.23.0
- scipy>=1.5.2
- pymatgen>=2020.10.9
- pymatgen>=2020.10.9,<2022.0
- rdkit=2020.09
- 'libblas=*=*mkl'
- "libblas=*=*mkl"
- jupyter>=1.0.0
- pytorch >=1.7.0,<2.0.0
- cudatoolkit=11.0
- magma-cuda110=2.5.2
- jedi=0.17.2
- jedi>=0.16
- torchvision
- torchtext
- fastcluster
Expand Down
6 changes: 3 additions & 3 deletions conda_env/cuda92.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ dependencies:
- pandas>=1.1.3
- scikit-learn>=0.23.0
- scipy>=1.5.2
- pymatgen>=2020.10.9
- pymatgen>=2020.10.9,<2022.0
- rdkit=2020.09
- 'libblas=*=*mkl'
- "libblas=*=*mkl"
- jupyter>=1.0.0
- pytorch >=1.7.0,<2.0.0
- cudatoolkit=9.2
- magma-cuda92=2.5.2
- jedi=0.17.2
- jedi>=0.16
- torchvision
- torchtext
- fastcluster
Expand Down
6 changes: 3 additions & 3 deletions conda_env/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ dependencies:
- pandas>=1.1.3
- scikit-learn>=0.23.0
- scipy>=1.5.2
- pymatgen>=2020.10.9
- pymatgen>=2020.10.9,<2022.0
- rdkit=2020.09
- 'libblas=*=*mkl'
- "libblas=*=*mkl"
- jupyter>=1.0.0
- pytorch >=1.7.0,<2.0.0
- jedi=0.17.2
- jedi>=0.16
- fastcluster
- torchvision
- torchtext
Expand Down
39 changes: 21 additions & 18 deletions devtools/readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
channels:
- defaults
- pytorch
- rdkit
- conda-forge
dependencies:
- pandas
- pandas>=1.1.3
- scikit-learn>=0.23.0
- scipy>=1.5.2
- pymatgen>=2020.10.9,<2022.0
- rdkit=2020.03.3.0
- "libblas=*=*mkl"
- jupyter>=1.0.0
- pytorch >=1.7.0,<2.0.0
- jedi>=0.16
- cpuonly
- fastcluster
- torchtext
- seaborn
- requests
- rdkit
- scikit-learn
- scipy
- pytorch>=1.7.0,<2.0
- cpuonly
- sphinx
- sphinx_rtd_theme
- plotly
- ruamel.yaml
- jupyterlab
- pybtex
- mordred
- tqdm
- pip
- pip:
- pymatgen
- matminer
- nbsphinx
- Python-Deprecated
- OpenNMT-py==1.2
- sphinx-autodoc-typehints
- ruamel.yaml
- mordred
- tqdm
- matminer
- xenonpy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, n_jobs=-1, *, featurizers='all', on_errors='raise', return_ty
"""
A featurizer for extracting XenonPy compositional descriptors from SMILES or MOL
"""

# fix n_jobs to be 0 to skip automatic wrapper in XenonPy BaseFeaturizer class
super().__init__(n_jobs=0, on_errors=on_errors, return_type=return_type)
self._cal = Compositions(n_jobs=n_jobs, featurizers=featurizers, on_errors=on_errors)
Expand All @@ -36,15 +36,15 @@ def featurize(self, x):
raise ValueError('can not convert Mol from SMILES %s' % z)
else:
x_mol = x

# convert to counting dictionary
mol = [Chem.AddHs(z) for z in x_mol]
d_list = [dict(Counter([atom.GetSymbol() for atom in z.GetAtoms()])) for z in mol]

self.output = self._cal.transform(d_list)

return self.output

@property
def feature_labels(self):
return self.output.columns

0 comments on commit bfeb571

Please sign in to comment.