Skip to content

Commit

Permalink
fix typing of last_updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcdermott committed Feb 25, 2024
1 parent 6bb6b25 commit a5949a7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/rxn_network/jobs/schema.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Core definition for various task and synthesis recipe documents."""
from datetime import datetime
from typing import Any, Optional

from pydantic import BaseModel, Field
Expand All @@ -19,7 +18,7 @@ class EntrySetDocument(BaseModel):
"""A single entry set object as produced by the GetEntrySet job."""

task_label: Optional[str] = Field(None, description="The name of the task.")
last_updated: datetime = Field(
last_updated: str = Field(
default_factory=datetime_str,
description="Timestamp of when the document was last updated.",
)
Expand All @@ -37,7 +36,7 @@ class EnumeratorTaskDocument(BaseModel):
"""A single task object from the reaction enumerator workflow."""

task_label: Optional[str] = Field(None, description="The name of the task.")
last_updated: datetime = Field(
last_updated: str = Field(
default_factory=datetime_str,
description="Timestamp of when the document was last updated.",
)
Expand All @@ -61,7 +60,7 @@ class CompetitionTaskDocument(BaseModel):
"""

task_label: Optional[str] = Field(None, description="The name of the task.")
last_updated: datetime = Field(
last_updated: str = Field(
default_factory=datetime_str,
description="Timestamp of when the document was last updated.",
)
Expand Down Expand Up @@ -97,7 +96,7 @@ class NetworkTaskDocument(BaseModel):
"""

task_label: Optional[str] = Field(None, description="The name of the task.")
last_updated: datetime = Field(
last_updated: str = Field(
default_factory=datetime_str,
description="Timestamp of when the document was last updated.",
)
Expand All @@ -114,7 +113,7 @@ class PathwaySolverTaskDocument(BaseModel):
"""

task_label: Optional[str] = Field(None, description="The name of the task.")
last_updated: datetime = Field(
last_updated: str = Field(
default_factory=datetime_str,
description="Timestamp of when the document was last updated.",
)
Expand Down

0 comments on commit a5949a7

Please sign in to comment.