rose icon indicating copy to clipboard operation
rose copied to clipboard

Upgrade rose edit to Python 3

Open astroDimitrios opened this issue 1 year ago • 30 comments

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 6a49dd736f3b69df6ee1a251b62a32f7d15ea34e
  • Same for the gtk dir 8bccdcff363440f030c504ef6b973b6f7cb749bc
  • Splash screen updates 20ade089fe3df5f8590bf00cbe8fe7904b62bf51
  • Popup fixes in the MenuWidget 807bc56b432fd9fc56f730ed559a3e71acc395a6
  • Fix macro menus ed0780ebdd1b1ca16f0b3b5bdac3470858560e39

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

astroDimitrios avatar Sep 10 '24 14:09 astroDimitrios

Wow!

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

oliver-sanders avatar Oct 31 '24 11:10 oliver-sanders

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

oliver-sanders avatar Dec 10 '24 14:12 oliver-sanders

The above commits fix 1, 3, and 9.

astroDimitrios avatar Jan 14 '25 14:01 astroDimitrios

@astroDimitrios - simple de-confliction required.

wxtim avatar Jan 16 '25 10:01 wxtim

[!NOTE] Rechecked 2025-02-07

Tim's Functional Review

New Bugs

Numbering cont'd from Oliver's bugs.

11. Annoying quotes

Severity:Bad, but should not block PR

(Bit like Oliver's bug 5.) affects demo-meta/01-types/namelist/many types/:

  • my_int_array
  • my_int_array_long
  • my_real_array
  • my_repeat_int_array
  • my_repeat_real_array
  • my_spaced_list
  • my_values_few_array
  • my_values_lots_array

If one replaces the value with . (may or may not be reasonable) or any other typo non-number char you get ".". You cannot delete the quotation marks but by selecting the whole box and replacing the content will values. Backspace and Del do not work.

12. double_quoted_string_with_backslash

Severity:Fix

Unclear from the docs whether this is a bug, but it certainly doesn't happen in the old version:

Try to change my_quoted to

  • Nothing
  • Something
  • Something with \n, \" or \\ in.

image

As an additional fun thing, deleting a quote at the start of such a string can cause a new quote at both ends - "like so""

13. Shortening fixed len arrays

Priority:New issue

01-types/namelist/table_nl/my_boolean_array and my_real_array can be shortened with the - button:

image

Interestingly the old GUI will allow you to increase the length of the list if you've manually edited it to be too short, but never to shorten it.

image

14. Revert to saved => traceback

Priority: Fix

Change something and try Page (menu) => <any item>:

image

I tried crudely doing

diff --git a/metomi/rose/config_editor/main.py b/metomi/rose/config_editor/main.py
index 4715ff6c..82f841e5 100644
--- a/metomi/rose/config_editor/main.py
+++ b/metomi/rose/config_editor/main.py
@@ -734,12 +734,6 @@ class MainController(object):
                 self.menubar, add_menuitem, self._get_current_page()
             ),
         )
-        page_menu.get_submenu().connect(
-            "deactivate",
-            lambda m: self.main_handle.clear_page_menu(
-                self.menubar, add_menuitem
-            ),
-        )
         self.main_handle.load_macro_menu(self.menubar)
         self.update_bar_widgets()
         self.top_menu = self.menubar.uimanager.get_widget("/TopMenuBar")
diff --git a/metomi/rose/config_editor/menu.py b/metomi/rose/config_editor/menu.py
index a19496c4..23cd3c15 100644
--- a/metomi/rose/config_editor/menu.py
+++ b/metomi/rose/config_editor/menu.py
@@ -637,10 +637,6 @@ class MainMenuHandler(object):
         self.reporter.report(info_text, kind=kind)
         return error_count
 
-    def clear_page_menu(self, menubar, add_menuitem):
-        """Clear all page add variable items."""
-        add_menuitem.remove_submenu()
-
     def load_page_menu(self, menubar, add_menuitem, current_page):
         """Load the page add variable items, if any."""
         if current_page is None:

Which seemed to work without side effects - do you have a GTK2-3 reference which might help me understand why this method has gone.

15. Similar to 14, but with Metadata (menu) => upgrade

Priority: Fix.

image

I think that this can be fixed with

diff --git a/metomi/rose/config_editor/upgrade_controller.py b/metomi/rose/config_editor/upgrade_controller.py
index 5137314f..19bb5488 100644
--- a/metomi/rose/config_editor/upgrade_controller.py
+++ b/metomi/rose/config_editor/upgrade_controller.py
@@ -51,7 +51,7 @@ class UpgradeController(object):
             Gtk.ResponseType.ACCEPT,
         )
         self.window = Gtk.Dialog(buttons=buttons)
-        self.set_transient_for(parent_window)
+        self.window.set_transient_for(parent_window)
         self.window.set_title(metomi.rose.config_editor.DIALOG_TITLE_UPGRADE)
         self.config_dict = {}
         self.config_directory_dict = {}
@@ -112,9 +112,9 @@ class UpgradeController(object):
             else:
                 cell = Gtk.CellRendererText()
             if i == len(columns) - 1:
-                column.pack_start(cell, True, True, 0)
+                column.pack_start(cell, True)
             else:
-                column.pack_start(cell, False, True, 0)
+                column.pack_start(cell, False)
             column.set_cell_data_func(cell, self._set_cell_data, i)
             self.treeview.append_column(column)
         self.treeview.connect("cursor-changed", self._handle_change_cursor)
@@ -155,7 +155,7 @@ class UpgradeController(object):
         self.window.set_focus(self.ok_button)
         self._set_ok_to_upgrade()
         max_size = metomi.rose.config_editor.SIZE_MACRO_DIALOG_MAX
-        my_size = self.window.size_request()
+        my_size = self.window.get_size()
         new_size = [-1, -1]
         extra = 2 * metomi.rose.config_editor.SPACING_PAGE
         for i in [0, 1]:

(and I've added these changes as suggestions to the PR too, if you prefer, alongside an attempt to find docs).

However, this fix leads to a dialog with a tickbox, populate all possible versions which crashes if ticked.

I suspect that the output of https://github.com/metomi/rose/blob/2c8956a9464bd277c8eb24d38af4803cba4c1243/lib/python/rose/config_editor/upgrade_controller.py#L208 may have changed.

16. Single char focus stealing

Priority:New issue (Annoying)

Found on suite info section, all three text boxes - On deletion of the last char, or insertion of a single char, the focus moves to the cog button.

Peek 2025-01-17 09-39

(also seen in 01-types/namelist/many types/my-derived second element·)

[!NOTE] This may be related to Number 6

~17. Failure on invalid widget[rose-config-edit] value~

Priority: (I can't replicate this anymore ^TP) Can be spun out - shouldn't be a problem if Suite developers don't mess up or don't use this setting.

Replicate -

In etc/demo/rose-config-edit/demo_meta/app/01-types/meta/rose-meta.conf replace widget[rose-config-edit]=metomi.rose.config_editor.valuewidget.radiobuttons.RadioButtonsValueWidget with a garbage value (I was trying to check coverage by using widget[rose-config-edit]=metomi.rose.config_editor.valuewidget.choice.ChoicesValueWidget.

Try opening this config in the editor. In the old version nothing much happens differently in the new version the whole gui freezes.

18. Stash Panel

Priority: Fix (Failure here will be most unpopular, but I'm not clear whether this is in scope since it's not really our app.)

Using a copy of the UM on new VDI I tried the following

rose edit -C /home/users/tim.pillinger/cylc-src/trunk/rose-stem/app/um_ukv1p5_exp -M /home/users/tim.pillinger/cylc-src/trunk/rose-meta/ --no-warn version

And get the following error only on the updated version. image

Worse - the new version image doesn't look very similar to the old version

image

wxtim avatar Jan 16 '25 13:01 wxtim

Works nicely on Ubuntu 22.04/Gnome 3.36.8/Solarized Dark Theme.

image

wxtim avatar Jan 17 '25 09:01 wxtim

@oliver-sanders - I'm not sure number 10 is correct: I think that something has gone wrong in the old version given that the metadata explicitly sets the toggle to radio buttons. What's worse, I can't get the radio buttons like you have on either new or old vdi.

widget[rose-config-edit]=metomi.rose.config_editor.valuewidget.radiobuttons.RadioButtonsValueWidget

If you remove this line you do get a dropdown box in the new version.

wxtim avatar Jan 17 '25 10:01 wxtim

Bug Summary

Includes recapitulation of Olivers bugs

Have they been fixed? What priority?

New Ticket Bug Fixed? How bad?
1
2 Must Fix
3
4 Create Issue
5 Create issue, related bug 11 is much more of an issue
6 Fix very desirable
7 Nice to have only IMO
8 Not a bug!
9 :)
10 Couldn't replicate, not convinced it exists?
11 Fix very desirable
12 Fix very desirable
13 New issue
14 Fix
15 Fix
16 New issue
17 (Tim can't replicate)~ Should be turned into a new issue (should only affect metadata authors)~
18 Fix

wxtim avatar Jan 17 '25 10:01 wxtim

How I'm looking at coverage

The following diff allows us to monitor which code manual testing is hitting:

diff.txt

To use

> export CYLC_COVERAGE=1
> rose edit -C path/to/app/or/suite
> # Do some manual testing, then close the GUI
> coverage combine
> coverage html
> firefox htmlcov/index.html

My most recent spate of testing is recorded here.

wxtim avatar Jan 17 '25 15:01 wxtim

I've had a good poke through the codebase, and I'm leaving a copy of the state of my attempt to gain some level of coverage at https://wwwspice/~tim.pillinger/cov/rose-edit/.

It's not great, and I'd really like to get someone to try the stash panel. I'm also not convinced there aren't a load of dead ends in the code. For example there's a load of code which appears to operate on rose edits arguments. Rose edit doesn't take arguments.

wxtim avatar Jan 20 '25 15:01 wxtim

It's not great, and I'd really like to get someone to try the stash panel

We can do that, I'll ping you an SRS ID to try out.

Rose edit doesn't take arguments.

Ahem:

$ rose edit --help
...
SYNOPSIS
    rose config-edit [OPTIONS]... [PAGE_PATH]...
...
ARGUMENTS
    PAGE_PATH
       One or more paths to open on load, pages may be full or partial
       namespaces e.g. `foo/bar/env` or `env`.

       NOTE: Opens the shortest namespace that matches the provided string.

oliver-sanders avatar Jan 20 '25 15:01 oliver-sanders

Hi @wxtim , just looking into bug 15 above and have managed to replicate the error(s) and initial fix. Looking at the tick box error now, the path = self.treeview.get_cursor()[0] is being passed a 'None' value. Erroring with TypeError: 'NoneType' object is not iterable

It's also defaulting to having the 'Apply' Button available: image

Where in the old version running Metadata -> Upgrade would default to the 'Cancel' button and the tickbox wouldn't throw an error: image

Do you know what the Metadata -> Upgrade... does and why the difference may occurring? The prompt seems to suggest there would be something to select under Upgrade Version?

J-J-Abram avatar Mar 25 '25 12:03 J-J-Abram

Do you know what the Metadata -> Upgrade... does

A think it is probably running rose app-upgrade somewhere.

and why the difference may occurring?

No idea, sorry.

The prompt seems to suggest there would be something to select under Upgrade Version?

There needs to be an upgrader macro defined: Try looking at 08-upgrade:

image

wxtim avatar Mar 25 '25 13:03 wxtim

  • https://github.com/metomi/rose/pull/2808/commits/6e025f01f943bc380cd78a978355d6765d68780e fixes 18 (tested with 2 suites on Az Spice - one vn13.8 metadata, set export ROSE_META_PATH=/home/users/metomi/rose-meta first or use the full metadata path in the suite.
  • https://github.com/metomi/rose/pull/2808/commits/712f9af963c185762e0006efc85b4b924d825ad2 fixes 5, 6, 11, 12 (partially), and 16
  • https://github.com/metomi/rose/pull/2808/commits/ed774591bf33aff1bb34bad8c8ee31d9291bdc61 fixes 4 Long character input box causing scrolling horizontally when the gui isn't full screen (or wider than the box), this still happens but the boxes are much smaller now so it will happen less often
  • https://github.com/metomi/rose/pull/2808/commits/bfa3a9c637a35eb02a3fad2400a0323d960dfa92 fixes 7 Env var text colour change
  • https://github.com/metomi/rose/pull/2808/commits/bbeedaab45346fa14bbf289a74ba4d6cfeff1745 fixes 14 but not 100% sure what the consequences of removing the code is. The ImageMenuItem that it uses was deprecated and in some parts of the code we did remove these and replace them with boxes with an icon and label to form the Menu button. Doing so in the menu / main nav code would take a single dev a long time so lets hope this fix doesn't break anything else.

To Do:

  • 2 Popup Menu Scale Issue
  • @oliver-sanders @wxtim Do you want me to (try to) change number 10 the Radiobuttons to a ComboBoxText which is a widget more like the old Rose?
  • 12 Needs fixing when entering a \ the focus jumps
  • 15 is Menu related

astroDimitrios avatar Apr 01 '25 09:04 astroDimitrios

Issues Left

Cosmetic

[moved to own issue by @wxtim ] https://github.com/metomi/rose/issues/2887

Needs Fixing

  • 12 Needs fixing when entering a \ the focus jumps, this might be similar to the focus jumping bug when entering a char into an int field for example. In the commit 3f900b100a3280073ed84cdad7d92e4459fa5c42 Fixes repeat real array bug where numbers were turned into strings / Fix validation errors causing focus jumping - removes quotation mark hot fix I changed the logic so that widget.needs_type_error_refresh() was called instead of completely re-drawing a new widget. That might also be the fix for this issue.
  • 15 is Menu related - this is broken in Old Rose with the test metadata as well. I have taken Tims suggestions from above but not committed them to the branch because you hit the path error he mentioned and it's not clear what has changed here from the usage of TreeView. You also hit a runtime error when trying to apply the upgrade (old rose breaks here with a better error message)

I'm happy to field the odd Q despite moving on from the project but unfortunately there is no more time left for me to look in depth at 12 & 15.

astroDimitrios avatar Apr 02 '25 13:04 astroDimitrios

I've been through all the issues previously raised, and only 12, 15 are problems.

18 is the same as was too, but I think that the stash panel is out of scope of this PR.

I've created an issue where we can dump follow on, so that only essential for merge stuff goes in this PR: https://github.com/metomi/rose/issues/2884

I have not (yet) manually retested stuff.

wxtim avatar Apr 09 '25 10:04 wxtim

Re-review

Bugs

19. Array pulled to the right

When accessing 01-types/namelist/many_types/my_repeat_real_array (Applies to other arrays, but easiest to reproduce with this one because it's long to start with: Adding items to the array causes the array to stop wrapping at the edge of the screen, and to pull the view to the right, and keep pulling it to the right if you scroll left.

20. Enable/Ignore section

Enabling or ignoring a section which is already enabled or ignored causes traceback.

21. Create New Config

Right click on "suite info > create > create new configuration": Any input into the "new config name box gives:

AttributeError: 'Button' object has no attribute 'style'
Traceback (most recent call last):
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/gtk/dialog.py", line 628, in _name_checker
    good_colour = ok_button.style.text[Gtk.StateType.NORMAL]
                  ^^^^^^^^^^^^^^^

22. MacroChangesDialog._set_markup()

Priority - bad - I had to use ctrl-z to escape.

Error message "tasks 5 positional arguments but 6 were given - to access error navigate to `14-compulsory > right click compulsory_section > Auto-fix configuration.

23. Stash Widget: Menu Items

Using the UM with centralized metadata.

Pick any stash panel and right click on an item, click on remove:

  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/panelwidget/summary_data.py", line 639, in <lambda>
    "activate", lambda i: self.copy_section(this_section)
                          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/panelwidget/summary_data.py", line 846, in copy_section
    new_section = self.sub_ops.clone_section(section)
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/ops/group.py", line 546, in clone_section
    return self._clone_section_func(self.config_name, clone_section_name)
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/ops/group.py", line 370, in copy_section
    new_namespace = self.sect_ops.add_section(
        config_name, new_section, skip_update=skip_update
    )
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/ops/section.py", line 122, in add_section
    self.trigger_reload_tree(ns)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/main.py", line 1259, in reload_namespace_tree
    self.nav_controller.reload_namespace_tree(*args, **kwargs)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/nav_controller.py", line 113, in reload_namespace_tree
    self.tree_trigger_update(
    ~~~~~~~~~~~~~~~~~~~~~~~~^
        only_this_config=only_this_config,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        only_this_namespace=only_this_namespace,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/main.py", line 1263, in tree_trigger_update
    self.updater.tree_trigger_update(*args, **kwargs)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/updater.py", line 148, in tree_trigger_update
    self.update_ns_sub_data(only_this_namespace)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/updater.py", line 303, in update_ns_sub_data
    page.update_sub_data()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/page.py", line 633, in update_sub_data
    self.sub_data_panel.update(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sub_data["sections"], self.sub_data["variables"]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/panelwidget/summary_data.py", line 293, in update
    should_redraw = self.update_tree_model()
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/panelwidget/summary_data.py", line 211, in update_tree_model
    data_rows, column_names = self.get_model_data()
                              ~~~~~~~~~~~~~~~~~~~^^
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/plugin/um/widget/stash.py", line 214, in get_model_data
    sub_sect_names.sort(key=lambda x: section_sort_keys.get(x))
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'NoneType' and 'list'

wxtim avatar Apr 09 '25 15:04 wxtim

Manual Testing

I've managed to achieve just under 78% coverage, though I think that there are sig chunks of code which are unreachable, or not covered by the demo, notably the stash panel.

~I'm also not convinced that the Stash Widget is working at all.~

wxtim avatar Apr 11 '25 08:04 wxtim

Bug Summary

[!note] Updated 2025-04-14 I've poured all previous outstanding bugs into this comment, and have checked the earlier bug list comments.

12. double_quoted_string_with_backslash

Severity: Should fix: Will be very annoying to anyone who has a backslash in a string.

Unclear from the docs whether this is a bug, but it certainly doesn't happen in the old version:

Try to change my_quoted to

Nothing
Something
Something with \n, \" or \\ in.
Traceback `IndexError`

@astroDimitrios Said

Needs fixing when entering a \ the focus jumps, this might be similar to the focus jumping bug when entering a char into an int field for example. In the commit https://github.com/metomi/rose/commit/3f900b100a3280073ed84cdad7d92e4459fa5c42 Fixes repeat real array bug where numbers were turned into strings / Fix validation errors causing focus jumping - removes quotation mark hot fix I changed the logic so that widget.needs_type_error_refresh() was called instead of completely re-drawing a new widget. That might also be the fix for this issue.

15. Metadata (menu) => upgrade => Traceback

Priority: Must Fix - shows traceback.

Traceback ![traceback](https://private-user-images.githubusercontent.com/26465611/403915044-bf586e79-80ff-478e-828d-67e0b28f670c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDQ2Mzg5NjIsIm5iZiI6MTc0NDYzODY2MiwicGF0aCI6Ii8yNjQ2NTYxMS80MDM5MTUwNDQtYmY1ODZlNzktODBmZi00NzhlLTgyOGQtNjdlMGIyOGY2NzBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA0MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNDE0VDEzNTEwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE2MDFhODg3MjBjZTA1Nzc4MGQ0NTI1YmI2MDMzYzQ1ZGU5MTlkNTI2YzI4YWEwMTNkMDkzNDQ4MjQ5OGMxN2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yWd-bIX_zyi57zuYZZnxHGftmF4OGpmaLsi5oPaBLkg)

@astroDimitrios Said

is Menu related - this is broken in Old Rose with the test metadata as well. I have taken Tims suggestions from above but not committed them to the branch because you hit the path error he mentioned and it's not clear what has changed here from the usage of TreeView. You also hit a runtime error when trying to apply the upgrade (old rose breaks here with a better error message)

19. Array pulled to the right

Priority: Should fix - unbearably annoying if array > screen width.

When accessing 01-types/namelist/many_types/my_repeat_real_array (Applies to other arrays, but easiest to reproduce with this one because it's long to start with: Adding items to the array causes the array to stop wrapping at the edge of the screen, and to pull the view to the right, and keep pulling it to the right if you scroll left.

20. Enable/Ignore section

Priority: Should fix - causes traceback, but livable with because it only causes traceback if the user asks for something which doesn't make sense.

Enabling or ignoring a section in the Left hand tree view which is already enabled or ignored causes traceback.

21. Create New Config

Priority: Must fix: Traceback (Unclear how much this is used?)

Right click on "suite info > create > create new configuration": Any input into the "new config name box gives:

Traceback ``` AttributeError: 'Button' object has no attribute 'style' Traceback (most recent call last): File "/home/users/tim.pillinger/repos/rose/metomi/rose/gtk/dialog.py", line 628, in _name_checker good_colour = ok_button.style.text[Gtk.StateType.NORMAL] ^^^^^^^^^^^^^^^ ```

wxtim avatar Apr 14 '25 14:04 wxtim

Thanks for the summary @wxtim. Looks like we have two show stoppers (15 & 21), a few major issues (but better than no GUI at all), and maybe some minor stuff.

  1. Metadata (menu) => upgrade => Traceback

@astroDimitrios commented that there seems to be an issue with the example in demo-metadata (or at least it causes a traceback with the old GUI too apparently), so isn't useful for comparison.

Here's an example (stolen from the tutorial) which does work with the old GUI (but sadly crashes on this branch):

meta=rose-demo-upgrade/garden0.1

[env]
FOREST=true

[namelist:features]
rose_bushes=2

oliver-sanders avatar Apr 15 '25 13:04 oliver-sanders

Comment from user - we should test against this, though I think that it will be fine.


I've upgraded my suite to Cylc 8. As part of this I renamed [jinja2:suite.rc] at the top of my rose-suite.conf file to [template variables].

It looks like the suite works fine but when I do a rose edit I get errors like this:

template variables=RESTART_HIST=fail-if=(this == 'true') and (template variables=L_HIST == 'false');Not found: variables=L_HIST. It doesn't seem to like the space in template variables.

wxtim avatar Jun 24 '25 12:06 wxtim

@wxtim, that issue has already been resolved in Rose 2 - https://github.com/metomi/rose/issues/2737

oliver-sanders avatar Jun 24 '25 13:06 oliver-sanders

Have raised a PR which should fix the packaging issues: https://github.com/astroDimitrios/rose/pull/52

With this merged, and the branch rebased, the lint and tests should all pass, the docs test might need further work (but might just be broken on master).

Test run - https://github.com/oliver-sanders/rose/actions/runs/17800569022/job/50599046096

oliver-sanders avatar Sep 17 '25 14:09 oliver-sanders

Regular tests now passing :+1:

The build tests are failing, they need system-level deps to be installed (apt-get or whatnot).

The docs tests are failing, not sure what's going on there, I think an import gi might be preventing rose edit --help from displaying, might want to delay that import.

Taking a look...

oliver-sanders avatar Sep 19 '25 10:09 oliver-sanders

Issuyes 15 and 21 (which I labelled as "must fix") have been fixed by the latest changes (Thanks @benfitzpatrick). I still need to check through everything else.

I'll convert the should fix issues into their own tickets once I approve.

wxtim avatar Sep 19 '25 11:09 wxtim

Have pushed a commit (6fee8f0) which should fix the tests.

The "Build" tests needed a bit of shimming due to the reliance of pygobject on system dependencies (Can't use Conda here it seems).

... Tests all passing.

oliver-sanders avatar Sep 19 '25 14:09 oliver-sanders

22. Upgrade widget recursion

**Priority: ** Must fix - produces traceback - RecursionError

  1. Load all data
  2. Click on Metadata>Upgrade
  3. Click on one of these buttons
image

23. ChoicesValueWidget changes from C7=>C8

**Priority: ** Unclear, can probably punt this, but I can't rule it out being absolutely vital to a user.

image

Probably related error:

[FAIL] Could not import widget: Gtk.Box.pack_start() takes exactly 5 non-keyword arguments (2 given)

24. Stash Panel

24.a Enable an item in Stash

**Priority: ** Must - stash panel fails

Tested on /home/users/tim.pillinger/roses/trunk/rose-stem/app/um_ukv1p5_exp

Tried to enable or ignore a U COMPNT OF WIND AFTER TIME STEP

image

Similar errors from most of the right click menu items.

[Edit 2025-11-13] Can't replicate this any more

Fuller instructions * rose edit -C /home/users/tim.pillinger/roses/trunk/rose-stem/app/um_ukv1p5_exp * Nav to namelist > Model input and output > Stash requests and profiles > stash requests * Ignore or un-ignore an item.

24.b

**Priority: ** Must - Had to ctrl+c on CLI to escape. Pressing OK doesn't get you out.

Search add new stash requests dialog

Traceback (most recent call last):
  File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/plugin/um/widget/stash_add.py", line 435, in _filter_visible
    if self._filter_visible(model, child_iter):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AddStashDiagnosticsPanelv1._filter_visible() missing 1 required positional argument: '_'
  1. Garbage metadata not handled gracefully

**Priority: ** Must - traceback if metadata is invalid

Reporoduce:

cat > rose-app.conf <<__HERE__
[env]
cake=true
__HERE__

mkdir meta
cat > meta/rose-meta.conf << __HERE__
[env=cake]
garbage=foo
__HERE__
Traceback ``` > CYLC_COVERAGE=1 rose edit -C ~/cylc-src/rose-apps/meta/ -vvvvv --debug /home/users/tim.pillinger/conda-envs/cylc313/lib/python3.13/site-packages/coverage/inorout.py:460: CoverageWarning: --include is ignored because --source is set (include-ignored) self.warn("--include is ignored because --source is set", slug="include-ignored") Traceback (most recent call last): File "/home/users/tim.pillinger/conda-envs/cylc313/bin/rose", line 7, in sys.exit(rose()) ~~~~^^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/rose.py", line 368, in rose main( ~~~~^ 'rose', ^^^^^^^ ...... ), ^^ ) ^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/rose.py", line 486, in main exec_sub_cmd(ns, sub_cmd, cmd_args) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/rose.py", line 273, in exec_sub_cmd _exec_python( ~~~~~~~~~~~~^ ns, ^^^ ...... args, ^^^^^ ) ^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/rose.py", line 309, in _exec_python fcn() ~~~^^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/main.py", line 2284, in main spawn_window( ~~~~~~~~~~~~^ cwd, ^^^^ ...... no_warn=opts.no_warn, ^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/main.py", line 2122, in spawn_window ctrl = MainController( config_directory_path, ...... no_warn=no_warn, ) File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/main.py", line 314, in __init__ self.data.load( ~~~~~~~~~~~~~~^ config_directory, ^^^^^^^^^^^^^^^^^ ...... load_no_apps=load_no_apps, ^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/data.py", line 244, in load self.load_top_config( ~~~~~~~~~~~~~~~~~~~~^ top_level_directory, ^^^^^^^^^^^^^^^^^^^^ ...... metadata_off=metadata_off, ^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/data.py", line 316, in load_top_config self.load_config(top_level_directory) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/data.py", line 458, in load_config self.filter_meta_config(name) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/config_editor/data.py", line 1059, in filter_meta_config metomi.rose.gtk.dialog.run_dialog( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ metomi.rose.gtk.dialog.DIALOG_TYPE_ERROR, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...... extra_text=reports_text, ^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/users/tim.pillinger/repos/rose/metomi/rose/gtk/dialog.py", line 370, in run_dialog dialog.action_area.pack_start(info_button, expand=False, fill=False) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Gtk.Box.pack_start() takes exactly 5 non-keyword arguments (2 given)
</details>

wxtim avatar Oct 13 '25 12:10 wxtim

My latest coverages are at https://wwwspice/~tim.pillinger/cov/rose-edit-live/

wxtim avatar Oct 13 '25 15:10 wxtim

I have achieved 87% coverage with manual testing. I'm going to suggest that further review/manual testing is probably reaching a point of diminishing returns.

wxtim avatar Oct 16 '25 13:10 wxtim

See https://github.com/astroDimitrios/rose/pull/53

benfitzpatrick avatar Nov 12 '25 14:11 benfitzpatrick