Skip to content

Commit

Permalink
Fix builder meta doc model
Browse files Browse the repository at this point in the history
  • Loading branch information
munrojm committed Oct 9, 2023
1 parent c6bac74 commit 9b26ec9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion emmet-core/emmet/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

""" Base emmet model to add default metadata """
from datetime import datetime
from typing import TypeVar, Optional
from typing import TypeVar, Optional, Literal

from pydantic import field_validator, BaseModel, Field
from pymatgen.core import __version__ as pmg_version
Expand Down Expand Up @@ -40,6 +40,10 @@ class EmmetMeta(BaseModel):
description="The build date for this document.",
)

license: Optional[Literal["BY-C", "BY-NC"]] = Field(
None, description="License for the data entry."
)

# Make sure that the datetime field is properly formatted
@field_validator("build_date", mode="before")
@classmethod
Expand Down

0 comments on commit 9b26ec9

Please sign in to comment.