Skip to content

Commit

Permalink
Migrate from pydantic PyObject to ImportString
Browse files Browse the repository at this point in the history
  • Loading branch information
bocklund committed Nov 2, 2023
1 parent 79c292a commit 386ea7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions espei/phase_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Dict, List, Optional, Type

from pydantic import BaseModel, PositiveFloat, PyObject
from pydantic import BaseModel, PositiveFloat
from pydantic.types import ImportString
from pycalphad import Model

from espei.typing import ComponentName, PhaseName
Expand All @@ -11,7 +12,7 @@ class ModelMetadata(BaseModel):
sublattice_model: List[List[ComponentName]]
sublattice_site_ratios: List[PositiveFloat]
# Fully qualified import path for a Python class that follows the pycalphad.Model API
model: Optional[PyObject] = None
model: Optional[ImportString] = None


class PhaseModelSpecification(BaseModel):
Expand Down

0 comments on commit 386ea7d

Please sign in to comment.