Skip to content

Commit

Permalink
Tidy imports
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonbh committed Apr 6, 2022
1 parent 8bf3c62 commit e6e821d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
1 change: 0 additions & 1 deletion qcelemental/models/abcmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class InputResultBase(ProtoModel, abc.ABC):
def schema_name(self) -> str:
"""The QCSchema specification this model conforms to"""

# schema_name: str = Field(..., description=("The QCSchema specification this model conforms to"))
schema_version: Literal[2] = Field(
2, description="The version number of ``schema_name`` to which this model conforms."
)
Expand Down
12 changes: 0 additions & 12 deletions qcelemental/models/basemodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ def _repr(self) -> str:
return f'{self.__repr_name__()}({self.__repr_str__(", ")})'


qcschema_input_default = "qcschema_input"
qcschema_output_default = "qcschema_output"
qcschema_input_specification_default = "qcschema_input_specification"
qcschema_optimization_specification_default = "qcschema_optimization_specification"
qcschema_optimization_input_default = "qcschema_optimization_input"
qcschema_optimization_output_default = "qcschema_optimization_output"
qcschema_torsion_drive_input_default = "qcschema_torsion_drive_input"
qcschema_torsion_drive_output_default = "qcschema_torsion_drive_output"
qcschema_torsion_drive_specification_default = "qcschema_torsion_drive_specification"
qcschema_molecule_default = "qcschema_molecule"


class ProtoModel(BaseModel):
class Config:
allow_mutation: bool = False
Expand Down
12 changes: 12 additions & 0 deletions qcelemental/models/common_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,15 @@ class Config:

def __repr_args__(self) -> "ReprArgs":
return [("error_type", self.error_type), ("error_message", self.error_message)]


qcschema_input_default = "qcschema_input"
qcschema_output_default = "qcschema_output"
qcschema_input_specification_default = "qcschema_input_specification"
qcschema_optimization_specification_default = "qcschema_optimization_specification"
qcschema_optimization_input_default = "qcschema_optimization_input"
qcschema_optimization_output_default = "qcschema_optimization_output"
qcschema_torsion_drive_input_default = "qcschema_torsion_drive_input"
qcschema_torsion_drive_output_default = "qcschema_torsion_drive_output"
qcschema_torsion_drive_specification_default = "qcschema_torsion_drive_specification"
qcschema_molecule_default = "qcschema_molecule"
3 changes: 2 additions & 1 deletion qcelemental/models/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
from ..physical_constants import constants
from ..testing import compare, compare_values
from ..util import deserialize, measure_coordinates, msgpackext_loads, provenance_stamp, which_import
from .basemodels import ProtoModel, Provenance, qcschema_draft, qcschema_molecule_default
from .basemodels import ProtoModel, Provenance, qcschema_draft
from .common_models import qcschema_molecule_default
from .types import Array

if TYPE_CHECKING:
Expand Down
7 changes: 4 additions & 3 deletions qcelemental/models/procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
from typing_extensions import Literal

from .abcmodels import ResultBase
from .basemodels import (
ProtoModel,
from .basemodels import ProtoModel
from .common_models import (
ComputeError,
DriverEnum,
qcschema_optimization_input_default,
qcschema_optimization_output_default,
qcschema_optimization_specification_default,
qcschema_torsion_drive_input_default,
qcschema_torsion_drive_output_default,
qcschema_torsion_drive_specification_default,
)
from .common_models import ComputeError, DriverEnum
from .molecule import Molecule
from .results import (
AtomicInput,
Expand Down
10 changes: 5 additions & 5 deletions qcelemental/models/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
from pydantic import Field, constr, validator

from .abcmodels import InputComputationBase, InputSpecificationBase, SuccessfulResultBase
from .basemodels import (
ProtoModel,
qcschema_draft,
from .basemodels import ProtoModel, qcschema_draft
from .basis import BasisSet
from .common_models import (
DriverEnum,
Model,
qcschema_input_default,
qcschema_input_specification_default,
qcschema_output_default,
)
from .basis import BasisSet
from .common_models import DriverEnum, Model
from .types import Array

if TYPE_CHECKING:
Expand Down

0 comments on commit e6e821d

Please sign in to comment.