Skip to content

Commit

Permalink
Merge pull request #116 from volkamerlab/enable-klifs-only-installation
Browse files Browse the repository at this point in the history
Remove io __init__ imports (to enable OpenCADD-KLIFS only deps)
  • Loading branch information
dominiquesydow authored Nov 1, 2021
2 parents ce20b50 + 949b6c4 commit 0a2b80d
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
4 changes: 3 additions & 1 deletion docs/tutorials/io.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
"metadata": {},
"outputs": [],
"source": [
"from opencadd.io import DataFrame, Rdkit, Biopython"
"from opencadd.io.dataframe import DataFrame\n",
"from opencadd.io.rdkit import Rdkit\n",
"from opencadd.io.biopython import Biopython\n"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion opencadd/databases/klifs/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
from .utils import PATH_DATA, metadata_to_filepath, filepath_to_metadata
from .remote import KLIFS_CLIENT
from .exceptions import KlifsPocketIncompleteError, KlifsPocketUnequalSequenceStructure
from opencadd.io import DataFrame, Rdkit
from opencadd.io.dataframe import DataFrame
from opencadd.io.rdkit import Rdkit

# Get the newest file version (* = YYYYMMDD)
PATH_TO_KLIFS_IDS = sorted(PATH_DATA.glob("klifs_ids.*.csv.gz"), key=lambda x: x.suffixes[0])[-1]
Expand Down
3 changes: 2 additions & 1 deletion opencadd/databases/klifs/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
)
from .schema import FIELDS
from .utils import metadata_to_filepath, silence_logging
from opencadd.io import DataFrame, Rdkit
from opencadd.io.dataframe import DataFrame
from opencadd.io.rdkit import Rdkit

_logger = logging.getLogger(__name__)

Expand Down
4 changes: 0 additions & 4 deletions opencadd/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
"""
opencadd.io module
"""

from .biopython import Biopython
from .dataframe import DataFrame
from .rdkit import Rdkit
2 changes: 1 addition & 1 deletion opencadd/structure/pocket/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pathlib import Path

import pandas as pd
from opencadd.io import DataFrame
from opencadd.io.dataframe import DataFrame

from .base import PocketBase
from .features.region import Region
Expand Down
2 changes: 1 addition & 1 deletion opencadd/structure/pocket/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from matplotlib import colors
import nglview

from opencadd.io import DataFrame
from opencadd.io.dataframe import DataFrame

_logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion opencadd/tests/io/test_biopython.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest
from Bio.PDB.Structure import Structure

from opencadd.io import Biopython
from opencadd.io.biopython import Biopython

PATH_TEST_DATA = Path(__name__).parent / "opencadd" / "tests" / "data" / "io"

Expand Down
2 changes: 1 addition & 1 deletion opencadd/tests/io/test_dataframes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pandas as pd
import pytest

from opencadd.io import DataFrame
from opencadd.io.dataframe import DataFrame
from opencadd.io.schema import DATAFRAME_COLUMNS

PATH_TEST_DATA = Path(__name__).parent / "opencadd" / "tests" / "data" / "io"
Expand Down
2 changes: 1 addition & 1 deletion opencadd/tests/io/test_rdkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest
from rdkit import Chem

from opencadd.io import Rdkit
from opencadd.io.rdkit import Rdkit

PATH_TEST_DATA = Path(__name__).parent / "opencadd" / "tests" / "data" / "io"

Expand Down

0 comments on commit 0a2b80d

Please sign in to comment.