-
Notifications
You must be signed in to change notification settings - Fork 14
Feature/str pattern completion #109
Feature/str pattern completion #109
Conversation
…name_from_collapse' into feature/str_pattern_completion
…shwolaa/pymodaq_gui into feature/str_pattern_completion
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 5.0.x_dev #109 +/- ##
=============================================
- Coverage 64.22% 63.39% -0.84%
=============================================
Files 73 75 +2
Lines 9201 9768 +567
=============================================
+ Hits 5909 6192 +283
- Misses 3292 3576 +284 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
A few comments to start on this huge PR:
|
I agree, I changed it to have a behavior close to an IDE. The first item proposed is selected by default. Pressing Enter/Tab will autocomplete it (Tab only works well with QPlainText though)
I removed them and I changed the example with more standard Unicodes. The issue with the emojis is that they consist of multiple characters which make the whole identification struggle.
I updated the example, it should be more explanatory now. |
|
@malik-irain could you have a go to check this as well and merge it if it is fine. We have to move on to the monorepo ... |
| widget.value = widget.toPlainText | ||
| widget.setValue = widget.setPlainText | ||
| widget.sigChanged = widget.textChanged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that's what's the doc says about subclassing WidgetParameterItem but I would be careful about monkeypatching qt methods as it already made tests fails without any apparent reason. I would have implemented a value attribute and a setValue method in PatternPlainTextEdit widget that call toPlainText and setPlainText. For the signal, it might be tricky.
Anyways for now, it works so we can leave it like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add this if you think it is better. There is no impact on the tests.
Not sure, how to deal with the signal though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude calls it "Duck typing adapter"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it works very well in python, but when using objects from C++ it can lead to segmentation faults (we had the issue recently), but as it doesn't seem to make tests fail, it's ok with me!
|
@Ashwolaa Can you rebase or merge the last modification of pymodaq_gui in you PR so that I can see if tests are passing? |
Pattern completer subpart of PR#105:
This PR contains:
See pattern_completer_demo.py in examples for some demonstration.
See parameter_ex.py in examples for an application