Sparshr04/dynamic loader UI v2#896
Open
Sparshr04 wants to merge 5 commits into
Open
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
What is this PR
Why is this PR needed?
Currently, the
DataLoaderwidget only exposesfile_path,source_software, andfps. However, the underlying software-specific loader functions (like those for Anipose, NWB, and VIA-tracks) accept additional kwargs. This PR is needed to expose those kwargs in the frontend, allowing users to fully utilize the loaders without dropping down to the Python API.What does this PR do?
This PR implements a dynamic UI for the
naparidata-loader widget:AniposeandNWBas options in thesource_softwaredropdown.individual_namefor Anipose;processing_moduleandpose_estimation_keyfor NWB;use_file_frame_numbersandframe_regexpfor VIA-tracks).fpsspinbox whenNWB(ornetCDF) is selected, as the fps is read directly from the file._set_row_visible) to hide/showQFormLayoutrows without relying on Qt6-exclusive methods.**kwargsto the newly unifiedload_datasetentry point.References
How has this PR been tested?
test_data_loader_widget.pyto account for the new layout row count (rowCount() == 9). Added tests to verify the dynamic visibility logic (_on_source_software_changed) and ensure the correct kwargs are extracted and forwarded based on the selected software. All 71 tests in the suite pass locally.naparilocally, opened the plugin, and manually verified that the correct fields appear/disappear and thefpsspinbox disables appropriately when cycling through thesource_softwareoptions.Is this a breaking change?
No. This strictly extends the UI capabilities. Default fallback values are provided for all new kwargs (matching the backend defaults) to ensure no existing workflows are disrupted.
Does this PR require an update to the documentation?
No major documentation updates are required. All newly added UI fields have been equipped with detailed Qt tooltips to guide the user on what each parameter does.
Checklist: