Skip to content

Commit

Permalink
Add automated prefect setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-S-Rosen committed Feb 17, 2024
1 parent d6a3f30 commit 8bbda0a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/quacc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
installed_engine = next(
(
wflow_engine
for wflow_engine in ["parsl", "covalent", "dask", "redun", "jobflow"]
for wflow_engine in ["parsl", "covalent", "prefect", "dask", "redun", "jobflow"]
if util.find_spec(wflow_engine)
),
None,
Expand All @@ -40,6 +40,13 @@ class QuaccSettings(BaseSettings):
using the "QUACC" prefix. e.g. `export QUACC_SCRATCH_DIR=/path/to/scratch`.
"""

model_config = SettingsConfigDict(
env_prefix="quacc_",
env_nested_delimiter="__",
extra="forbid",
validate_assignment=True,
)

CONFIG_FILE: Path = Field(
_DEFAULT_CONFIG_FILE_PATH,
description=(
Expand Down Expand Up @@ -450,13 +457,6 @@ def generate_store(cls, v: Union[dict[str, dict[str, Any]], Store]) -> Store:
else:
return v

model_config = SettingsConfigDict(
env_prefix="quacc_",
env_nested_delimiter="__",
extra="forbid",
validate_assignment=True,
)

@model_validator(mode="before")
@classmethod
def load_user_settings(cls, settings: dict[str, Any]) -> dict[str, Any]:
Expand Down

0 comments on commit 8bbda0a

Please sign in to comment.