Skip to content

Commit

Permalink
fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jthorton committed Dec 1, 2023
1 parent 650ac21 commit c1f772c
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install lint
shell: bash
run: |
pip install black isort flake8
pip install black isort Flake8-pyproject
- name: Run black
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions naglmbis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
__version__ = _version.get_versions()["version"]
# make sure all custom features are loaded
import naglmbis.features

__all__ = [naglmbis.features]
16 changes: 16 additions & 0 deletions naglmbis/features/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@
TotalValence,
VDWRadius,
)

__all__ = [
AtomicMass,
AtomicPolarisability,
AtomInRingOfSize,
ExplicitValence,
Hybridization,
HydrogenAtoms,
LipinskiAcceptor,
LipinskiDonor,
PaulingElectronegativity,
SandersonElectronegativity,
TotalDegree,
TotalValence,
VDWRadius,
]
3 changes: 1 addition & 2 deletions naglmbis/features/atom.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Literal, Optional
from typing import Literal

import torch
from nagl.features import AtomFeature, one_hot_encode, register_atom_feature
from openff.toolkit.topology import Molecule
from pydantic import Extra, Field, dataclasses
from rdkit import Chem

Expand Down
2 changes: 2 additions & 0 deletions naglmbis/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from naglmbis.models.base_model import MBISGraphModel
from naglmbis.models.models import CHARGE_MODELS, load_charge_model

__all__ = [MBISGraphModel, CHARGE_MODELS, load_charge_model]
5 changes: 1 addition & 4 deletions naglmbis/models/base_model.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# models for the nagl run

import abc
from typing import Dict, List, Literal, Optional

import torch
from nagl.molecules import DGLMolecule
from nagl.training import DGLMoleculeLightningModel
Expand All @@ -12,7 +9,7 @@
class MBISGraphModel(DGLMoleculeLightningModel):
"A wrapper to make it easy to load and evaluate models"

def compute_properties(self, molecule: Chem.Mol) -> Dict[str, torch.Tensor]:
def compute_properties(self, molecule: Chem.Mol) -> dict[str, torch.Tensor]:
dgl_molecule = DGLMolecule.from_rdkit(
molecule, self.config.model.atom_features, self.config.model.bond_features
)
Expand Down
1 change: 0 additions & 1 deletion naglmbis/models/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pathlib
from typing import Literal

import torch
Expand Down
2 changes: 2 additions & 0 deletions naglmbis/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from naglmbis.plugins.plugins import NAGLMBISHandler
from naglmbis.plugins.utils import modify_force_field

__all__ = [NAGLMBISHandler, modify_force_field]

Check warning on line 4 in naglmbis/plugins/__init__.py

View check run for this annotation

Codecov / codecov/patch

naglmbis/plugins/__init__.py#L4

Added line #L4 was not covered by tests
1 change: 0 additions & 1 deletion naglmbis/tests/test_atom_features.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from nagl.features import AtomConnectivity

from naglmbis.features import (
AtomicMass,
Expand Down

0 comments on commit c1f772c

Please sign in to comment.