From 2a28c6b971fe4ff0e0907fd2e71135ee698643cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Guilherme?= Date: Sat, 26 Oct 2024 03:30:01 +0100 Subject: [PATCH 1/6] Cleanup code (#154) * Refactor TextEdit, WIP * Fix unit tests with language transform * Separated key commands in TextEdit. Breaks some, TAB functions, Enter.. * Delete commented code, renamve arguments * Refactor change_locale * Increase unit tests --- src/robotide/application/application.py | 95 ++++-------------------- src/robotide/editor/kweditor.py | 3 - src/robotide/preferences/editors.py | 5 -- src/robotide/ui/preferences_dialogs.py | 35 +++++---- utest/application/test_app_main.py | 14 ++++ utest/contrib/testrunner/test_process.py | 21 +++++- 6 files changed, 67 insertions(+), 106 deletions(-) diff --git a/src/robotide/application/application.py b/src/robotide/application/application.py index 835a1ab2c..1cf9df50e 100644 --- a/src/robotide/application/application.py +++ b/src/robotide/application/application.py @@ -26,7 +26,6 @@ from ..ui.mainframe import RideFrame from .. import publish from .. import context, contrib -# from ..context import coreplugins from ..preferences import Preferences, RideSettings from ..application.pluginloader import PluginLoader from ..application.editorprovider import EditorProvider @@ -176,27 +175,14 @@ def _ApplyThemeToWidget(widget, fore_color=wx.BLUE, back_color=wx.LIGHT_GREY, th aui_default_tool_bar_art = AuiDefaultToolBarArt() aui_default_tool_bar_art.SetDefaultColours(wx.GREEN) widget.SetBackgroundColour(background) - # widget.SetOwnBackgroundColour(background) widget.SetForegroundColour(foreground) - # widget.SetOwnForegroundColour(foreground) - """ - widget.SetBackgroundColour(Colour(200, 222, 40)) - widget.SetOwnBackgroundColour(Colour(200, 222, 40)) - widget.SetForegroundColour(Colour(7, 0, 70)) - widget.SetOwnForegroundColour(Colour(7, 0, 70)) - """ - # or elif isinstance(widget, wx.Control): if not isinstance(widget, (wx.Button, wx.BitmapButton, ButtonWithHandler)): widget.SetForegroundColour(foreground) widget.SetBackgroundColour(background) - # widget.SetOwnBackgroundColour(background) - # widget.SetOwnForegroundColour(foreground) else: widget.SetForegroundColour(secondary_foreground) widget.SetBackgroundColour(secondary_background) - # widget.SetOwnBackgroundColour(secondary_background) - # widget.SetOwnForegroundColour(secondary_foreground) elif isinstance(widget, (wx.TextCtrl, TabFrame, AuiTabCtrl)): widget.SetForegroundColour(foreground_text) # or fore_color widget.SetBackgroundColour(background_help) # or back_color @@ -206,19 +192,14 @@ def _ApplyThemeToWidget(widget, fore_color=wx.BLUE, back_color=wx.LIGHT_GREY, th elif isinstance(widget, wx.MenuItem): widget.SetTextColour(foreground) widget.SetBackgroundColour(background) - # print(f"DEBUG: Application ApplyTheme wx.MenuItem {type(widget)}") else: widget.SetBackgroundColour(background) - # widget.SetOwnBackgroundColour(background) widget.SetForegroundColour(foreground) - # widget.SetOwnForegroundColour(foreground) def _WalkWidgets(self, widget, indent=0, indent_level=4, theme=None): - # print(' ' * indent + widget.__class__.__name__) if theme is None: theme = {} widget.Freeze() - # print(f"DEBUG Application General : _WalkWidgets background {theme['background']}") self._ApplyThemeToWidget(widget=widget, theme=theme) for child in widget.GetChildren(): if not child.IsTopLevel(): # or isinstance(child, wx.PopupWindow)): @@ -230,7 +211,6 @@ def _WalkWidgets(self, widget, indent=0, indent_level=4, theme=None): def SetGlobalColour(self, message): if message.keys[0] != "General": return - # print(f"DEBUG Application General : Enter SetGlobalColour message= {message.keys[0]}") app = wx.App.Get() _root = app.GetTopWindow() theme = self.settings.get_without_default('General') @@ -241,7 +221,6 @@ def SetGlobalColour(self, message): font.SetPointSize(font_size) _root.SetFont(font) self._WalkWidgets(_root, theme=theme) - # print(f"DEBUG Application General : SetGlobalColour AppliedWidgets check Filexplorer and Tree") if theme['apply to panels'] and self.fileexplorerplugin.settings['_enabled']: self.fileexplorerplugin.settings['background'] = theme['background'] self.fileexplorerplugin.settings['foreground'] = theme['foreground'] @@ -260,69 +239,12 @@ def SetGlobalColour(self, message): self.treeplugin.settings[FONT_FACE] = theme[FONT_FACE] if self.treeplugin.settings['opened']: self.treeplugin.on_show_tree(None) - """ - all_windows = list() - general = self.settings.get('General', None) - # print(f"DEBUG: Application General {general['background']} Type message {type(message)}") - # print(f"DEBUG: Application General message keys {message.keys} old {message.old} new {message.new}") - background = general['background'] - foreground = general['foreground'] - background_help = general[BACKGROUND_HELP] - foreground_text = general[FOREGROUND_TEXT] - font_size = general[FONT_SIZE] - font_face = general[FONT_FACE] - font = _root.GetFont() - font.SetFaceName(font_face) - font.SetPointSize(font_size) - _root.SetFont(font) - - def _iterate_all_windows(root): - if hasattr(root, 'GetChildren'): - children = root.GetChildren() - if children: - for c in children: - _iterate_all_windows(c) - all_windows.append(root) - - _iterate_all_windows(_root) - - for w in all_windows: - if hasattr(w, 'SetHTMLBackgroundColour'): - w.SetHTMLBackgroundColour(wx.Colour(background_help)) - w.SetForegroundColour(wx.Colour(foreground_text)) # 7, 0, 70)) - elif hasattr(w, 'SetBackgroundColour'): - w.SetBackgroundColour(wx.Colour(background)) # 44, 134, 179)) - - # if hasattr(w, 'SetOwnBackgroundColour'): - # w.SetOwnBackgroundColour(wx.Colour(background)) # 44, 134, 179)) - - if hasattr(w, 'SetForegroundColour'): - w.SetForegroundColour(wx.Colour(foreground)) # 7, 0, 70)) - - # if hasattr(w, 'SetOwnForegroundColour'): - # w.SetOwnForegroundColour(wx.Colour(foreground)) # 7, 0, 70)) - - if hasattr(w, 'SetFont'): - w.SetFont(font) - """ def change_locale(self, message): if message.keys[0] != "General": return initial_locale = self._locale.GetName() - if languages: - from ..preferences import Languages - names = [n for n in Languages.names] - else: - names = [('English', 'en', wx.LANGUAGE_ENGLISH)] - general = self.settings.get_without_default('General') - language = general.get('ui language', 'English') - try: - idx = [lang[0] for lang in names].index(language) - code = names[idx][2] - except (IndexError, ValueError): - print(f"DEBUG: application.py RIDE change_locale ERROR: Could not find {language=}") - code = wx.LANGUAGE_ENGLISH_WORLD + code = self._get_language_code() del self._locale self._locale = wx.Locale(code) if not self._locale.IsOk(): @@ -352,6 +274,21 @@ def change_locale(self, message): except FileNotFoundError: pass + def _get_language_code(self) -> str: + if languages: + from ..preferences import Languages + names = [n for n in Languages.names] + else: + names = [('English', 'en', wx.LANGUAGE_ENGLISH)] + general = self.settings.get_without_default('General') + language = general.get('ui language', 'English') + try: + idx = [lang[0] for lang in names].index(language) + code = names[idx][2] + except (IndexError, ValueError): + print(f"DEBUG: application.py RIDE change_locale ERROR: Could not find {language=}") + code = wx.LANGUAGE_ENGLISH_WORLD + return code @staticmethod def update_excludes(message): diff --git a/src/robotide/editor/kweditor.py b/src/robotide/editor/kweditor.py index dcf66db8e..9826959a3 100755 --- a/src/robotide/editor/kweditor.py +++ b/src/robotide/editor/kweditor.py @@ -845,7 +845,6 @@ def _call_alt_function(self, event, keycode: int): return True def on_key_down(self, event): - # print(f"DEBUG: KeywordEditor on_key_down event={event} focus={self.is_focused()}") keycode = event.GetUnicodeKey() or event.GetKeyCode() if event.ControlDown(): if event.ShiftDown(): @@ -860,7 +859,6 @@ def on_key_down(self, event): event.Skip() def on_char(self, event): - # print(f"DEBUG: KeywordEditor on_char event={event} focus={self.is_focused()}") key_char = event.GetUnicodeKey() if key_char < ord(' '): return @@ -950,7 +948,6 @@ def move_grid_cursor_and_edit(self): self.open_cell_editor() def on_key_up(self, event): - # print(f"DEBUG: KeywordEditor on_key_up event={event} focus={self.is_focused()}") event.Skip() # DEBUG seen this skip as soon as possible self._tooltips.hide() self._hide_link_if_necessary() diff --git a/src/robotide/preferences/editors.py b/src/robotide/preferences/editors.py index d156d35e7..e25e44deb 100644 --- a/src/robotide/preferences/editors.py +++ b/src/robotide/preferences/editors.py @@ -16,19 +16,14 @@ from os.path import abspath, dirname, join import builtins import wx -from wx import Colour from wx.lib.masked import NumCtrl from .settings import RideSettings -# from robotide.ui.preferences_dialogs import PreferencesPanel from ..ui import preferences_dialogs as pdiag -# from . import (PreferencesPanel, SpinChoiceEditor, IntegerChoiceEditor, boolean_editor, -# StringChoiceEditor, PreferencesColorPicker) from robotide.ui.preferences_dialogs import PreferencesPanel from ..widgets import Label from .managesettingsdialog import SaveLoadSettings -from ..context import IS_WINDOWS from functools import lru_cache try: # import installed version first diff --git a/src/robotide/ui/preferences_dialogs.py b/src/robotide/ui/preferences_dialogs.py index dc3208d88..881bba2d7 100644 --- a/src/robotide/ui/preferences_dialogs.py +++ b/src/robotide/ui/preferences_dialogs.py @@ -18,7 +18,6 @@ import wx -# from ..preferences.settings import RideSettings # DEBUG Removed to fix "cicular import" from ..context import IS_LINUX from ..widgets import HelpLabel, Label, TextField @@ -66,13 +65,11 @@ def Separator(self, parent, title): class PreferencesComboBox(wx.ComboBox): """A combobox tied to a specific setting. Saves value to disk after edit.""" - def __init__(self, parent, id, settings, key, choices): + def __init__(self, parent, elid, settings, key, choices): self.settings = settings self.key = key - # wx.ComboBox(self, parent, id, self._get_value(), size=self._get_size(choices), - # choices=choices, style=wx.CB_READONLY) from ..preferences.settings import RideSettings - super(PreferencesComboBox, self).__init__(parent, id, self._get_value(), + super(PreferencesComboBox, self).__init__(parent, elid, self._get_value(), size=self._get_size(choices), choices=choices, style=wx.CB_READONLY) self._gsettings = RideSettings() @@ -86,13 +83,14 @@ def __init__(self, parent, id, settings, key, choices): def _get_value(self): return self.settings[self.key] - def _get_size(self, choices=[]): + @staticmethod + def _get_size(choices=None): """ In Linux with GTK3 wxPython 4, there was not enough spacing. The value 72 is there for 2 digits numeric lists, for IntegerPreferenceComboBox. This issue only occurs in Linux, for Mac and Windows using default size. """ - if IS_LINUX and choices: + if IS_LINUX and isinstance(choices, list): return wx.Size(max(max(len(str(s)) for s in choices) * 9, 144), 30) return wx.DefaultSize @@ -117,11 +115,11 @@ def _set_value(self, value): class PreferencesSpinControl(wx.SpinCtrl): """A spin control tied to a specific setting. Saves value to disk after edit.""" - def __init__(self, parent, id, settings, key, choices): + def __init__(self, parent, elid, settings, key, choices): self.settings = settings self.key = key from ..preferences.settings import RideSettings - super(PreferencesSpinControl, self).__init__(parent, id, + super(PreferencesSpinControl, self).__init__(parent, elid, size=self._get_size(choices[-1])) self._gsettings = RideSettings() @@ -138,7 +136,8 @@ def __init__(self, parent, id, settings, key, choices): def _get_value(self): return self.settings[self.key] - def _get_size(self, max_value): + @staticmethod + def _get_size(max_value): """ In Linux with GTK3 wxPython 4, there was not enough spacing. The value 72 is there for 2 digits numeric lists, for IntegerPreferenceComboBox. @@ -158,13 +157,13 @@ def _set_value(self, value): class PreferencesColorPicker(wx.ColourPickerCtrl): """A colored button that opens a color picker dialog""" - def __init__(self, parent, id, settings, key): + def __init__(self, parent, elid, settings, key): self.settings = settings self.key = key # print(f"DEBUG: Preferences ColourPicker value type {type(settings[key])}") value = wx.Colour(settings[key]) from ..preferences.settings import RideSettings - super(PreferencesColorPicker, self).__init__(parent, id, colour=value) + super(PreferencesColorPicker, self).__init__(parent, elid, colour=value) self._gsettings = RideSettings() self.psettings = self._gsettings['General'] background_color = self.psettings['background'] @@ -189,12 +188,12 @@ def SetColour(self, colour): class _ChoiceEditor(object): _editor_class = None - def __init__(self, settings, setting_name, label, choices, help=''): + def __init__(self, settings, setting_name, label, choices, elhelp=''): self._settings = settings self._setting_name = setting_name self._label = label self._choices = choices - self._help = help + self._help = elhelp from ..preferences.settings import RideSettings self._gsettings = RideSettings() self.csettings = self._gsettings['General'] @@ -233,8 +232,8 @@ class SpinChoiceEditor(_ChoiceEditor): _editor_class = PreferencesSpinControl -def boolean_editor(parent, settings, name, label, help=''): - editor = _create_checkbox_editor(parent, settings, name, help) +def boolean_editor(parent, settings, name, label, elhelp=''): + editor = _create_checkbox_editor(parent, settings, name, elhelp) from ..preferences.settings import RideSettings _gsettings = RideSettings() bsettings = _gsettings['General'] @@ -248,12 +247,12 @@ def boolean_editor(parent, settings, name, label, help=''): return blabel, editor -def _create_checkbox_editor(parent, settings, name, help): +def _create_checkbox_editor(parent, settings, name, elhelp): initial_value = settings.get(name, "") editor = wx.CheckBox(parent) editor.SetValue(initial_value) editor.Bind(wx.EVT_CHECKBOX, lambda evt: settings.set(name, editor.GetValue())) - editor.SetToolTip(help) + editor.SetToolTip(elhelp) return editor diff --git a/utest/application/test_app_main.py b/utest/application/test_app_main.py index fcf5b9e2f..c4d9d951d 100644 --- a/utest/application/test_app_main.py +++ b/utest/application/test_app_main.py @@ -230,5 +230,19 @@ def test_replace_std_for_win(self): robotide._replace_std_for_win() +class TestMisc(unittest.TestCase): + + def tearDown(self): + builtins.__import__ = real_import + + def test_get_code(self): + import wx + from robotide.application import RIDE + + main_app = RIDE() + code = main_app._get_language_code() + assert code in (175, wx.LANGUAGE_ENGLISH_WORLD, wx.LANGUAGE_PORTUGUESE) + + if __name__ == '__main__': unittest.main() diff --git a/utest/contrib/testrunner/test_process.py b/utest/contrib/testrunner/test_process.py index ff0bdf3f4..616f8bd17 100644 --- a/utest/contrib/testrunner/test_process.py +++ b/utest/contrib/testrunner/test_process.py @@ -20,7 +20,25 @@ from robotide.contrib.testrunner.testrunner import Process -if VERSION >= '4.0': +if VERSION >= '7.1.1': + console_out = b"==============================================================================\n" \ + b"Small Test \n" \ + b"==============================================================================\n" \ + b"Small Test.Test \n" \ + b"==============================================================================\n" \ + b"Passing | PASS |\n" \ + b"------------------------------------------------------------------------------\n" \ + b"Failing | FAIL |\n" \ + b"this fails\n" \ + b"------------------------------------------------------------------------------\n" \ + b"Small Test.Test | FAIL |\n" \ + b"2 tests, 1 passed, 1 failed\n" \ + b"==============================================================================\n" \ + b"Small Test | FAIL |\n" \ + b"2 tests, 1 passed, 1 failed\n" \ + b"==============================================================================\n" \ + b"Output: NONE\n" +elif VERSION >= '4.0': console_out = b"==============================================================================\n" \ b"Small Test \n" \ b"==============================================================================\n" \ @@ -73,6 +91,7 @@ def test_running_robot_test(self): print(output, errors) parsed_output = bytes(output.replace(b'\r', b'')) parsed_errors = bytes(errors.replace(b'\r', b'')) + assert parsed_output == console_out self.assertTrue(parsed_output.startswith(console_out), msg=repr(output)) # Because of deprecation messages in RF 3.1, from Equal to Regex self.assertRegex(parsed_errors, b".*\\[ WARN \\] this passes\n") From 778ef347a4c3d2cf71e1457a480d64d1e4bb91ed Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Sat, 26 Oct 2024 23:39:12 +0100 Subject: [PATCH 2/6] Improve unit test --- utest/application/test_app_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utest/application/test_app_main.py b/utest/application/test_app_main.py index c4d9d951d..09a31e2c4 100644 --- a/utest/application/test_app_main.py +++ b/utest/application/test_app_main.py @@ -241,7 +241,7 @@ def test_get_code(self): main_app = RIDE() code = main_app._get_language_code() - assert code in (175, wx.LANGUAGE_ENGLISH_WORLD, wx.LANGUAGE_PORTUGUESE) + assert code in (wx.LANGUAGE_ENGLISH, wx.LANGUAGE_ENGLISH_WORLD, wx.LANGUAGE_PORTUGUESE) if __name__ == '__main__': From e80acfcab446c67cb3ddfe98f532ce259f492d0b Mon Sep 17 00:00:00 2001 From: HelioGuilherme66 Date: Sun, 27 Oct 2024 00:19:43 +0100 Subject: [PATCH 3/6] Change update from develop branch --- src/robotide/application/updatenotifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/robotide/application/updatenotifier.py b/src/robotide/application/updatenotifier.py index 2cf3949ca..ec3ecfcd2 100644 --- a/src/robotide/application/updatenotifier.py +++ b/src/robotide/application/updatenotifier.py @@ -102,12 +102,12 @@ def _get_rf_pypi_data(self): def upgrade_from_dev_dialog(version_installed, notebook, show_no_update=False): dev_version = urllib2.urlopen('https://raw.githubusercontent.com/robotframework/' - 'RIDE/master/src/robotide/version.py', timeout=1).read().decode('utf-8') + 'RIDE/develop/src/robotide/version.py', timeout=1).read().decode('utf-8') matches = re.findall(r"VERSION\s*=\s*'([\w.]*)'", dev_version) version_latest = matches[0] if matches else None if cmp_versions(version_installed, version_latest) == -1: # Here is the Menu Help->Upgrade insertion part, try to highlight menu # wx.CANCEL_DEFAULT - command = sys.executable + " -m pip install -U https://github.com/robotframework/RIDE/archive/master.zip" + command = sys.executable + " -m pip install -U https://github.com/robotframework/RIDE/archive/develop.zip" _add_content_to_clipboard(command) if not _askyesno(_("Upgrade?"), f"{SPC}{_('New development version is available.')}{SPC}\n{SPC}" f"{_('You may install version %s with:') % version_latest}\n" From a458f47cb6266464712f71300d182aeaccda0741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Guilherme?= Date: Sun, 27 Oct 2024 01:21:43 +0000 Subject: [PATCH 4/6] Cleanup code (#156) * Refactor TextEdit, WIP * Fix unit tests with language transform * Separated key commands in TextEdit. Breaks some, TAB functions, Enter.. * Delete commented code, renamve arguments * Refactor change_locale * Increase unit tests * Improve unit test * Improve unit test * Change update from develop branch * Remove comments --- src/robotide/editor/listeditor.py | 4 +--- src/robotide/preferences/editor.py | 17 ----------------- src/robotide/ui/preferences_dialogs.py | 4 ---- src/robotide/widgets/htmlwnd.py | 2 -- utest/application/test_app_main.py | 3 --- 5 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/robotide/editor/listeditor.py b/src/robotide/editor/listeditor.py index a383b671c..69f5130ef 100644 --- a/src/robotide/editor/listeditor.py +++ b/src/robotide/editor/listeditor.py @@ -36,6 +36,7 @@ class ListEditorBase(wx.Panel): _buttons_nt = [] def __init__(self, parent, columns, controller, label=None): + __ = label self._menu = [_('Edit'), _('Move Up\tCtrl-Up'), _('Move Down\tCtrl-Down'), '---', _('Delete')] wx.Panel.__init__(self, parent) from ..preferences import RideSettings @@ -195,10 +196,7 @@ def __init__(self, parent, columns, color_foreground='black', self.color_foreground = color_foreground self.color_background = color_background self.SetBackgroundColour(Colour(color_background)) - # self.SetOwnBackgroundColour(Colour(color_background)) self.SetForegroundColour(Colour(color_foreground)) - # self.SetOwnForegroundColour(Colour(color_foreground)) - # self.EnableAlternateRowColours(True) self._parent = parent self._doc_language = None self.set_language() diff --git a/src/robotide/preferences/editor.py b/src/robotide/preferences/editor.py index bfa1f0723..76aaf061c 100644 --- a/src/robotide/preferences/editor.py +++ b/src/robotide/preferences/editor.py @@ -64,11 +64,7 @@ def __init__(self, parent, title, preferences, style="auto"): self.font.SetPointSize(self._general_settings[FONT_SIZE]) self.SetFont(self.font) self.SetBackgroundColour(Colour(self._general_settings['background'])) - ## self.SetOwnBackgroundColour(Colour(200, 222, 40)) - ## self.SetOwnForegroundColour(Colour(7, 0, 70)) - # self.SetOwnBackgroundColour(Colour(self._general_settings['secondary background'])) self.SetForegroundColour(Colour(self._general_settings['foreground'])) - # self.SetOwnForegroundColour(Colour(self._general_settings['secondary foreground'])) self._closing = False panels = preferences.preference_panels @@ -224,10 +220,6 @@ def __init__(self, *args, **kwargs): self.title.SetFont(font) self.title.SetForegroundColour(self.settings['foreground']) self.title.SetBackgroundColour(self.settings['background']) - # self.title.SetBackgroundColour(Colour(200, 222, 40)) - # self.title.SetForegroundColour(Colour(7, 0, 70)) - # self.SetBackgroundColour(Colour(200, 222, 40)) - # self.SetForegroundColour(Colour(7, 0, 70)) self.SetForegroundColour(self.settings['foreground']) self.SetBackgroundColour(self.settings['background']) @@ -242,17 +234,8 @@ def ShowPanel(self, panel): if self._current_panel is not None: self._current_panel.Hide() self._current_panel = panel - ## self.SetForegroundColour(self.settings['foreground']) - ## self.SetOwnBackgroundColour(self.settings['background']) - ## self.SetOwnForegroundColour(Colour(255, 255, 255)) - ## self.SetBackgroundColour(self.settings['background']) panel.SetForegroundColour(self.settings['foreground']) # Critical text all black on panel.SetBackgroundColour(self.settings['background']) # Black background - ## self.SetBackgroundColour(Colour(200, 222, 40)) - ## self.SetForegroundColour(Colour(7, 0, 70)) - ## panel.SetBackgroundColour(Colour(200, 222, 40)) - ## panel.SetForegroundColour(Colour(255, 255, 255)) - ## panel.SetForegroundColour(Colour(7, 0, 70)) panel.Show() sizer = self.panels_container.GetSizer() item = sizer.GetItem(panel) diff --git a/src/robotide/ui/preferences_dialogs.py b/src/robotide/ui/preferences_dialogs.py index 881bba2d7..0b12c4cf5 100644 --- a/src/robotide/ui/preferences_dialogs.py +++ b/src/robotide/ui/preferences_dialogs.py @@ -31,8 +31,6 @@ class PreferencesPanel(wx.Panel): def __init__(self, parent=None, name_tr=None, *args, **kwargs): self.tree_item = None self.name_tr = name_tr - # self.location = (_("Preferences"),) - # self.title = _("Preferences") from ..preferences.settings import RideSettings wx.Panel.__init__(self, parent, *args, **kwargs) self._gsettings = RideSettings() @@ -275,8 +273,6 @@ def set_value(evt): evt.Skip() editor.Bind(wx.EVT_KILL_FOCUS, lambda evt: set_value(evt)) elabel = Label(parent, label=label) - # background_color = esettings['background'] - # foreground_color = esettings['foreground'] elabel.SetBackgroundColour(background_color) elabel.SetForegroundColour(foreground_color) return elabel, editor diff --git a/src/robotide/widgets/htmlwnd.py b/src/robotide/widgets/htmlwnd.py index 8147ebc3b..9eb1204d1 100644 --- a/src/robotide/widgets/htmlwnd.py +++ b/src/robotide/widgets/htmlwnd.py @@ -34,8 +34,6 @@ def __init__(self, parent, size=wx.DefaultSize, text=None): self.SetBorders(2) self.SetStandardFonts(size=9) self.SetBackgroundColour(Colour(200, 222, 40)) - # self.SetOwnBackgroundColour(Colour(200, 222, 40)) - # self.SetOwnForegroundColour(Colour(7, 0, 70)) if text: self.set_content(text) self.SetHTMLBackgroundColour(Colour(general_settings[BACKGROUND_HELP])) diff --git a/utest/application/test_app_main.py b/utest/application/test_app_main.py index 09a31e2c4..b8caccbca 100644 --- a/utest/application/test_app_main.py +++ b/utest/application/test_app_main.py @@ -232,9 +232,6 @@ def test_replace_std_for_win(self): class TestMisc(unittest.TestCase): - def tearDown(self): - builtins.__import__ = real_import - def test_get_code(self): import wx from robotide.application import RIDE From 57350973b510d86dcb0a86c42571e5c23525e624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9lio=20Guilherme?= Date: Sun, 27 Oct 2024 19:26:40 +0000 Subject: [PATCH 5/6] Add configobj as a submodule (#157) * Add configobj as a submodule * Add submodule init * Change submodule init and remove sudo * Reorganize steps * Update docs for development version * Update unit tests --- .github/workflows/linux.yml | 21 +- .github/workflows/sonar.yml | 9 +- .gitmodules | 3 + CHANGELOG.adoc | 7 +- MANIFEST.in | 1 + README.adoc | 10 +- setup.cfg | 4 + setup.py | 9 + src/robotide/application/CHANGELOG.html | 96 +- src/robotide/application/releasenotes.py | 149 +- src/robotide/preferences/__init__.py | 1 + src/robotide/preferences/configobj | 1 + src/robotide/preferences/configobj.py | 2336 ----------------- .../preferences/managesettingsdialog.py | 5 +- src/robotide/preferences/settings.py | 9 +- tasks.py | 4 + utest/application/test_app_main.py | 11 - utest/settings/test_settings.py | 2 +- utest/zulu_misc/test_get_language_code.py | 31 + 19 files changed, 156 insertions(+), 2553 deletions(-) create mode 100644 .gitmodules create mode 160000 src/robotide/preferences/configobj delete mode 100644 src/robotide/preferences/configobj.py create mode 100644 utest/zulu_misc/test_get_language_code.py diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3d483dd8d..603816dbd 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -66,27 +66,30 @@ jobs: image: fedora:latest options: --privileged steps: - - uses: actions/checkout@v3.3.0 - with: - submodules: false - name: Configure container environment run: | sudo dnf update -y sudo dnf install -y git git config --global --add safe.directory ${GITHUB_WORKSPACE} + - uses: actions/checkout@v3.3.0 + with: + submodules: false - name: Setup environment run: | sudo dnf install -y sdl12-compat python3-wxpython4 xorg-x11-server-Xvfb python3-pip psmisc sudo dnf downgrade -y mesa* --refresh - sudo -H pip install -r requirements-dev.txt + git submodule update --init --recursive + pip install -r requirements-dev.txt - name: Run tests run: | Xvfb & export DISPLAY=:0 export GITHUB_ACTIONS=True + git submodule update --init --recursive invoke test-ci - name: Install and run run: | + git submodule update --init --recursive pip install . xvfb-run --server-args="-screen 0, 1280x720x24" -a ride.py & sleep 10 @@ -103,20 +106,24 @@ jobs: submodules: false - name: Fetch tags run: | - git fetch --prune --depth=1 --no-recurse-submodules + git fetch --prune --depth=1 --recurse-submodules + git submodule update --init --recursive - name: Setup environment run: | sudo apt update -y sudo apt install -y libsdl1.2debian libsdl2-2.0-0 libnotify4 - sudo pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.1-cp310-cp310-linux_x86_64.whl - sudo pip install -r requirements-dev.txt + git submodule update --init --recursive + pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.1-cp310-cp310-linux_x86_64.whl + pip install -r requirements-dev.txt - name: Run tests run: | Xvfb & export DISPLAY=:0 + git submodule update --init --recursive invoke test-ci - name: Install and run run: | + git submodule update --init --recursive pip install . xvfb-run --server-args="-screen 0, 1280x720x24" -a ride.py & sleep 10 diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index abdd02af6..1bcbb6016 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -28,16 +28,19 @@ jobs: - name: Install invoke and any other packages run: pip install coverage invoke pytest - name: Install wxPython - run: pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.0-cp310-cp310-linux_x86_64.whl + run: pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/wxPython-4.2.1-cp310-cp310-linux_x86_64.whl - name: Install RIDE dependencies - run: pip install -r requirements-dev.txt + run: git submodule update --init --recursive + pip install -r requirements-dev.txt - name: Run Xvfb run: Xvfb :1 -noreset & - name: Test Install RIDE - run: pip install . + run: git submodule update --init --recursive + pip install . - name: Run RIDE unit-tests run: | export DISPLAY=:1 + git submodule update --init --recursive invoke test-ci - name: Analyze with SonarCloud uses: sonarsource/sonarcloud-github-action@master diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..8eb2cad0d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/robotide/preferences/configobj"] + path = src/robotide/preferences/configobj + url = https://github.com/DiffSK/configobj.git diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 15c97b69f..3a3a993c7 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -7,7 +7,12 @@ The format is based on http://keepachangelog.com/en/1.0.0/[Keep a Changelog] and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioning]. -// == https://github.com/robotframework/RIDE[Unreleased] +== https://github.com/robotframework/RIDE[Unreleased] + +=== Changed + +- Changed the workflow for the development versions of RIDE. Now, development versions are taken from the ``develop`` branch, and the ``master`` will stay with released version. +- Changed the way ``configobj`` code is imported. Now is a submodule obtained from https://github.com/DiffSK/configobj. == https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.1.rst[2.1] - 2024-10-13 diff --git a/MANIFEST.in b/MANIFEST.in index 2b8dd2cce..6c69da1ac 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,5 +8,6 @@ recursive-include src *.css *.js *.py *.robot *.txt *.png *.gif *.ico *.cfg *.ht recursive-include doc *.rst recursive-include rtest *.py *.txt recursive-include src/robotide/postinstall/RIDE.app *.* +recursive-include src/robotide/preferences/configobj/src/configobj *.* recursive-include src/robotide/localization *.py *.adoc *.pot *.po *.mo diff --git a/README.adoc b/README.adoc index c58b4b137..62ad8a17c 100644 --- a/README.adoc +++ b/README.adoc @@ -22,9 +22,9 @@ You can use the tag *robotframework-ide* to search and ask on https://stackoverf == **Welcome to the development version of RIDE - next major release will be version 2.2** -// If you are looking for the latest released version, you can get the source code from **https://github.com/robotframework/RIDE/releases[releases]** or from branch **https://github.com/robotframework/RIDE/tree/release/2.0.8.1[release/2.0.8.1]** +If you are looking for the latest released version, you can get the source code from **https://github.com/robotframework/RIDE/releases[releases]** or from branch **https://github.com/robotframework/RIDE/tree/release/2.1[release/2.1]** -// See the https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.0.8.1.rst[release notes] for latest release version 2.0.8.1 +See the https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.1.rst[release notes] for latest release version 2.1 **Version https://github.com/robotframework/RIDE/tree/release/2.0.8.1[2.0.8.1] was the last release supporting Python 3.6 and 3.7** @@ -36,13 +36,13 @@ You can use the tag *robotframework-ide* to search and ask on https://stackoverf Currently, the unit tests are tested on Python 3.10, and 3.12 (which is the recommended version). Likewise, the current version of wxPython, is 4.2.2, but RIDE is known to work with 4.0.7 and 4.1.1 versions. -(3.6 <= python <= 3.11) Install current released version (*2.1*) with: +(3.8 <= python <= 3.12) Install current released version (*2.1*) with: `pip install -U robotframework-ride` -(3.8 <= python <= 3.12) Install current development version (**2.1**) with: +(3.8 <= python <= 3.12) Install current development version (**2.1.1**) with: -`pip install -U https://github.com/robotframework/RIDE/archive/master.zip` +`pip install -U https://github.com/robotframework/RIDE/archive/develop.zip` //(3.8 <= python <= 3.12) Install current Beta version (2.1b1) with: diff --git a/setup.cfg b/setup.cfg index a46dea045..199ddd8cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,6 +10,10 @@ count = False max_line_length = 90 statistics = True +[options] +packages = find: +include_package_data = true + [options.entry_points] gui_scripts = ride = robotide.__main__:main diff --git a/setup.py b/setup.py index ab44a5d79..68bf86074 100644 --- a/setup.py +++ b/setup.py @@ -49,6 +49,14 @@ PACKAGE_DATA['robotide.localization'] = my_list[:] +my_list = [] +for curr_dir, _, files in os.walk('src/robotide/preferences/configobj/src/configobj'): + for item in files: + if '.' in item: + my_list.append(os.path.join(curr_dir, item).replace('\\', '/').replace('src/robotide/preferences/configobj/src/configobj/', '')) + +PACKAGE_DATA['robotide.preferences.configobj.src.configobj'] = my_list[:] + LONG_DESCRIPTION = """ Robot Framework is a generic test automation framework for acceptance level testing. RIDE is a lightweight and intuitive editor for Robot @@ -102,6 +110,7 @@ def run(self): url='https://github.com/robotframework/RIDE/', download_url='https://pypi.python.org/pypi/robotframework-ride', install_requires=REQUIREMENTS, + include_package_data=True, package_dir={'': SOURCE_DIR}, packages=find_packages(SOURCE_DIR), package_data=PACKAGE_DATA, diff --git a/src/robotide/application/CHANGELOG.html b/src/robotide/application/CHANGELOG.html index 2538141a6..e526208ef 100644 --- a/src/robotide/application/CHANGELOG.html +++ b/src/robotide/application/CHANGELOG.html @@ -1,6 +1,10 @@ Changelog

Changelog


All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog -and this project adheres to Semantic Versioning.

1. 2.1 - 2024-10-13

1.1. Added

  (2.1 - 2024-10-13)
+and this project adheres to Semantic Versioning.

1.1. Changed

  • +Changed the workflow for the development versions of RIDE. Now, development versions are taken from the ``develop`` branch, and the ``master`` will stay with released version. +
  • +Changed the way ``configobj`` code is imported. Now is a submodule obtained from https://github.com/DiffSK/configobj. +

2. 2.1 - 2024-10-13

2.1. Added

  (2.1 - 2024-10-13)
 - Added a setting for a specific Browser by editing the settings.cfg file. Add the string parameter
 ``browser`` in the section ``[Plugins][[Test Runner]]``.
   (2.1b1 - 2024-09-21)
@@ -55,7 +59,7 @@
 - Added ``FOR`` scope markers (``IN``, ``IN RANGE``, ``IN ENUMERATE``, ``IN ZIP``) to auto-complete list
 - Added support to read environment variable ``ROBOT_VERSION`` to apply some conditions.
 - Added note on Test Timeout that **timeout message** is not supported since Robot v3.0.1
-- Added the note, 'Colors will be active after next RIDE restart.' to the Preferences of Test Runner.

1.2. Changed

  (2.1 - 2024-10-13)
+- Added the note, 'Colors will be active after next RIDE restart.' to the Preferences of Test Runner.

2.2. Changed

  (2.1 - 2024-10-13)
 - Changed the order of insert and delete rows in Grid Editor rows context menu.
   (2.1b1 - 2024-09-21)
 - Allow to do auto-suggestions of keywords in Text Editor without a shortcut, if you want to enable or disable this feature you can config in `Tools -> Preferences -> Text Editor -> Enable auto suggestions`.
@@ -86,7 +90,7 @@
 - Changed alias marker on library imports to consider variable ``ROBOT_VERSION``. If version is lower than 6.0, uses ``'WITH NAME'``, otherwise will use ``'AS'``
   (2.0.3 - 2023-04-16)
 - Allow to do auto-suggestions of keywords in Grid Editor without a shortcut, if you want to enable or disable this feature you can config in `Tools-> Preferences -> Grid Editor -> Enable auto suggestions`
-- Made ``\\n`` visible when editing cells in Grid Editor (problematic in Windows)

1.3. Fixed

  (2.1 - 2024-10-13)
+- Made ``\\n`` visible when editing cells in Grid Editor (problematic in Windows)

2.3. Fixed

  (2.1 - 2024-10-13)
 - Fixed recognition of variables imported from YAML, JSON and Python files.
   (2.1b1 - 2024-09-21)
 - Fixed validation of multiple arguments with default values in Grid Editor.
@@ -134,18 +138,18 @@
 - Fixed clearing or emptying fixtures (Setups, Teardowns), now removes headers and synchronizes Text Editor
 - Fixed selection and persistance of colors in File Explorer and Project Tree panels
 - Fixed not using defined color for help and HTML content
-- Fixed missing newlines in sections separation

1.4. Removed

  (2.1a3 - 2024-07-22)
+- Fixed missing newlines in sections separation

2.4. Removed

  (2.1a3 - 2024-07-22)
 - Removed support for HTML file format (obsolete since Robot Framework 3.2)
-- Removed support for old Python versions, 3.6 nd 3.7.

2. 2.1b1 - 2024-09-21

2.1. Added

  • +- Removed support for old Python versions, 3.6 nd 3.7.

3. 2.1b1 - 2024-09-21

3.1. Added

  • Added color to Test Runner Console Log final output, report and log since RF v7.1rc1.
  • Added Korean language support for UI, experimental.
  • Added option ``caret style`` to change insert caret to block or line in Text Editor, by editing ``settings.cfg``. The color of the caret is the same as setting and will be adjusted for better contrast with the background. -

2.2. Changed

  • +

3.2. Changed

  • Allow to do auto-suggestions of keywords in Text Editor without a shortcut, if you want to enable or disable this feature you can config in Tools -> Preferences -> Text Editor -> Enable auto suggestions. -

2.3. Fixed

  • +

3.3. Fixed

  • Fixed validation of multiple arguments with default values in Grid Editor.
  • Fixed on Text Editor when Saving the selection of tests to run in Test Suites (Tree) is cleared. @@ -155,7 +159,7 @@ Fixed delete variable from Test Suite settings remaining in Project Explorer.
  • Fixed obsfuscation of Libraries and Metadata panels when expanding Settings in Grid Editor and Linux systems. -

3. 2.1a3 - 2024-07-22

3.1. Added

  • +

4. 2.1a3 - 2024-07-22

4.1. Added

  • Added support for Setup in keywords, since Robot Framework version 7.0.
  • Added support for new VAR marker, since Robot Framework version 7.0. @@ -196,7 +200,7 @@ Tooltips for the fields are always shown in English.
  • Colorization for language configured files is working in Text Editor. -

3.2. Fixed

  • +

4.2. Fixed

  • Fixed multiline variables in Variables section. In Text Editor they are separated by … continuation marker. In Grid Editor use | (pipe) to separate lines.
  • @@ -211,7 +215,7 @@ Fixed wrong continuation of long chains of keywords in Setups, Teardowns or Documentation
  • Fixed New User Keyword dialog not allowing empty Arguments field -

3.3. Changed

  • +

4.3. Changed

  • Improved release packaging of RIDE, by using entry_points in setuptools configuration.
  • Parsing of clipboard content to separate by cells in Grid Editor. NOTE: Need to Apply Changes in Text Editor to be effective. @@ -219,11 +223,11 @@ Improved selection of items from Tree in Text Editor. Now finds more items and selects whole line.
  • Changed output in plugin Run Anything (Macros) to allow Zoom In/Out, and Copy content. -

3.4. Removed

  • +

4.4. Removed

  • Removed support for HTML file format (obsolete since Robot Framework 3.2)
  • Removed support for old Python versions, 3.6 nd 3.7. -

4. 2.0.8.1 - 2023-11-01

4.1. Added

  • +

5. 2.0.8.1 - 2023-11-01

5.1. Added

  • Added auto update check when development version is installed
  • Added menu option ``Help→Check for Upgrade`` which allows to force update check and install development version @@ -242,7 +246,7 @@ Added variables creation shortcuts (``Ctrl-1,2,5``) to fields Arguments in Grid Editor
  • Added support for JSON variables, by using the installed Robot Framework import method -

4.2. Fixed

  • +

5.2. Fixed

  • Fixed escaped spaces showing in Text Editor on commented cells
  • Fixed resource files dissapearing from Project tree on Windows @@ -260,7 +264,7 @@ Position of cursor in Text Editor auto-suggestions when line contains multibyte characters
  • Drag and drop of variables defined with comments between resource files -

4.3. Changed

  • +

5.3. Changed

  • Improved keywords documentation search, by adding current dir to search
  • Improved Move up/down, ``Alt-UpArrow``/``Alt-DownArrow`` in Text Editor, to have proper indentation and selection @@ -276,14 +280,14 @@ Improved keyword ``Find Usages`` to return more matches. Fails to find mixed spaces and ``_``
  • In Grid Editor ``Ctrl-Shift-4`` now replaces escaped spaces ``\\ `` by spaces -

5. 2.0.7 - 2023-08-13

5.1. Added

  • +

6. 2.0.7 - 2023-08-13

6.1. Added

  • Added indication of matching brackets, ``()``, ``{}``, ``[]``, in Text Editor
  • Added context menu to RIDE tray icon. Options Show, Hide and Close
  • Added sincronization with Project Explorer to navigate to selected item, Test Case, Keyword, Variable, in Text Editor Note: This feature is working fine in Fedora 38, but not on Windows and macOS. -

5.2. Fixed

  • +

6.2. Fixed

  • Fixed non syncronized expanding/collapse of Settings panel in Grid Editor, on Linux
  • Fixed not working the deletion of cells commented with ``\# `` in Grid Editor with ``Ctrl-Shift-D`` @@ -297,17 +301,17 @@ Fixed title of User Keyword in Grid Editor always showing ``Find Usages`` instead of the keyword name
  • Fixed renaming keywords when they were arguments of ``Run Keywords`` in Setups and Teardowns -

5.3. Changed

  • +

6.3. Changed

  • Improve Text Editor auto-suggestions to keep libraries prefixes. -

6. 2.0.6 - 2023-06-10

6.1. Added

  • +

7. 2.0.6 - 2023-06-10

7.1. Added

  • Added boolean parameter ``filter newlines`` to Grid Editor with default ``True``, to hide or show newlines in cells -

6.2. Changed

  • +

7.2. Changed

  • Changed ``tasks.py`` to test ``utest/application/test_app_main.py`` isolated from the other tests
  • Improve auto-suggestions of keywords in Grid Editor by allowing to close suggestions list with keys ARROW_LEFT or ARROW_RIGHT
  • Improve Text Editor auto-suggestions by using: selected text, text at left or at right of cursor -

7. 2.0.5 - 2023-05-08

7.1. Added

  • +

8. 2.0.5 - 2023-05-08

8.1. Added

  • Added ``FOR`` scope markers (``IN``, ``IN RANGE``, ``IN ENUMERATE``, ``IN ZIP``) to auto-complete list
  • Added support to read environment variable ``ROBOT_VERSION`` to apply some conditions. @@ -315,15 +319,15 @@ Added note on Test Timeout that timeout message is not supported since Robot v3.0.1
  • Added the note, Colors will be active after next RIDE restart. to the Preferences of Test Runner. -

7.2. Changed

  • +

8.2. Changed

  • Changed alias marker on library imports to consider variable ``ROBOT_VERSION``. If version is lower than 6.0, uses ``WITH NAME``, otherwise will use ``AS`` -

8. Fixed

  • +

9. Fixed

  • Fixed auto-indent on block commands in Text Editor -

9. 2.0.3 - 2023-04-16

9.1. Changed

  • +

10. 2.0.3 - 2023-04-16

10.1. Changed

  • Allow to do auto-suggestions of keywords in Grid Editor without a shortcut, if you want to enable or disable this feature you can config in Tools-> Preferences -> Grid Editor -> Enable auto suggestions
  • Made ``\\n`` visible when editing cells in Grid Editor (problematic in Windows) -

10. Fixed

  • +

11. Fixed

  • Fixed missing auto-enclosing when in Cell Editor in Linux
  • Fixed RIDE will crash when using third party input method in Mac OS @@ -337,7 +341,7 @@ Fixed not using defined color for help and HTML content
  • Fixed missing newlines in sections separation -

11. 2.0 - 2023-03-01

11.1. Added

  (2.0rc1 - 2023-02-26)
+

12. 2.0 - 2023-03-01

12.1. Added

  (2.0rc1 - 2023-02-26)
 - Minimal support to accept `*** Comments ***` sections (unfinished code)
 - Added insert and delete cells to Text Editor, by using ``Ctrl-Shift-I`` and ``Ctrl-Shift-D``
 - Added move up and move down rows to Text Editor, by using ``Alt-Up`` and ``Alt-Down``
@@ -390,13 +394,13 @@
 - Added enclosing text in Text Editor or selected text with certain symbols
 - Added enclosing text in Grid Editor or selected text with certain symbols
 - Added 8s timer to shortcut creation dialog on install
-- Added process memory limit on Messages Log

11.2. Removed

  (2.0b2 - 2022-09-05)
+- Added process memory limit on Messages Log

12.2. Removed

  (2.0b2 - 2022-09-05)
 - Removed ``robotframeworklexer`` dependency and local copy
 - Removed alignment flag on grid cell JSON Editor (Ctrl-Shift-J)
 - Removed moving to keyword/variable definition when doing Double-Click in grid cell
   (2.0b1 - 2020-07-26)
 - Python 2.7 support
-- wxPython/wxPhoenix version conditioning

11.3. Changed

  (2.0b3 - 2023-01-15)
+- wxPython/wxPhoenix version conditioning

12.3. Changed

  (2.0b3 - 2023-01-15)
 - Hiding items in Test Suites explorer with names starting with #
 - Disabled the Close button on the Test Suites explorer
   This was causing not being possible to restore it, unless editing the settings.cfg file.
@@ -425,7 +429,7 @@
 - Changed icon background to white
 - Made Project Tree and File Explorer panels, Plugins.
 - wx.NewId() to wx.NewIdRef()
-- Separated AppendText for Messages Log

11.4. Fixed

  (2.0rc1 - 2023-02-26)
+- Separated AppendText for Messages Log

12.4. Fixed

  (2.0rc1 - 2023-02-26)
 - Fixed blank Grid Editor at keywords with steps commented with ``\# ``, by using ``Ctrl-Shift-3 on Text Editor
   (2.0b3 - 2023-01-15)
 . Fixed low performance when opening large projects
@@ -499,7 +503,7 @@
 - Fixed Settings editor
 - Fixed blank Edit screen
 - Fixed Runner arguments parsing
-- Fixed Runner Log window Chinese and Latin encoding chars on Windows

12. 2.0rc1 - 2023-02-26

12.1. Added

  • +- Fixed Runner Log window Chinese and Latin encoding chars on Windows

13. 2.0rc1 - 2023-02-26

13.1. Added

  • Minimal support to accept *** Comments *** sections (unfinished code)
  • Added insert and delete cells to Text Editor, by using ``Ctrl-Shift-I`` and ``Ctrl-Shift-D`` @@ -507,30 +511,30 @@ Added move up and move down rows to Text Editor, by using ``Alt-Up`` and ``Alt-Down``
  • Added insert and delete rows to Text Editor, by using ``Ctrl-I`` and ``Ctrl-D`` -

12.2. Removed

12.3. Changed

12.4. Fixed

  • +

13.2. Removed

13.3. Changed

13.4. Fixed

  • Fixed blank Grid Editor at keywords with steps commented with ``\# ``, by using ``Ctrl-Shift-3 on Text Editor -

13. 2.0b3 - 2023-01-15

13.1. Added

  • +

14. 2.0b3 - 2023-01-15

14.1. Added

  • Added swap row up, by using ``Ctrl-T``
  • Added commenting/uncommenting of content with ``\# ``, by using ``Ctrl-Shift-3`` and ``Ctrl-Shift-4``
  • Added support for editing .robot and .resource files with content before sections -

13.2. Removed

  • +

14.2. Removed

  • None -

13.3. Changed

  • +

14.3. Changed

  • Hiding items in Test Suites explorer with names starting with #
  • Disabled the Close button on the Test Suites explorer This was causing not being possible to restore it, unless editing the settings.cfg file. Other reason was to prevent user to closing it, after detaching the panel, and re-attaching, which has a bug making the Tree not visible. -

13.4. Fixed

  1. +

14.4. Fixed

  1. Fixed low performance when opening large projects

    • Fixed comment and uncomment in Grid Editor when cells contain more than one variables assignement
    • Fixed console log stopping to output certain characters, like chinese and latin -

14. 2.0b2 - 2022-09-05

14.1. Added

  • +

15. 2.0b2 - 2022-09-05

15.1. Added

  • Added menu entry at Help → Offline Change Log to view this file on disk
  • Added skipped tests counter and corresponding colored icon on Project tree @@ -598,13 +602,13 @@ When editing, Ctrl-Home and Ctrl-End move cursor to start and end of cell content respectively.
  • Added Del key to clear Grid Editor cell content when in navigation mode (clear like doing Ctrl-X) -
  • 14.2. Removed

    • +

    15.2. Removed

    • Removed ``robotframeworklexer`` dependency and local copy
    • Removed alignment flag on grid cell JSON Editor (Ctrl-Shift-J)
    • Removed moving to keyword/variable definition when doing Double-Click in grid cell -

    14.3. Changed

    • +

    15.3. Changed

    • Unit tests to use ``pytest`` and removed ``nose`` dependency. Support for Python 3.10 at unit test level.
    • Prevent expanding Tests and change selection on Project tree (when right-clicking) @@ -634,7 +638,7 @@ Changed Enter button in navigation mode to start editing cell, and to move to right cell when in edit mode
    • Performance improvements for loading large test suites -

    14.4. Fixed

    • +

    15.4. Fixed

    • Fixed missing menu icons on Linux (was working on Windows)
    • Fixed removal of animation in Project tree when test run is interrupted @@ -707,7 +711,7 @@ Fixed RIDE startup crash when Tree or File Explorer plugins use opened=False setting
    • Fixed error occurring when deleting test cases on Tree -

    15. 2.0b1 - 2020-07-26

    15.1. Added

    • +

    16. 2.0b1 - 2020-07-26

    16.1. Added

    • Added CHANGELOG.adoc
    • Added ignoring log.html and report.html on reporting HTML test suites @@ -725,11 +729,11 @@ Added 8s timer to shortcut creation dialog on install
    • Added process memory limit on Messages Log -

    15.2. Removed

    • +

    16.2. Removed

    • Python 2.7 support
    • wxPython/wxPhoenix version conditioning -

    15.3. Changed

    • +

    16.3. Changed

    • Improved filesystem changes detection, with a confirmation dialog to reload workspace
    • Changed dependency on wx.Window on tree panel @@ -743,7 +747,7 @@ wx.NewId() to wx.NewIdRef()
    • Separated AppendText for Messages Log -

    15.4. Fixed

    • +

    16.4. Fixed

    • Fixed editing cells in Grid Editor on wxPython 4.1
    • Fixed not saving file after deleting text in Text Editor @@ -803,12 +807,12 @@ Fixed Runner arguments parsing
    • Fixed Runner Log window Chinese and Latin encoding chars on Windows -

    16. 1.7.4.2 - 2020-01-20

    16.1. Added

    • +

    17. 1.7.4.2 - 2020-01-20

    17.1. Added

    • wxPython version locked up to 4.0.7.post2. -

    16.2. Removed

    • +

    17.2. Removed

    • None -

    16.3. Changed

    • +

    17.3. Changed

    • None -

    16.4. Fixed

    • +

    17.4. Fixed

    • None
    diff --git a/src/robotide/application/releasenotes.py b/src/robotide/application/releasenotes.py index 3c1f061e6..63a391bfe 100644 --- a/src/robotide/application/releasenotes.py +++ b/src/robotide/application/releasenotes.py @@ -125,7 +125,7 @@ def set_content(self, html_win, content): milestone = re.split('[ab-]', VERSION)[0] WELCOME_TEXT = f""" -

    Welcome to use RIDE version {version}

    +

    Welcome to use RIDE DEVELOPMENT version {version}

    Thank you for using the Robot Framework IDE (RIDE).

    @@ -148,52 +148,17 @@ def set_content(self, html_win, content):
    -

    RIDE is celebrating 16 years on this date!

    -

    RIDE (Robot Framework IDE) {VERSION} is a new release with important enhancements and bug fixes. The reference for valid arguments is Robot Framework installed version, which is at this - moment 7.1. However, internal library code is originally based on version 3.1.2, but adapted for new versions.

    + moment 7.1.1. However, internal library code is originally based on version 3.1.2, but adapted for new versions.

    • This version supports Python 3.8 up to 3.12.
    • There are some changes, or known issues:
        -
      • ❌ - Removed support for Python 3.6 and 3.7
      • -
      • ✔ - Fixed recognition of variables imported from YAML, JSON and Python files.
      • -
      • ✔ - Added a setting for a specific Browser by editing the settings.cfg file. Add the string parameter -browser in the section [Plugins][[Test Runner]]
      • -
      • ✔ - Fixed on Text Editor when Saving the selection of tests to run in Test Suites (Tree) is cleared.
      • -
      • ✔ - Added Korean language support for UI.
      • -
      • ✔ - Added caret style to change insert caret to 'block' or 'line' in Text Editor, by editing -settings.cfg. The color of the caret is the same as 'setting' and will be adjusted for better contrast with the - background.
      • -
      • ✔ - Allow to do auto-suggestions of keywords in Text Editor without a shortcut, if you want to enable or disable -this feature you can config in `Tools -> Preferences -> Text Editor -> Enable auto suggestions`.
      • -
      • ✔ - Added support for Setup in keywords, since Robot Framework version 7.0.
      • -
      • ✔ - Added support for new VAR marker, since Robot Framework version 7.0.
      • -
      • ✔ - Added to Grid Editor changing Zoom In/Out with Ctrl-Mouse Wheel and setting at Preferences.
      • -
      • ✔ - Fixed plugin Run Anything (Macros) not showing output and broken actions.
      • -
      • ✔ - Added actions on columns of Grid Editor: Double-Click or Right Mouse Click, allows to edit the column name for - Data -Driven or Templated; Left Mouse Click, selects the column cells.
      • -
      • ✔ - Added command line option, --settingspath, to select a different configuration.
      • -
      • ✔ - Added different settings file, according the actual Python executable, if not the original installed.
      • -
      • ✔ - Added a selector for Tasks and Language to the New Project dialog.
      • -
      • ✔ - Added UI localization prepared for all the languages from installed Robot Framework version 6.1, or -higher. Major translations are: Dutch, Portuguese and Brazilian Portuguese. Still missing translation -of some elements.
      • -
      • ✔ - Added support for language configured test suites, with languages from installed Robot Framework version 6.1, - or -higher.
      • -
      • ✔ - On Text Editor, pressing Ctrl when the caret/cursor is near a Keyword will show a detachable window with - the -documentation, at Mouse Pointer position.
      • -
      • ✔ - RIDE tray icon now shows a context menu with options Show, Hide and Close.
      • -
      • ✔ - Highlighting and navigation of selected Project Explorer items, in Text Editor.
      • -
      • ✔ - When editing in Grid Editor with content assistance, the selected content can be edited by escaping the list of -suggestions with keys ARROW_LEFT or ARROW_RIGHT.
      • -
      • ✔ - Newlines in Grid Editor can be made visible with the filter newlines set to False.
      • +
      • 🐞 - When upgrading RIDE and activate Restart, some errors are visible about missing /language file, and behaviour + is not normal. Better to close RIDE and start a new instance.
      • 🐞 - Problems with COPY/PASTE in Text Editor have been reported when using wxPython 4.2.0, but not with version 4.2.1 and 4.2.2, which we now recommend.
      • 🐞 - Some argument types detection (and colorization) is not correct in Grid Editor.
      • @@ -204,94 +169,7 @@ def set_content(self, html_win, content):

      New Features and Fixes Highlights

        -
      • Fixed recognition of variables imported from YAML, JSON and Python files.
      • -
      • Added a setting for a specific Browser by editing the settings.cfg file. Add the string parameter -browser in the section [Plugins][[Test Runner]]
      • -
      • Changed the order of insert and delete rows in Grid Editor rows context menu.
      • -
      • Fixed validation of multiple arguments with default values in Grid Editor.
      • -
      • Added color to Test Runner Console Log final output, report and log since RF v7.1rc1.
      • -
      • Fixed on Text Editor when Saving the selection of tests to run in Test Suites (Tree) is cleared.
      • -
      • Added Korean language support for UI, experimental.
      • -
      • Fixed wrong item selection, like Test Suite, when doing right-click actions in Project Explorer.
      • -
      • Fixed delete variable from Test Suite settings remaining in Project Explorer.
      • -
      • Added caret style to change insert caret to 'block' or 'line' in Text Editor, by editing -settings.cfg. The color of the caret is the same as 'setting' and will be adjusted for better contrast with the - background.
      • -
      • Fixed obsfuscation of Libraries and Metadata panels when expanding Settings in Grid Editor and Linux systems.
      • -
      • Allow to do auto-suggestions of keywords in Text Editor without a shortcut, if you want to enable or disable -this feature you can config in `Tools -> Preferences -> Text Editor -> Enable auto suggestions`.
      • -
      • Added support for Setup in keywords, since Robot Framework version 7.0.
      • -
      • Fixed multiline variables in Variables section. In Text Editor they are separated by ... continuation marker. -In Grid Editor use | (pipe) to separate lines.
      • -
      • Added support for new VAR marker, since Robot Framework version 7.0.
      • -
      • Added configurable style of the tabs in notebook pages, Edit, Text, Run, etc. Parameter notebook theme - takes values from 0 to 5. See wxPython, demo for agw.aui for details.
      • -
      • Added UI localization and support for Japanese configured test suites, valid for Robot Framework version 7.0.1 or - higher.
      • -
      • Fixed keywords Find Usages in Grid Editor not finding certain values when using Gherkin.
      • -
      • Improved selection of items from Tree in Text Editor. Now finds more items and selects whole line.
      • -
      • Changed output in plugin Run Anything (Macros) to allow Zoom In/Out, and Copy content.
      • -
      • Added to Grid Editor changing Zoom In/Out with Ctrl-Mouse Wheel and setting at Preferences.
      • -
      • Fixed plugin Run Anything (Macros) not showing output and broken actions.
      • -
      • Added actions on columns of Grid Editor: Double-Click or Right Mouse Click, allows to edit the column name for Data -Driven or Templated; Left Mouse Click, selects the column cells.
      • -
      • Added command line option, --settingspath, to select a different configuration.
      • -
      • Added different settings file, according the actual Python executable, if not the original installed.
      • -
      • Fixed headers and blank spacing in Templated tests.
      • -
      • Added context option Open Containing Folder to test suites directories in Project Explorer.
      • -
      • Added a setting for a specific file manager by editing the settings.cfg file. Add the string parameter -file manager -in the section [General]
      • -
      • Added minimal support to have comment lines in Import settings. These are not supposed to be edited in Editor, -and new lines are added at Text Editor.
      • -
      • Fixed removal of continuation marker in steps
      • -
      • Fixed wrong continuation of long chains of keywords in Setups, Teardowns or Documentation.
      • -
      • Added a selector for Tasks and Language to the New Project dialog. Still some problems: Tasks type changes to Tests, -localized sections only stay translated after Apply in Text Editor.
      • -
      • Added UI localization prepared for all the languages from installed Robot Framework version 6.1, or -higher. Language is selected from Tools->Preferences->General.
      • -
      • Removed support for HTML file format (obsolete since Robot Framework 3.2)
      • -
      • Added support for language configured test suites. Fields are shown in the language of the files in Grid Editor. - Tooltips are always shown in English. Colorization for language configured files is working in Text Editor.
      • -
      • Fixed New User Keyword dialog not allowing empty Arguments field
      • -
      • Fixed escaped spaces showing in Text Editor on commented cells
      • -
      • Improved keywords documentation search, by adding current dir to search
      • -
      • Improved Move up/down, Alt-UpArrow/Alt-DownArrow in Text Editor, to have proper indentation and -selection
      • -
      • Added auto update check when development version is installed
      • -
      • Added menu option Help->Check for Upgrade which allows to force update check and install development -version
      • -
      • Added Upgrade Now action to update dialog.
      • -
      • Added Test Tags field (new, since Robot Framework 6.0) to Test Suites settings. This field will replace -Default and Force Tags settings, after Robot Framework 7.0
      • -
      • Improved RIDE Log and Parser Log windows to allow Zoom In/Out with Ctrl-Mouse Wheel
      • -
      • Hide continuation markers in Project Tree
      • -
      • Improved content assistance in Text Editor by allowing to filter list as we type
      • -
      • Fixed resource files disappearing from Project tree on Windows
      • -
      • Fixed missing indication of link for User Keyword, when pressing Ctrl in Grid Editor
      • -
      • Added content help pop-up on Text Editor by pressing Ctrl for text at cursor position or selected -autocomplete list item
      • -
      • Added Exclude option in context nenu for Test files, previously was only possible for Test Suites folders
      • -
      • Added exclusion of monitoring filesystem changes for files and directories excluded in Preferences
      • -
      • Fixed exception when finding GREY color for excluded files and directories in Project Tree
      • -
      • Added support for JSON variables, by using the installed Robot Framework import method
      • -
      • Colorization of Grid Editor cells after the continuation marker ... and correct parsing of those lines
      • -
      • Colorization of Grid Editor cells when contents is list or dictionary variables
      • -
      • Added indication of matching brackets, (), """'''{}'''f""", [], in Text Editor
      • -
      • Fixed non synchronized expanding/collapse of Settings panel in Grid Editor, on Linux
      • -
      • Fixed not working the deletion of cells commented with # in Grid Editor with Ctrl-Shift-D
      • -
      • Fixed empty line being always added to the Variables section in Text Editor
      • -
      • Improved project file system changes and reloading
      • -
      • Added context menu to RIDE tray icon. Options Show, Hide and Close
      • -
      • Added synchronization with Project Explorer to navigate to selected item, Test Case, Keyword, Variable, in Text - Editor
      • -
      • Control commands (FOR, IF, TRY, etc) will only be colorized as valid keywords when typed in -all caps in Grid Editor
      • -
      • Newlines in Grid Editor can be made visible with the filter newlines set to False, by editing -settings.cfg
      • -
      • Improve auto-suggestions of keywords in Grid Editor by allowing to close suggestions list with keys ARROW_LEFT or -ARROW_RIGHT
      • -
      • Improve Text Editor auto-suggestions by using: selected text, text at left or at right of cursor
      • +
      • Fixed double action on Linux when pressing the DEL key
      @@ -313,11 +191,11 @@ def set_content(self, html_win, content): issue tracker. You should see Robot Framework Forum if your problem is already known.

      -

      To install with pip installed, just run

      +

      To install the latest release with pip installed, just run

      -pip install --upgrade robotframework-ride=={VERSION}
      +pip install --upgrade robotframework-ride==2.1
       
      -

      to install exactly this release, which is the same as using

      +

      to install exactly the specified release, which is the same as using

       pip install --upgrade robotframework-ride
       
      @@ -330,26 +208,23 @@ def set_content(self, html_win, content): If you want to help in the development of RIDE, by reporting issues in current development version, you can install with:

      -pip install -U https://github.com/robotframework/RIDE/archive/master.zip
      +pip install -U https://github.com/robotframework/RIDE/archive/develop.zip
       

      Important document for helping with development is the CONTRIBUTING.adoc.

      -

      See the FAQ for - important info about : FOR changes and other known issues and workarounds.

      + href="https://github.com/robotframework/RIDE/blob/develop/CONTRIBUTING.adoc">CONTRIBUTING.adoc.

      To start RIDE from a command window, shell or terminal, just enter:

      ride

      You can also pass some arguments, like a path for a test suite file or directory.

      ride example.robot

      Another possible way to start RIDE is:

      -python -m robotide.__init__
      +python -m robotide
       

      You can then go to Tools>Create RIDE Desktop Shortcut, or run the shortcut creation script with:

      python -m robotide.postinstall -install

      or

      ride_postinstall.py -install
      -

      RIDE {VERSION} was released on 13/October/2024 (16 years after its first version).

      +

      RIDE {VERSION} was released on 27/October/2024.