Skip to content

Commit ecff107

Browse files
committed
run pre-commit hooks
1 parent ed08289 commit ecff107

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

chebifier/cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import importlib.resources
2-
31
import click
4-
import yaml
52

63
from chebifier.model_registry import ENSEMBLES
74

5+
86
@click.group()
97
def cli():
108
"""Command line interface for Chebifier."""

chebifier/ensemble/base_ensemble.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import importlib
12
import os
23
import time
34
from pathlib import Path
@@ -6,13 +7,17 @@
67
import torch
78
import tqdm
89
import yaml
9-
import importlib
1010

1111
from chebifier.check_env import check_package_installed
1212
from chebifier.hugging_face import download_model_files
1313
from chebifier.inconsistency_resolution import PredictionSmoother
1414
from chebifier.prediction_models.base_predictor import BasePredictor
15-
from chebifier.utils import get_disjoint_files, load_chebi_graph, get_default_configs, process_config
15+
from chebifier.utils import (
16+
get_default_configs,
17+
get_disjoint_files,
18+
load_chebi_graph,
19+
process_config,
20+
)
1621

1722

1823
class BaseEnsemble:
@@ -37,8 +42,8 @@ def __init__(
3742

3843
with (
3944
importlib.resources.files("chebifier")
40-
.joinpath("model_registry.yml")
41-
.open("r") as f
45+
.joinpath("model_registry.yml")
46+
.open("r") as f
4247
):
4348
model_registry = yaml.safe_load(f)
4449

chebifier/inconsistency_resolution.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import csv
22
import os
3-
import torch
43
from pathlib import Path
54

5+
import torch
6+
67

78
def get_disjoint_groups(disjoint_files):
89
if disjoint_files is None:

chebifier/model_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
WMVwithPPVNPVEnsemble,
55
)
66
from chebifier.prediction_models import (
7+
ChEBILookupPredictor,
78
ChemlogPeptidesPredictor,
89
ElectraPredictor,
910
ResGatedPredictor,
10-
ChEBILookupPredictor,
1111
)
1212
from chebifier.prediction_models.c3p_predictor import C3PPredictor
1313
from chebifier.prediction_models.chemlog_predictor import (
14-
ChemlogXMolecularEntityPredictor,
1514
ChemlogOrganoXCompoundPredictor,
15+
ChemlogXMolecularEntityPredictor,
1616
)
1717

1818
ENSEMBLES = {

chebifier/prediction_models/chemlog_predictor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import tqdm
44

5-
from .base_predictor import BasePredictor
65
from .. import modelwise_smiles_lru_cache
6+
from .base_predictor import BasePredictor
77

88
AA_DICT = {
99
"A": "L-alanine",

chebifier/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import importlib.resources
22
import os
3+
import pickle
34

5+
import fastobo
46
import networkx as nx
57
import requests
6-
import fastobo
78
import yaml
89

910
from chebifier.hugging_face import download_model_files
10-
import pickle
1111

1212

1313
def load_chebi_graph(filename=None):
@@ -131,8 +131,8 @@ def get_default_configs():
131131
print(f"Using default ensemble configuration from {default_config_name}")
132132
with (
133133
importlib.resources.files("chebifier")
134-
.joinpath(default_config_name)
135-
.open("r") as f
134+
.joinpath(default_config_name)
135+
.open("r") as f
136136
):
137137
return yaml.safe_load(f)
138138

0 commit comments

Comments
 (0)