Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove typing_extension dependency #378

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pyyaml!=6.0.0,!=5.4.0,!=5.4.1
scikit-learn
scipy>=1.8
tqdm
typing_extensions==4.5.0
wget
xarray
jaxtyping
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Bugfixes

* Fix bug where the `deprotonate` argument is not wired up to `graphein.protein.graphs.construct_graphs`. [#375](https://github.com/a-r-j/graphein/pull/375)
* Remove `typing_extension` as dependency since we now only support Python >=3.8 and `Literal` is included in `typing` there.

### 1.7.6

Expand Down
7 changes: 6 additions & 1 deletion graphein/molecule/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from deepdiff import DeepDiff
from pydantic import BaseModel
from typing_extensions import Literal

from graphein.molecule.edges.atomic import add_atom_bonds
from graphein.molecule.edges.distance import (
Expand All @@ -24,6 +23,12 @@
from graphein.molecule.features.nodes.atom_type import atom_type_one_hot
from graphein.utils.config import PartialMatchOperator, PathMatchOperator

try:
from typing import Literal
except ImportError:
from typing_extensions import Literal


GraphAtoms = Literal[
"C",
"H",
Expand Down
6 changes: 5 additions & 1 deletion graphein/protein/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@

from deepdiff import DeepDiff
from pydantic import BaseModel, validator
from typing_extensions import Literal

from graphein.protein.edges.distance import add_peptide_bonds
from graphein.protein.features.nodes.amino_acid import meiler_embedding
from graphein.utils.config import PartialMatchOperator, PathMatchOperator

try:
from typing import Literal
except ImportError:
from typing_extensions import Literal


class DSSPConfig(BaseModel):
executable: str = "mkdssp"
Expand Down
6 changes: 5 additions & 1 deletion graphein/protein/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from loguru import logger as log
from rich.progress import Progress
from tqdm.contrib.concurrent import process_map
from typing_extensions import Literal

from graphein.protein.config import GetContactsConfig, ProteinGraphConfig
from graphein.protein.edges.distance import (
Expand All @@ -47,6 +46,11 @@
compute_edges,
)

try:
from typing import Literal
except ImportError:
from typing_extensions import Literal


def subset_structure_to_rna(
df: pd.DataFrame,
Expand Down
7 changes: 6 additions & 1 deletion graphein/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
import pandas as pd
import xarray as xr
from Bio.Data.IUPACData import protein_letters_3to1
from typing_extensions import Literal

try:
from typing import Literal
except ImportError:
from typing_extensions import Literal


AggregationType: List["sum", "mean", "max", "min", "median"]
"""Types of aggregations for features."""
Expand Down
Loading