Skip to content

Attempt at refactoring the pydantic base classes so we go back to hav…#104

Open
davisadam10 wants to merge 1 commit intodevfrom
feature/base_class_refactor
Open

Attempt at refactoring the pydantic base classes so we go back to hav…#104
davisadam10 wants to merge 1 commit intodevfrom
feature/base_class_refactor

Conversation

@davisadam10
Copy link
Copy Markdown
Collaborator

Pydantic SIngle Base class

def from_json(
cls,
json_file: str,
led_wall_class: Type[LedWallSettings] = LedWallSettings
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looking through the code, I think we can remove led_wall_class and use LedWallSettings as it is?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No we cant, because this gets overloaded by the pyside class. Other wise we load the LedWallSettings not the class needed by pyside which has all the signals etc

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah, found the call site of it. Thanks!

)

# ===== Serialized Fields (from former ProjectSettingsBaseModel) =====
openvp_cal_version: str = Field(default=open_vp_cal.__version__)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what's the plan for openvp_cal_version?
For example, currently we don't update the openvp_cal_version.
It keeps the loaded version as is; however, I think we should update the version on @model_validator(mode='before') as we upgrade all other fields data.

@davisadam10
Copy link
Copy Markdown
Collaborator Author

davisadam10 commented Jan 14, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants