Skip to content

Commit

Permalink
switch default deprecated tags to setting
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed May 27, 2021
1 parent 527c46b commit 6a5daf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions emmet-core/emmet/core/settings.py
Expand Up @@ -79,6 +79,10 @@ class EmmetSettings(BaseSettings):
description="Maximum upward gradient in the last SCF for any VASP calculation",
)

VASP_DEPRECATED_TAGS: List[str] = Field(
[], description="List of tags to manually deprecate in task validation"
)

class Config:
env_prefix = "emmet_"
extra = "ignore"
Expand Down
4 changes: 2 additions & 2 deletions emmet-core/emmet/core/vasp/validation.py
@@ -1,5 +1,5 @@
from datetime import datetime
from typing import Dict, List, Union
from typing import Dict, List, Optional, Union

import numpy as np
from pydantic import BaseModel, Field, PyObject
Expand Down Expand Up @@ -57,7 +57,7 @@ def from_task_doc(
input_sets: Dict[str, PyObject] = SETTINGS.VASP_DEFAULT_INPUT_SETS,
LDAU_fields: List[str] = SETTINGS.VASP_CHECKED_LDAU_FIELDS,
max_allowed_scf_gradient: float = SETTINGS.VASP_MAX_SCF_GRADIENT,
deprecated_tags: Optional[List[str]] = None,
deprecated_tags: List[str] = SETTINGS.VASP_DEPRECATED_TAGS,
) -> "ValidationDoc":
"""
Determines if a calculation is valid based on expected input parameters from a pymatgen inputset
Expand Down

0 comments on commit 6a5daf4

Please sign in to comment.