diff --git a/qcfractal/qcfractal/components/gridoptimization/record_socket.py b/qcfractal/qcfractal/components/gridoptimization/record_socket.py index ef1b6c05e..c809c1179 100644 --- a/qcfractal/qcfractal/components/gridoptimization/record_socket.py +++ b/qcfractal/qcfractal/components/gridoptimization/record_socket.py @@ -136,7 +136,7 @@ class GridoptimizationServiceState(BaseModel): This represents the current state of a gridoptimization service """ - class Config(BaseModel.Config): + class Config: extra = Extra.forbid allow_mutation = True validate_assignment = True diff --git a/qcfractal/qcfractal/components/neb/record_socket.py b/qcfractal/qcfractal/components/neb/record_socket.py index 4ea25419d..70c18e9e3 100644 --- a/qcfractal/qcfractal/components/neb/record_socket.py +++ b/qcfractal/qcfractal/components/neb/record_socket.py @@ -68,7 +68,7 @@ class NEBServiceState(BaseModel): This represents the current state of a NEB service """ - class Config(BaseModel.Config): + class Config: extra = Extra.forbid allow_mutation = True validate_assignment = True diff --git a/qcfractal/qcfractal/components/torsiondrive/record_socket.py b/qcfractal/qcfractal/components/torsiondrive/record_socket.py index 2373df260..2be475eb1 100644 --- a/qcfractal/qcfractal/components/torsiondrive/record_socket.py +++ b/qcfractal/qcfractal/components/torsiondrive/record_socket.py @@ -72,7 +72,7 @@ class TorsiondriveServiceState(BaseModel): This represents the current state of a torsiondrive service """ - class Config(BaseModel.Config): + class Config: extra = Extra.forbid allow_mutation = True validate_assignment = True diff --git a/qcfractalcompute/qcfractalcompute/compute_manager.py b/qcfractalcompute/qcfractalcompute/compute_manager.py index 37b9f8abf..52febde1b 100644 --- a/qcfractalcompute/qcfractalcompute/compute_manager.py +++ b/qcfractalcompute/qcfractalcompute/compute_manager.py @@ -62,7 +62,7 @@ class ManagerStatistics(BaseModel): Manager statistics """ - class Config(BaseModel.Config): + class Config: extra = Extra.forbid last_update_time: float = Field(default_factory=time.time) diff --git a/qcportal/qcportal/record_models.py b/qcportal/qcportal/record_models.py index 508faf4cd..f7c2780b7 100644 --- a/qcportal/qcportal/record_models.py +++ b/qcportal/qcportal/record_models.py @@ -28,7 +28,7 @@ class Provenance(BaseModel): version: str = Field("", description="The version of the creator, blank otherwise") routine: str = Field("", description="The name of the routine or function within the creator, blank otherwise.") - class Config(BaseModel.Config): + class Config: extra: str = "allow" diff --git a/qcportal/qcportal/singlepoint/record_models.py b/qcportal/qcportal/singlepoint/record_models.py index 0fda04835..d6fe12e54 100644 --- a/qcportal/qcportal/singlepoint/record_models.py +++ b/qcportal/qcportal/singlepoint/record_models.py @@ -32,13 +32,13 @@ class Model(BaseModel): description="The quantum chemistry method to evaluate (e.g., B3LYP, PBE, ...). " "For MM, name of the force field.", ) - basis: Optional[Union[str, BasisSet]] = Field( # type: ignore + basis: Optional[str] = Field( # type: ignore None, description="The quantum chemistry basis set to evaluate (e.g., 6-31g, cc-pVDZ, ...). Can be ``None`` for " "methods without basis sets. For molecular mechanics, name of the atom-typer.", ) - class Config(BaseModel.Config): + class Config: extra: str = "allow"