Repository navigation
Button "Fetch Runs" returns list of selected rows - #6
Merged
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Capture the runs highlighted in the IPTSTable as a list of row dicts, ordered by increasing run number. AG Grid's getSelectedRows returns rows in the order the selection was built, so the rows are sorted before being stored. The button stays disabled until the table reports a selection. Consumers read the result through the fetched_runs property or subscribe with on_runs_fetched, mirroring the on_connection_change pass-through. Also document the table's selection gestures, which were previously undescribed in the usage guide. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Loading another IPTS replaces the table rows through NiceGUI's aggrid update method, which destroys and recreates the grid. The selection is dropped without a selectionChanged event, so the fetch button kept the enabled state earned by the previous IPTS while its row numbers now addressed different runs. Disable the button on the grid rebuild, which gridReady signals, and correct the state in the empty-selection branch of the fetch handler as well. Hand out deep copies of the captured rows from the fetched_runs property and to the callbacks. A row holds whatever the ONCat projection returned, so a metadata path may yield a list or a nested dict that a shallow copy would still share with later consumers. Addresses review comments on PR #6. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Each Fetch Runs click replaces the captured runs with the current selection, and nothing else changes them: loading another IPTS or signing out leaves the last capture in place for the later steps of the config-assembly flow. The behavior was already in place but implicit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Jose Borreguero <borreguerojm@ornl.gov>
The empty-selection branch of the fetch handler disabled only the fetch button, so Clear Selection could stay enabled with nothing selected -- the state that branch exists to correct. Route every path that reacts to the selection through one helper so the two buttons cannot disagree. Also drop the RunTable reference from the fetched_runs docstring: the widget exposes an IPTSTable and never surfaces RunTable, so the name gave a public-API reader nothing to follow. The comparison stays in the private copy helper, where it explains the convention being followed. Addresses review comments on PR #6. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 of the changes
This PR extends the
RunsSelectorNiceGUI widget to let users explicitly capture the currently selected runs via a Fetch Runs button (and reset selection via Clear Selection), making the selection available to downstream config-assembly steps.Changes:
fetched_runs/on_runs_fetchedintegration surface toRunsSelector.References:
Check all that apply:
Updated packaging, dependency, or Pixi configurationChecklist for the author
pixi run testpassespixi run build-docspasses, if documentation changedChecklist for the reviewer