-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a callback to get_parameter_data to follow data loading (#4688)
* Add a callback to get_parameter_data to follow data loading * Make mypy happy * Replace CamelCase by snake case * Simplify typing * Typing more precise * Move callback_percent parameter to qcodesrc.json and add the matching schema file * Fix some forgotten typing of callback * Put back `many` and `many_many` previous signature Moved the appending of data in the `get_parameter_tree_values` function. * Add newsfragment file explaining the new callback parameter * Remove unnecessary loop, fix mypy issue * add callback to make mypy happy * Improve description * Remove useless import * Delete useless file * Breakdown logics in smaller functions iteration is directly taken from config * Add (incorrect) test of callback * Run darker * fix missing type * Take into account null column * extend callback test to cover multiple num params and < 100 rows * Improvement of callback algorithm * Handle small database with less than 100 rows * Handle non commensurable tuple of row to be downloaded with percentage of progress * Adapt test for small database with less than 100 rows Co-authored-by: Jens H. Nielsen <[email protected]> Co-authored-by: Jens Hedegaard Nielsen <[email protected]>
- Loading branch information
1 parent
544295d
commit 34715d9
Showing
9 changed files
with
242 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Add a callback to ``dataset.get_parameter_data``. | ||
This is usefull to track the progress of the data download. | ||
Since sqlite3 does not allow to keep track of the data loading progress, | ||
we compute how many sqlite requests correspond to a certain percentage of | ||
progress which is dictated by a config parameter "callback_percent". | ||
Then we perform x sql request instead of one, running the callback everytime. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.