-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Dev #174
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
Dev #174
Conversation
Introduces a new optional parameter for specifying the MySQL server port, defaulting to 3306. Updates connection instructions to include port information for both local and remote connections. Enhances clarity in troubleshooting steps for testing connections with the specified port.
Adds support for MySQL port configuration
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.
Pull Request Overview
This PR adds slot-based model assignment functionality to the state and UI, and introduces MySQL port support in the Python data loader.
- Define
ModelSlotsand related actions/selectors indfSlicefor 'generation' and 'hint' slots. - Update
ModelSelectionDialog.tsxto allow assigning models to slots with a new summary component and refined table UI. - Add
portparameter to MySQL loader, update connection instructions, and bump the project version.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/app/dfSlice.tsx | Added ModelSlotType/ModelSlots, updated reducers, actions, and selectors for slots. |
| src/views/ModelSelectionDialog.tsx | Revamped dialog UI to support slot assignments, including SlotAssignmentSummary. |
| pyproject.toml | Bumped package version from 0.2.1.4 to 0.2.1.5. |
| py-src/data_formulator/data_loader/mysql_data_loader.py | Introduced optional port parameter and updated auth instructions accordingly. |
Comments suppressed due to low confidence (2)
src/app/dfSlice.tsx:791
- [nitpick] The selector 'getActiveModel' specifically returns the 'generation' slot model; consider renaming it to 'getGenerationModel' for clarity.
getActiveModel: (state: DataFormulatorState) : ModelConfig => {
src/app/dfSlice.tsx:50
- Consider adding unit tests for the new ModelSlots reducer logic and getModelBySlot selector to verify correct slot assignments.
export interface ModelSlots {
| self.duck_db_conn.install_extension("mysql") | ||
| self.duck_db_conn.load_extension("mysql") | ||
|
|
||
| attatch_string = "" |
Copilot
AI
Jul 2, 2025
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.
Variable name 'attatch_string' is misspelled; consider renaming to 'attach_string' for clarity.
| const noBorderStyle = ['error'].includes(status) ? 'none' : undefined; | ||
|
|
||
| // Check if model is assigned to any slot | ||
| const isAssignedToAnySlot = dfSelectors.getAllSlotTypes().some(slotType => isModelAssignedToSlot(model.id, slotType)); |
Copilot
AI
Jul 2, 2025
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.
[nitpick] Refactoring opportunity: call dfSelectors.getAllSlotTypes() once into a local variable to avoid repeated selector calls and improve readability.
| const isAssignedToAnySlot = dfSelectors.getAllSlotTypes().some(slotType => isModelAssignedToSlot(model.id, slotType)); | |
| const isAssignedToAnySlot = allSlotTypes.some(slotType => isModelAssignedToSlot(model.id, slotType)); |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
update with mysql port support