Robot Framework Integrated Development Environment (RIDE)
releasenotes.py
Go to the documentation of this file.
1 # -*- encoding: utf-8 -*-
2 # Copyright 2008-2015 Nokia Networks
3 # Copyright 2016- Robot Framework Foundation
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 
17 import wx
18 from wx import Colour
19 from wx.lib.ClickableHtmlWindow import PyClickableHtmlWindow
20 from os.path import abspath, join, dirname
21 
22 from ..action import ActionInfo
23 from ..version import VERSION
24 from ..widgets import HtmlDialog
25 # from ..widgets.htmlwnd import HTML_BACKGROUND
26 
27 
28 
34 class ReleaseNotes():
35 
36  def __init__(self, application):
37  self.applicationapplication = application
38  settings = application.settings
39  self.version_shownversion_shown = settings.get('version_shown', '')
40  self.general_settingsgeneral_settings = settings['General']
41  self._view_view = None
42  self._dialog_dialog = None
43  self.enableenable()
44 
45  def enable(self):
46  self.applicationapplication.frame.actions.register_action(ActionInfo('Help', 'Release Notes',
47  self.showshow,
48  doc='Show the release notes'))
49  self.applicationapplication.frame.actions.register_action(ActionInfo('Help', 'Offline Change Log',
50  self.show_changelogshow_changelog,
51  doc='Show the offline CHANGELOG'))
52  self.show_if_updatedshow_if_updated()
53 
54  def show_if_updated(self):
55  if self.version_shownversion_shown != VERSION:
56  self.showshow()
57  self.applicationapplication.settings['version_shown'] = VERSION
58 
59  def show(self, event=None):
60  if not self._view_view:
61  self._view_view = self._create_view_create_view()
62  self.applicationapplication.frame.notebook.AddPage(self._view_view, "Release Notes", select=False)
63  self.applicationapplication.frame.notebook.show_tab(self._view_view)
64 
65  def show_changelog(self, event=None):
66  if not self._dialog_dialog:
67  self._dialog_dialog = HtmlDialog('Offline Change Log', 'Check the online version at https://github.com/robotframework/RIDE/blob/master/CHANGELOG.adoc')
68  self._dialog_dialog.SetSize(800, 800)
69  self._dialog_dialog.html_wnd.LoadFile(join(dirname(abspath(__file__)), "CHANGELOG.html"))
70  self._dialog_dialog.html_wnd.SetBackgroundColour(self.general_settingsgeneral_settings['background help'])
71  self._dialog_dialog.html_wnd.SetForegroundColour(self.general_settingsgeneral_settings['foreground text'])
72  self._dialog_dialog.Show()
73 
74  def bring_to_front(self):
75  if self._view_view:
76  self.applicationapplication.frame.notebook.show_tab(self._view_view)
77 
78  def _create_view(self):
79  panel = wx.Panel(self.applicationapplication.frame.notebook)
80  html_win = PyClickableHtmlWindow(panel, -1)
81  html_win.SetStandardFonts()
82  fgcolor = self.general_settingsgeneral_settings.get('foreground text', Colour(7, 0, 70))
83  """
84  panel.SetBackgroundColour(Colour(200, 222, 40))
85  """
86  panel.SetForegroundColour(fgcolor)
87  html_win.SetOwnForegroundColour(fgcolor)
88  self.set_contentset_content(html_win, WELCOME_TEXT + RELEASE_NOTES)
89  sizer = wx.BoxSizer(wx.VERTICAL)
90  sizer.Add(html_win, 1, wx.EXPAND|wx.ALL, border=8)
91  panel.SetSizer(sizer)
92  return panel
93 
94  def set_content(self, html_win, content):
95  bkgcolor = self.general_settingsgeneral_settings.get('background help', Colour(240, 242, 80))
96  fgcolor = self.general_settingsgeneral_settings.get('foreground text', Colour(7, 0, 70))
97  # print(f"DEBUG: set_content bkg={bkgcolor} bkg={type(bkgcolor)} fg={fgcolor} fg={type(fgcolor)}")
98  try:
99  # tuple(bkgcolor)
100  bcolor = ''.join(hex(item)[2:] for item in bkgcolor)
101  fcolor = ''.join(hex(item)[2:] for item in fgcolor)
102 
105  _content = '<body "bgcolor=#%s;" "color=#%s;">%s</body>' % (bcolor, fcolor, content)
106  # print(f"DEBUG: set_content after bkg={bcolor} bkg={type(bcolor)} fg={fcolor} fg={type(fcolor)}")
107  except TypeError:
108 
111  _content = '<body bgcolor=%s>%s</body>' % (bkgcolor, content)
112  html_win.SetPage(_content)
113 
114 
115 import time, os, re
116 
117 date = time.strftime('%d/%m/%Y', time.localtime(os.path.getmtime(__file__)))
118 version = VERSION
119 milestone = re.split('[ab-]', VERSION)[0]
120 
121 WELCOME_TEXT = f"""
122 <h2>Welcome to use RIDE version {version}</h2>
123 
124 <p>Thank you for using the <a href="https://robotframework.org/">Robot Framework</a> IDE (RIDE).</p>
125 
126 <p>Visit RIDE on the web:</p>
127 
128 <ul>
129  <li><a href="https://github.com/robotframework/RIDE">
130  RIDE project page on github</a></li>
131  <li><a href="https://github.com/robotframework/RIDE/wiki/Installation-Instructions">
132  Installation instructions</a></li>
133  <li><a href="https://github.com/robotframework/RIDE/releases">
134  Release notes</a></li>
135 </ul>
136 """
137 
138 # *** DO NOT EDIT THE CODE BELOW MANUALLY ***
139 # Release notes are updated automatically by package.py script whenever
140 # a numbered distribution is created.
141 RELEASE_NOTES = f"""
142 
143 <div class="document">
144 
145 
146 <p><a class="reference external" href="https://github.com/robotframework/RIDE/">RIDE (Robot Framework IDE)</a> v2.0b3 is a new release with major enhancements and bug fixes.
147 This version v2.0b3 includes removal of Python 2.7 support. The reference for valid arguments is <a class="reference external" href="http://robotframework.org">Robot Framework</a> installed version, which is at this moment 6.0.2. However, internal library is based on version 3.1.2, to keep compatibility with old formats.</p>
148 <ul class="simple">
149 <li>This is the <strong>first version without support for Python 2.7</strong>.</li>
150 <li>The last version with support for Python 2.7 was <strong>1.7.4.2</strong>.</li>
151 <li>Support for Python 3.6 up to 3.10 (current version on this date).</li>
152 <li>There are some important changes, or known issues:<ul>
153 <li>On MacOS to call autocomplete in Grid and Text Editors, you have to use Alt-Space (not Command-Space).</li>
154 <li>On Linux and Windows to call autocomplete in Grid and Text Editors, you have to use Ctrl-Space.</li>
155 <li>On Text Editor the TAB key adds the defined number of spaces. With Shift moves to the left, and together with Control selects text.</li>
156 <li>On Text Editor the <strong>: FOR</strong> loop structure must use Robot Framework 3.1.2 syntax, i.e. <strong>FOR</strong> and <strong>END</strong>.</li>
157 <li>On Grid Editor and Linux the auto enclose is only working on cell selection, but not on cell content edit.</li>
158 <li>On Text Editor when Saving the selection os tests in Test Suites (Tree) is cleared.</li>
159 </ul>
160 </li>
161 </ul>
162 <p><strong>New Features and Fixes Highlights</strong></p>
163 <ul class="simple">
164 <li>Auto enclose text in &#123;&#125;, [], &quot;&quot;, ''</li>
165 <li>Auto indent in Text Editor on new lines</li>
166 <li>Block indent in Text Editor (TAB on block of selected text)</li>
167 <li>Ctrl-number with number, 1-5 also working on Text Editor:<ol class="arabic">
168 <li>create scalar variable</li>
169 <li>create list variable</li>
170 <li>Comment line (with Shift comment content with #)</li>
171 <li>Uncomment line (with Shift uncomment content with #)</li>
172 <li>create dictionary variable</li>
173 </ol>
174 </li>
175 <li>Persistence of the position and state of detached panels, File Explorer and Test Suites</li>
176 <li>File Explorer and Test Suites panels are now Plugins and can be disabled or enabled and made Visible with F11 ( Test Suites with F12, but disabled for now)</li>
177 <li>File Explorer now shows selected file when RIDE starts</li>
178 <li>Block comment and uncomment on both Grid and Text editors</li>
179 <li>Extensive color customization of panel elements via <cite>Tools&gt;Preferences</cite></li>
180 <li>Color use on Console and Messages Log panels on Test Run tab</li>
181 </ul>
182 <p>Please note, that the features and fixes are not yet closed. This pre-release is being done because it has important fixes.</p>
183 <p><strong>The minimal wxPython version is, 4.0.7, and RIDE supports the current version, 4.2.0.</strong></p>
184 <p><em>Linux users are advised to install first wxPython from .whl package at</em> <a class="reference external" href="https://extras.wxpython.org/wxPython4/extras/linux/gtk3/">wxPython.org</a>.</p>
185 <p>The <a class="reference external" href="https://github.com/robotframework/RIDE/blob/master/CHANGELOG.adoc">CHANGELOG.adoc</a> lists the changes done on the different versions.</p>
186 <p>All issues targeted for RIDE v2.0 can be found
187 from the <a class="reference external" href="https://github.com/robotframework/RIDE/issues?q=milestone%3Av2.0">issue tracker milestone</a>.</p>
188 <p>Questions and comments related to the release can be sent to the
189 <a class="reference external" href="http://groups.google.com/group/robotframework-users">robotframework-users</a> mailing list or to the channel #ride on
190 <a class="reference external" href="https://robotframework-slack-invite.herokuapp.com">Robot Framework Slack</a>, and possible bugs submitted to the <a class="reference external" href="https://github.com/robotframework/RIDE/issues">issue tracker</a>.
191 You should see <a class="reference external" href="https://forum.robotframework.org/c/tools/ride/">Robot Framework Forum</a> if your problem is already known.</p>
192 <p>If you have <a class="reference external" href="http://pip-installer.org">pip</a> installed, just run</p>
193 <pre class="literal-block">
194 pip install --pre --upgrade robotframework-ride==2.0b3
195 </pre>
196 <p>to install this <strong>BETA</strong> release, and for the <strong>final</strong> release use</p>
197 <pre class="literal-block">
198 pip install --upgrade robotframework-ride
199 </pre>
200 <pre class="literal-block">
201 pip install robotframework-ride==2.0
202 </pre>
203 <p>to install exactly the <strong>final</strong> version. Alternatively you can download the source
204 distribution from <a class="reference external" href="https://pypi.python.org/pypi/robotframework-ride">PyPI</a> and install it manually. For more details and other
205 installation approaches, see the <a class="reference external" href="https://github.com/robotframework/RIDE/wiki/Installation-Instructions">installation instructions</a>.
206 If you want to help in the development of RIDE, by reporting issues in current development version, you can install with:</p>
207 <pre class="literal-block">
208 pip install -U https://github.com/robotframework/RIDE/archive/master.zip
209 </pre>
210 <p>Important document for helping with development is the <cite>CONTRIBUTING.adoc_</cite>.</p>
211 <p>See the <a class="reference external" href="https://github.com/robotframework/RIDE/wiki/F.A.Q.">FAQ</a> for important info about <cite>: FOR</cite> changes and other known issues and workarounds.</p>
212 <p>A possible way to start RIDE is:</p>
213 <pre class="literal-block">
214 python -m robotide.__init__
215 </pre>
216 <p>You can then go to <cite>Tools&gt;Create RIDE Desktop Shortcut</cite>, or run the shortcut creation script with:</p>
217 <pre class="literal-block">
218 python -m robotide.postinstall -install
219 </pre>
220 <p>RIDE v2.0b3 was released on 15/Jan/2023.</p>
221 </div>
222 """
Used to create menu entries, keyboard shortcuts and/or toolbar buttons.
Definition: actioninfo.py:176
Shows release notes of the current version.
Definition: releasenotes.py:34
def set_content(self, html_win, content)
Definition: releasenotes.py:94
def abspath(path, case_normalize=False)
Replacement for os.path.abspath with some enhancements and bug fixes.
Definition: robotpath.py:87