-
Notifications
You must be signed in to change notification settings - Fork 1
Fix for GUI not using pydantic. Also added feature for custom date co… #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,7 +36,7 @@ | |||||||||||||||||||||
| import yaml | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| from midrc_react.gui.pyside6.columnselectordialog import ColumnSelectorDialog, NumericColumnSelectorDialog | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| from midrc_react.core.jsdconfig import DataSourceConfig, NumericColumnConfig | ||||||||||||||||||||||
|
||||||||||||||||||||||
| from midrc_react.core.jsdconfig import DataSourceConfig, NumericColumnConfig | |
| from midrc_react.core.jsdconfig import DataSourceConfig |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FileOptionsDialog class does not have a get_data() method, but it's being called here. This will result in an AttributeError at runtime when opening Excel files. You need to either add a get_data() method to FileOptionsDialog that returns the necessary fields (name, description, remove_column_name_text), or directly access the dialog's line edit fields as was done in the previous implementation.
| data_source_dict = dialog.get_data() | |
| if hasattr(dialog, "get_data") and callable(getattr(dialog, "get_data", None)): | |
| data_source_dict = dialog.get_data() | |
| else: | |
| # Fallback: construct the data source dict directly from dialog attributes | |
| data_source_dict = { | |
| "name": getattr(dialog, "name", ""), | |
| "description": getattr(dialog, "description", ""), | |
| "remove_column_name_text": getattr(dialog, "remove_column_name_text", ""), | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
self._date_columnis None (which can happen since it's Optional[str] in DataSourceConfig), this will raise a TypeError when checkingNone not in df.columns. You should add a check to handle the None case, such as defaulting to 'date' or df.columns[0] before the comparison.