Fix: Fixes temporal graph ci/cd (#1410)
<!-- .github/pull_request_template.md --> ## Description This PR adds default values and descriptions to the Timestamp pydantic object used in temporal graph. ## Type of Change <!-- Please check the relevant option --> - [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 <!-- List the specific changes made in this PR --> 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 <!-- Please check all boxes that apply before submitting your PR --> - [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.
This commit is contained in:
parent
d6320581af
commit
fb6f68f1b1
1 changed files with 11 additions and 6 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue