From fb6f68f1b1880f6fd3635f7b79a1c70baaab619a Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Tue, 16 Sep 2025 14:00:18 +0200 Subject: [PATCH] Fix: Fixes temporal graph ci/cd (#1410) ## Description This PR adds default values and descriptions to the Timestamp pydantic object used in temporal graph. ## Type of Change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [x] Code refactoring - [ ] Performance improvement - [ ] Other (please specify): ## Changes Made Adds default value and description to Timestamp pydantic object ## Testing Tested it manually, althought I was unable to reproduce the issue (therefore is probably a rare event), but based on the ci/cd logs I fixed the cause. ## Screenshots/Videos (if applicable) None ## Pre-submission Checklist - [x] **I have tested my changes thoroughly before submitting this PR** - [x] **This PR contains minimal changes necessary to address the issue/feature** - [x] My code follows the project's coding standards and style guidelines - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added necessary documentation (if applicable) - [x] All new and existing tests pass - [x] I have searched existing PRs to ensure this change hasn't been submitted already - [x] I have linked any relevant issues in the description - [x] My commits have clear and descriptive messages ## Related Issues None ## Additional Notes None ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --- cognee/tasks/temporal_graph/models.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cognee/tasks/temporal_graph/models.py b/cognee/tasks/temporal_graph/models.py index ef5cd42c9..8e1fd5658 100644 --- a/cognee/tasks/temporal_graph/models.py +++ b/cognee/tasks/temporal_graph/models.py @@ -3,12 +3,17 @@ from pydantic import BaseModel, Field class Timestamp(BaseModel): - year: int = Field(..., ge=1, le=9999) - month: int = Field(..., ge=1, le=12) - day: int = Field(..., ge=1, le=31) - hour: int = Field(..., ge=0, le=23) - minute: int = Field(..., ge=0, le=59) - second: int = Field(..., ge=0, le=59) + year: int = Field( + ..., + ge=1, + le=9999, + description="Always required. If only a year is known, use it.", + ) + month: int = Field(1, ge=1, le=12, description="If unknown, default to 1") + day: int = Field(1, ge=1, le=31, description="If unknown, default to 1") + hour: int = Field(0, ge=0, le=23, description="If unknown, default to 0") + minute: int = Field(0, ge=0, le=59, description="If unknown, default to 0") + second: int = Field(0, ge=0, le=59, description="If unknown, default to 0") class Interval(BaseModel):