Conversation
Add text edit filter. Delete pip installation
There was a problem hiding this comment.
Pull request overview
This PR updates ParamUI toward a “2.0” single-file distribution approach while adding new UI behaviors: regex-based validation for textbox parameters and automatic minimization of the navigation tree for flat parameter tables.
Changes:
- Added regex pattern validation for string parameters (live feedback + focus-out rejection +
update_prmguarding). - Added auto-minimize behavior for the navigation tree when no parameters use sub-paths.
- Removed legacy packaging entry points (
setup.py,paramui/__init__.py) and updated README installation guidance.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| setup.py | Removed legacy setuptools packaging script. |
| README.md | Updated installation instructions and documented new regex/nav-tree features. |
| paramui/init.py | Removed package-level re-export (shifts usage toward single-file module). |
| paramui.py | Implemented regex validation + nav-tree minimization and related internal plumbing. |
Comments suppressed due to low confidence (5)
README.md:26
- The local download link points to
./paramui/paramui.py, but the file is./paramui.pyat the repo root. This link currently won’t resolve for users.
### Method 2: Download the source code
Download [paramui.py](./paramui/paramui.py) and place it in your project directory
paramui.py:771
step='file'(as documented in README) is currently treated as a regex pattern and registered for validation. This causes file-path inputs to be rejected unless they literally match the regexfile. Consider excluding'file'from pattern registration.
This issue also appears in the following locations of the same file:
- line 809
- line 844
paramui.py:846
- In no-UI initialization,
step='file'is currently treated as a regex pattern and registered for validation. This will later cause file-path values to fail validation inupdate_prm()unless they match the regexfile. Exclude'file'here too.
paramui.py:967 trace_add('write', ...)is added every time a textbox is (re)created. Since chibiui reuses the sameStringVarfor a key, navigating between paths can accumulate duplicate traces and call_on_pattern_text_changedmultiple times per keystroke. Guard against re-registering the trace for the sameStringVar.
paramui.py:812- If
step='file'is used (as in the README example), it currently falls into the regex-validated textbox branch instead of rendering a file browser. Treat'file'as a file-browser specifier (or document thatstepmust start with*.) to avoid surprising validation behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ['Flag', 'Flag 1', True, []], # Checkbox | ||
| ['Text', 'Text Input', 'ABC', []], # Textbox | ||
| ['Name', 'Name', 'Taro', '[A-Za-z ]{0,32}'], # Textbox with regex pattern validation | ||
| ['Options/File', 'File Path', '*.txt', 'file'], # File browser |
Comment on lines
+21
to
24
| ### Method 1: Download to the current folder using wget: | ||
| ```bash | ||
| pip install git+https://github.com/covao/ParamUI | ||
| wget https://raw.githubusercontent.com/covao/ParamUI/main/paramui/paramui.py | ||
| ``` |
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.
No description provided.