Conversation
Contributor
paulsaxe
commented
May 15, 2025
- Added a 'between' operator to filter rows of tables.
- Ensured the correct types of variables in the rows of a table, fixing an issues that caused e.g. integers to be treated as floats.
- Added an option, on by default, to make variables with the name of the columns in the tables, holding the values.
- Using directory names that are the index of the row in the table.
* Added a 'between' operator to filter rows of tables. * Ensured the correct types of variables in the rows of a table, fixing an issues that caused e.g. integers to be treated as floats. * Added an option, on by default, to make variables with the name of the columns in the tables, holding the values. * Using directory names that are the index of the row in the table.
There was a problem hiding this comment.
Pull Request Overview
This PR enhances table-based loops by adding a new range operator, improving type handling, exposing row values as variables, and customizing iteration directory names.
- Introduces a "between" operator for row filtering
- Converts query values to the column’s native type
- Adds an "as variables" option to create individual variables per column
- Uses the row index to name iteration directories
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| loop_step/tk_loop.py | Updated dialog layout to include "as variables" and support a second input for "between" |
| loop_step/loop_parameters.py | Added "between" operator and parameters for query-value2 and as variables option |
| loop_step/loop.py | Implemented range filtering, type conversion, variable injection, and directory naming by index |
| HISTORY.rst | Documented the new features in the release history |
Comments suppressed due to low confidence (1)
HISTORY.rst:6
- Grammar: change "fixing an issues" to "fixing an issue" or "fixing issues".
* Ensured the correct types of variables in the rows of a table, fixing an issues
Comment on lines
+142
to
+148
| "default": "yes", | ||
| "kind": "boolean", | ||
| "default_units": "", | ||
| "enumeration": ("yes", "no"), | ||
| "format_string": "", | ||
| "description": "Values as variables:", | ||
| "help_text": "Whether to put the values for the row as seperate variables.", |
There was a problem hiding this comment.
The parameter "as variables" is declared with kind "boolean" but uses string values "yes"/"no" in its enumeration. Either change kind to "enumeration" or use actual boolean values (true/false) to match the declared kind.
Suggested change
| "default": "yes", | |
| "kind": "boolean", | |
| "default_units": "", | |
| "enumeration": ("yes", "no"), | |
| "format_string": "", | |
| "description": "Values as variables:", | |
| "help_text": "Whether to put the values for the row as seperate variables.", | |
| "default": True, | |
| "kind": "boolean", | |
| "default_units": "", | |
| "enumeration": (True, False), | |
| "format_string": "", | |
| "description": "Values as variables:", | |
| "help_text": "Whether to put the values for the row as separate variables.", |
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.