Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/research_index_backend/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

"""

from datetime import datetime
from logging import DEBUG, basicConfig, getLogger
from typing import Optional
from uuid import UUID, uuid4
Expand Down Expand Up @@ -154,7 +153,7 @@ class AnonymousArticle(BaseModel):
resource_type: Optional[str] = None
openalex: Optional[str] = None
cited_by_count: Optional[int] = None
cited_by_count_date: Optional[datetime] = None
cited_by_count_date: Optional[int] = None
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cited_by_count_date now stores a year integer rather than a full date/time, so the field name is misleading and can cause confusion for future readers/DB consumers. Consider renaming it to something like cited_by_count_year (and, if you need to keep the persisted property name stable, use a Pydantic alias or a clear field description).

Suggested change
cited_by_count_date: Optional[int] = None
cited_by_count_year: Optional[int] = Field(
default=None,
alias="cited_by_count_date",
description="Year associated with cited_by_count; persisted as 'cited_by_count_date'.",
)

Copilot uses AI. Check for mistakes.
counts_by_year: Optional[dict] = None


Expand Down