Skip to content
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

Open
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

astroDimitrios
Copy link
Contributor

@astroDimitrios astroDimitrios commented Sep 10, 2024

As discussed this change updates rose config-edit (or just rose edit) to Python 3 / Gtk3.

  • First commit having run 2to3 and Pygobject over the old code 6a49dd7
  • Same for the gtk dir 8bccdcf
  • Splash screen updates 20ade08
  • Popup fixes in the MenuWidget 807bc56
  • Fix macro menus ed0780e

All seems to function par some cosmetic bugs which are outlined in the Issues on my fork.

@oliver-sanders oliver-sanders added this to the 2.4.0 milestone Sep 11, 2024
@astroDimitrios astroDimitrios marked this pull request as ready for review October 29, 2024 15:58
@oliver-sanders oliver-sanders self-requested a review October 31, 2024 11:06
@oliver-sanders
Copy link
Member

Wow!

Screenshot from 2024-10-31 11-06-48

Copy link
Member

@oliver-sanders oliver-sanders left a 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.

metomi/rose/gtk/dialog.py Outdated Show resolved Hide resolved
metomi/rose/gtk/dialog.py Outdated Show resolved Hide resolved
metomi/rose/gtk/util.py Outdated Show resolved Hide resolved
metomi/rose/config_editor/status.py Outdated Show resolved Hide resolved
metomi/rose/gtk/splash.py Outdated Show resolved Hide resolved
metomi/rose/etc/rose-config-edit/style.css Outdated Show resolved Hide resolved
metomi/rose/resource.py Show resolved Hide resolved
Comment on lines 379 to 479
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:
Copy link
Member

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.

metomi/rose/config_editor/nav_panel_menu.py Outdated Show resolved Hide resolved
metomi/rose/config_editor/__init__.py Outdated Show resolved Hide resolved
@astroDimitrios astroDimitrios force-pushed the feature/rose-config-py3 branch 3 times, most recently from 5684ff9 to 4cf6267 Compare November 27, 2024 13:11
@J-J-Abram J-J-Abram force-pushed the feature/rose-config-py3 branch from d7fb376 to 07cd350 Compare November 27, 2024 15:36
@astroDimitrios astroDimitrios force-pushed the feature/rose-config-py3 branch from 5684ff9 to 2dddf66 Compare November 27, 2024 16:37
@astroDimitrios astroDimitrios force-pushed the feature/rose-config-py3 branch from 2dddf66 to c7c5cb4 Compare November 27, 2024 16:45
astroDimitrios and others added 12 commits November 27, 2024 17:00
Move GUI image resources into package (#43)

This means that they get included in the wheel file when the package is
built, and they actually get found at runtime.

Fixes #37
* 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
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
@astroDimitrios astroDimitrios force-pushed the feature/rose-config-py3 branch 2 times, most recently from c5a6ee7 to edd7db0 Compare November 27, 2024 17:54
@oliver-sanders oliver-sanders modified the milestones: 2.4.0, 2.5.0 Dec 3, 2024
J-J-Abram and others added 19 commits December 10, 2024 14:14
* 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
…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
@astroDimitrios astroDimitrios force-pushed the feature/rose-config-py3 branch from 8d1aef1 to f345292 Compare December 10, 2024 14:15
@oliver-sanders
Copy link
Member

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:

  • 02-360day-cycling
  • 13-app-arch-cmd-out
  • 30-app-arch-opt-source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants