Skip to content

Commit

Permalink
Upgraded to black>=24, fixed import tests, cleaning, gh action lint w…
Browse files Browse the repository at this point in the history
…ip fix
  • Loading branch information
FNTwin committed Mar 1, 2024
1 parent ef8264a commit b96158f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Install black
run: |
pip install black>=23
pip install black>=24
- name: Lint
run: black --check .
Expand Down
15 changes: 2 additions & 13 deletions docs/tutorials/usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,8 @@
"source": [
"### Chemical space from SOAP descriptors\n",
"\n",
"openQDC offer a simple way to calculate the Smooth Overlaps of Atomic Positions (SOAP) descriptors for the molecules in the dataset. The method get_soap_descriptors returns the SOAP descriptors for the molecules in the dataset."
"openQDC offer a simple way to calculate the Smooth Overlaps of Atomic Positions (SOAP) descriptors for the molecules in the dataset.\n",
"The method get_soap_descriptors returns the SOAP descriptors for the molecules in the dataset."
]
},
{
Expand Down Expand Up @@ -813,18 +814,6 @@
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies:
- pytest >=6.0
- pytest-cov
- nbconvert
- black >=23
- black >=24
- jupyterlab
- pre-commit
- ruff
Expand Down
46 changes: 23 additions & 23 deletions openqdc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@

_lazy_imports_obj = {
"__version__": "openqdc._version",
"BaseDataset": "openqdc.datasets",
"ANI1": "openqdc.datasets",
"ANI1CCX": "openqdc.datasets",
"ANI1X": "openqdc.datasets",
"Spice": "openqdc.datasets",
"GEOM": "openqdc.datasets",
"QMugs": "openqdc.datasets",
"ISO17": "openqdc.datasets",
"COMP6": "openqdc.datasets",
"GDML": "openqdc.datasets",
"Molecule3D": "openqdc.datasets",
"OrbnetDenali": "openqdc.datasets",
"SN2RXN": "openqdc.datasets",
"QM7X": "openqdc.datasets",
"DES": "openqdc.datasets",
"NablaDFT": "openqdc.datasets",
"SolvatedPeptides": "openqdc.datasets",
"WaterClusters": "openqdc.datasets",
"TMQM": "openqdc.datasets",
"Dummy": "openqdc.datasets",
"PCQM_B3LYP": "openqdc.datasets",
"PCQM_PM6": "openqdc.datasets",
"Transition1X": "openqdc.datasets",
"BaseDataset": "openqdc.datasets.base",
"ANI1": "openqdc.datasets.ani",
"ANI1CCX": "openqdc.datasets.ani",
"ANI1X": "openqdc.datasets.ani",
"Spice": "openqdc.datasets.spice",
"GEOM": "openqdc.datasets.geom",
"QMugs": "openqdc.datasets.qmugs",
"ISO17": "openqdc.datasets.iso_17",
"COMP6": "openqdc.datasets.comp6",
"GDML": "openqdc.datasets.gdml",
"Molecule3D": "openqdc.datasets.molecule3d",
"OrbnetDenali": "openqdc.datasets.orbnet_denali",
"SN2RXN": "openqdc.datasets.sn2_rxn",
"QM7X": "openqdc.datasets.qm7x",
"DES": "openqdc.datasets.des",
"NablaDFT": "openqdc.datasets.nabladft",
"SolvatedPeptides": "openqdc.datasets.solvated_peptides",
"WaterClusters": "openqdc.datasets.waterclusters3_30",
"TMQM": "openqdc.datasets.tmqm",
"Dummy": "openqdc.datasets.dummy",
"PCQM_B3LYP": "openqdc.datasets.pcqm",
"PCQM_PM6": "openqdc.datasets.pcqm",
"Transition1X": "openqdc.datasets.transition1x",
"AVAILABLE_DATASETS": "openqdc.datasets",
}

Expand Down
28 changes: 2 additions & 26 deletions openqdc/utils/preprocess.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
import click
import numpy as np
from loguru import logger
from openqdc import AVAILABLE_DATASETS

from openqdc import datasets

options = [
datasets.ANI1,
datasets.ANI1CCX,
datasets.ANI1X,
datasets.COMP6,
datasets.DES,
datasets.GDML,
datasets.GEOM,
datasets.ISO17,
datasets.Molecule3D,
datasets.NablaDFT,
datasets.OrbnetDenali,
datasets.PCQM_B3LYP,
datasets.PCQM_PM6,
datasets.QM7X,
datasets.QMugs,
datasets.SN2RXN,
datasets.SolvatedPeptides,
datasets.Spice,
datasets.TMQM,
datasets.Transition1X,
datasets.WaterClusters,
]

options = list(AVAILABLE_DATASETS.values())
options_map = {d.__name__: d for d in options}


Expand Down
2 changes: 1 addition & 1 deletion tests/test_import.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def test_open_qdc():
import openQDC # noqa
import openqdc # noqa

0 comments on commit b96158f

Please sign in to comment.