-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade rose edit to Python 3 #2808
base: master
Are you sure you want to change the base?
Upgrade rose edit to Python 3 #2808
Conversation
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.
Have made a first pass over the code, looking good.
There's 186 commits here! We could do with squashing these down a bit to make it a bit more manageable.
val_array = [] | ||
# Prevent str without "" breaking the underlying Python syntax | ||
for e in self.entries: | ||
v = e.get_text() | ||
if v in ("False", "True"): # Boolean | ||
val_array.append(v) | ||
elif (len(v) == 0) or (v[:1].isdigit()): # Empty or numeric | ||
val_array.append(v) | ||
elif not v.startswith('"'): # Str - add in leading and trailing " | ||
val_array.append('"' + v + '"') | ||
e.set_text('"' + v + '"') | ||
e.set_position(len(v)+1) | ||
elif (not v.endswith('"')) or (len(v) == 1): # Str - add in trailing " | ||
val_array.append(v + '"') | ||
e.set_text(v + '"') | ||
e.set_position(len(v)) | ||
else: |
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.
@oliver-sanders, please go through this.
5684ff9
to
4cf6267
Compare
d7fb376
to
07cd350
Compare
5684ff9
to
2dddf66
Compare
…e config-edit and an alias for edit.
…rsion script on Rose 2019.
2dddf66
to
c7c5cb4
Compare
* Fixes window top level function call * Fixes accelerator connection * Adds empty input arg for visibility functions * Fixes 2 button press usage * Fixes text buffer call * Fixes use of text buffer in TextView * Fixes select_row code * Fixes flags including SENSITIVE * Fixes insert_action_group calls * Fixes calls to _set_cell_* * Fixes page tab names * Adds in 6th arg to BaseSummaryDataPanel function for visibility functions
* Fixes inspect module calls * Fixes dict key access
Fix array widget bug which forced widgets to scroll off screen when adding an array element
* Menu button init fix in gtk/util.py. * Fix window default icon list. * Replaces Dialog Question stock id
…..HORIZONTAL), and padding option added
Feature/33 separator (#42) * 33 vertical padding added to widgets for a 'soft' distinction * Vertical padding removed, line distinctions added using css styling Removes top and bottom border from main page window
c5a6ee7
to
edd7db0
Compare
* Removed 'Run Suite...' Button * Removed Launch Suite Control _GUI from the 'Tools' dropdown, but Launch Suite Control GUI still exists in the files, need to investigate what this controls in the GUI * Remove 'Launch Suite Control GUI' button with no icon * Removed 'View Output' Button from taskbar * removed comments related to 'View Output' Button * Removed all 'Run Suite' functionality from the 'Tools' dropdown menu * Removed remaining comments related to Run Suite * 'View Output' removed from 'Tools' dropdown menu
Fixes issue with duplicate ns sorting app 10
If either section or option in the namespace (ns) are None then this doesn't sort properly with other values. This change ensures None is converted to a string to compare with normal string section/option values.
Fixes invisible text in the stash diag panel
…se-edit Removes tests for Python 3.7
…le for Rose 2.0 Removes the extra rose config-edit section from the rose api docs and prevented the splash-screen entry points getting into the docs
8d1aef1
to
f345292
Compare
There are some flaky tests lurking in the battery at the moment (nothing to do with this PR), the following Mac OS failures can be ignored:
|
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.
Sorry for the delay, back looking at this...
Have tested this out on Mac OS using conda install gtk3 pygobject
, worked a charm. Much, much easier to install than the old version 🚀
Anyway looking good 👍
I did find some issues during testing, a couple of tracebacks and some minor things (some of which might just go on the issue tracker for another day)....
1) The "file" sections don't seem to be working:
I did hit this issue when I tried to open any of the file sections:
2) The right-click menu for "duplicate" items is too narrow and has broken icons
Example: demo-meta/10-duplicate/namelist/strawberry icecream
Spotted one minor thing with "duplicate" items (see example in the demo metadata), where the right click menu opened too narrow to display the whole text:
The icons seem to be scrambled too.
3) Multi-line text fields raise traceback when edited
Example: demo-meta/01-types/namelist/manytypes/my_raw_with_newlines
4) Focusing on a long text box causes horizontal scrolling
Example: demo-meta/01-types/namelist/many types/my_char
Before clicking on the text box:
After clicking on the text box (Rose 2019 didn't scroll horizontally in this situation):
5) char types get quotes added when focused
Example: demo-meta/01-types/namelist/many types/my_char_array
Before I click on the text box, there are no quote symbols in it. After I click in the text box, quote symbols appear:
(left: this PR, right: deployed Rose 2019)
I need to double check this one as I have some vague memory that we changed something to do with the quotes for char types at some point...
6) Scrolls to the top of the page when warnings are raised on field change
Example: demo-meta/01-types/namelist/many types/my_int_range
Before changing the value from 2->3 (by pressing the increment button):
After pressing the increment button (scrolls to the top of the page):
7) Raw strings don't change appearance when env vars are present
Example: demo-meta/01-types/namelist/many types/my_raw
(left: this PR, right: deployed Rose 2019)
The field used to go purple to show that an environment variable is present. This is useful information for the user as some checks cannot be performed when env vars are present.
8) Bug fixed: adding an item to a char array caused a crash
Example: demo-meta/01-types/namelist/many types/my_repeat_char_array
I spotted one bug in the old GUI that has been fixed on this branch 👏, thanks! Adding an item to the array caused a crash!
9) Clicking anywhere in my_repeat_real_array causes it to be flagged as an error
Example: demo-meta/01-types/namelist/many types/my_real_repeat_array
10) Widget changed for multiple select
Example: demo-meta/01-types/namelist/many types/my_values_lots_toggle
Used to be a dropdown, now it's a radio button list.
As discussed this change updates
rose config-edit
(or justrose edit
) to Python 3 / Gtk3.All seems to function par some cosmetic bugs which are outlined in the Issues on my fork.