Skip to content

Commit

Permalink
Build setup (#2888)
Browse files Browse the repository at this point in the history
* Add packaging and change postintall

* Version 2.1b1

* Improve unit tests for Grid, Clipboard

* Update release docs. Change default colors settings.cfg
  • Loading branch information
HelioGuilherme66 authored Sep 22, 2024
1 parent 375cfbf commit 28276ac
Show file tree
Hide file tree
Showing 20 changed files with 576 additions and 517 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ 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]

== https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.1b1.rst[2.1b1] - 2024-09-21

=== Added

Expand Down
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ See the https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride
**Version https://github.com/robotframework/RIDE/tree/release/1.7.4.2[1.7.4.2] was the last release supporting Python 2.7**


**The current development version is based on 2.1a3, supports Python from 3.8 up to 3.12 (29th July 2024).**
**The current development version is based on 2.1b1, supports Python from 3.8 up to 3.12 (21th September 2024).**

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.
Expand All @@ -40,11 +40,11 @@ Likewise, the current version of wxPython, is 4.2.2, but RIDE is known to work w

`pip install -U robotframework-ride`

(3.8 <= python <= 3.12) Install current development version (**2.1dev81**) with:
(3.8 <= python <= 3.12) Install current development version (**2.1b1**) with:

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

(3.8 <= python <= 3.12) Install current Alpha version (2.1a3) with:
(3.8 <= python <= 3.12) Install current Beta version (2.1b1) with:

`pip install -U --pre robotframework-ride`

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Pygments # This enables syntax highlighted in Text Editor
robotframework
Pypubsub
psutil
packaging
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@
from os.path import abspath, join, dirname
from setuptools import setup, find_packages
from setuptools.command.install import install
from typing import Mapping

ROOT_DIR = dirname(abspath(__file__))
SOURCE_DIR = 'src'
REQUIREMENTS = ['PyPubSub',
'Pygments',
'psutil',
'Pywin32; sys_platform=="win32"',
'wxPython']
'wxPython',
'packaging']

PACKAGE_DATA = {
'robotide.preferences': ['settings.cfg'],
Expand Down Expand Up @@ -73,7 +75,8 @@ class CustomInstallCommand(install):
def run(self):
install.run(self)
sys.stdout.write("Creating Desktop Shortcut to RIDE...\n")
post_installer_file = join(ROOT_DIR, SOURCE_DIR, 'robotide', 'postinstall', '__main__.py')
# post_installer_file = join(ROOT_DIR, SOURCE_DIR, 'robotide', 'postinstall', '__main__.py')
post_installer_file = join(ROOT_DIR, SOURCE_DIR, 'bin', 'ride_postinstall.py')
command = sys.executable + " " + post_installer_file + " -install"
os.system(command)

Expand Down Expand Up @@ -106,5 +109,5 @@ def run(self):
# Always install everything, since we may be switching between versions
options={'install': {'force': True}},
scripts=['src/bin/ride.py', 'src/bin/ride_postinstall.py'],
cmdclass={'install': CustomInstallCommand},
cmdclass={'install':CustomInstallCommand},
)
5 changes: 3 additions & 2 deletions src/bin/ride_postinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@


import sys
from robotide.postinstall import __main__ as postinstall
from robotide.postinstall import main

# Must be protected against reimporting
# As multiprocessing has an odd requirement
# and we use multiprocessing
# http://docs.python.org/library/multiprocessing.html#windows
if __name__ == '__main__':
postinstall.caller(None, sys.platform.lower())
main(*sys.argv[1:])
# caller(None, sys.platform.lower())

2 changes: 1 addition & 1 deletion src/robotide/application/CHANGELOG.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Changelog</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /></head><body><div xml:lang="en" class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id1337"></a>Changelog</h2></div></div><hr /></div><p>All notable changes to this project will be documented in this file.</p><p>The format is based on <a class="ulink" href="http://keepachangelog.com/en/1.0.0/" target="_top">Keep a Changelog</a>
and this project adheres to <a class="ulink" href="http://semver.org/spec/v2.0.0.html" target="_top">Semantic Versioning</a>.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_ulink_url_https_github_com_robotframework_ride_unreleased_ulink"></a>1. <a class="ulink" href="https://github.com/robotframework/RIDE" target="_top">Unreleased</a></h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_added"></a>1.1. Added</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
and this project adheres to <a class="ulink" href="http://semver.org/spec/v2.0.0.html" target="_top">Semantic Versioning</a>.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_ulink_url_https_github_com_robotframework_ride_blob_master_doc_releasenotes_ride_2_1b1_rst_2_1b1_ulink_2024_09_21"></a>1. <a class="ulink" href="https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.1b1.rst" target="_top">2.1b1</a> - 2024-09-21</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_added"></a>1.1. Added</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Added color to Test Runner Console Log final output, report and log since RF v7.1rc1.
</li><li class="listitem">
Added Korean language support for UI, experimental.
Expand Down
8 changes: 7 additions & 1 deletion src/robotide/application/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ class Message:
self.frame.Show() # ###### DEBUG DANGER ZONE
self.SetTopWindow(self.frame)
self.frame.aui_mgr.Update()
wx.CallLater(200, ReleaseNotes(self).bring_to_front)
if self._updatecheck:
wx.CallAfter(UpdateNotifierController(self.settings).notify_update_if_needed, UpdateDialog)
self.Bind(wx.EVT_ACTIVATE_APP, self.on_app_activate)
Expand All @@ -151,6 +150,13 @@ class Message:
RideSettingsChanged(keys=('Excludes', 'init'), old=None, new=None).publish()
PUBLISHER.subscribe(self.change_locale, RideSettingsChanged)
RideSettingsChanged(keys=('General', 'ui interface'), old=None, new=None).publish()
wx.CallLater(600, ReleaseNotes(self).bring_to_front)
return True

def OnExit(self):
PUBLISHER.unsubscribe_all()
self.Destroy()
wx.Exit()
return True

@staticmethod
Expand Down
37 changes: 22 additions & 15 deletions src/robotide/application/releasenotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,36 +151,39 @@ def set_content(self, html_win, content):
<p><a class="reference external" href="https://github.com/robotframework/RIDE/">RIDE (Robot Framework IDE)</a>
{VERSION} is a new release with important enhancements and bug fixes. The reference for valid arguments is
<a class="reference external" href="https://robotframework.org/">Robot Framework</a> installed version, which is at this
<a class="reference external" href="https://robotframework.org/">Robot Framework</a> 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.</p>
<p></p>
<ul class="simple">
<li>This version supports Python 3.8 up to 3.12.</li>
<li>There are some changes, or known issues:<ul>
<li>❌ - Removed support for Python 3.6 and 3.7</li>
<li>✔ - Fixed on Text Editor when Saving the selection of tests to run in Test Suites (Tree) is cleared.</li>
<li>✔ - Added Korean language support for UI, experimental.</li>
<li>✔ - Added Korean language support for UI.</li>
<li>✔ - Added <b>caret style</b> to change insert caret to 'block' or 'line' in Text Editor, by editing
<em>settings.cfg</em>. The color of the caret is the same as 'setting' and will be adjusted for better contrast with the
background.</li>
<li>🐞 - When starting RIDE from <b>ride</b> script or executable, when closing RIDE restarts before definite close.</li>
<li>✔ - 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`.</li>
<li>✔ - Added support for Setup in keywords, since Robot Framework version 7.0.</li>
<li>✔ - Added support for new VAR marker, since Robot Framework version 7.0.</li>
<li>✔ - Added to Grid Editor changing Zoom In/Out with <b>Ctrl-Mouse Wheel</b> and setting at Preferences.</li>
<li>✔ - Fixed plugin Run Anything (Macros) not showing output and broken actions.</li>
<li>✔ - Added actions on columns of Grid Editor: Double-Click or Right Mouse Click, allows to edit the column name for Data
<li>✔ - 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.</li>
<li>✔ - Added command line option, <b>--settingspath</b>, to select a different configuration.</li>
<li>✔ - Added different settings file, according the actual Python executable, if not the original installed.</li>
<li>✔ - Added a selector for Tasks and Language to the New Project dialog.</li>
<li>✔ - 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.</li>
<li>✔ - Added support for language configured test suites, with languages from installed Robot Framework version 6.1, or
<li>✔ - Added support for language configured test suites, with languages from installed Robot Framework version 6.1,
or
higher.</li>
<li>✔ - On Text Editor, pressing <b>Ctrl</b> when the caret/cursor is near a Keyword will show a detachable window with the
<li>✔ - On Text Editor, pressing <b>Ctrl</b> when the caret/cursor is near a Keyword will show a detachable window with
the
documentation, at Mouse Pointer position.</li>
<li>✔ - RIDE tray icon now shows a context menu with options Show, Hide and Close.</li>
<li>✔ - Highlighting and navigation of selected Project Explorer items, in Text Editor.</li>
Expand Down Expand Up @@ -215,7 +218,8 @@ def set_content(self, html_win, content):
<li>Added support for new VAR marker, since Robot Framework version 7.0.</li>
<li>Added configurable style of the tabs in notebook pages, Edit, Text, Run, etc. Parameter <b>notebook theme</b>
takes values from 0 to 5. See wxPython, demo for agw.aui for details.</li>
<li>Added UI localization and support for Japanese configured test suites, valid for Robot Framework version 7.0.1 or higher.</li>
<li>Added UI localization and support for Japanese configured test suites, valid for Robot Framework version 7.0.1 or
higher.</li>
<li>Fixed keywords Find Usages in Grid Editor not finding certain values when using Gherkin.</li>
<li>Improved selection of items from Tree in Text Editor. Now finds more items and selects whole line.</li>
<li>Changed output in plugin Run Anything (Macros) to allow Zoom In/Out, and Copy content.</li>
Expand All @@ -227,9 +231,11 @@ def set_content(self, html_win, content):
<li>Added different settings file, according the actual Python executable, if not the original installed.</li>
<li>Fixed headers and blank spacing in Templated tests.</li>
<li>Added context option <b>Open Containing Folder</b> to test suites directories in Project Explorer.</li>
<li>Added a setting for a specific file manager by editing the settings.cfg file. Add the string parameter <b>file manager</b>
<li>Added a setting for a specific file manager by editing the settings.cfg file. Add the string parameter
<b>file manager</b>
in the section <b>[General]</b></li>
<li>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.</li>
<li>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.</li>
<li>Fixed removal of continuation marker in steps</li>
<li>Fixed wrong continuation of long chains of keywords in Setups, Teardowns or Documentation.</li>
<li>Added a selector for Tasks and Language to the New Project dialog. Still some problems: Tasks type changes to Tests,
Expand Down Expand Up @@ -279,8 +285,9 @@ def set_content(self, html_win, content):
ARROW_RIGHT</li>
<li>Improve Text Editor auto-suggestions by using: selected text, text at left or at right of cursor</li>
</ul>
<p>We hope to implement or complete features and make fixes on next major version 2.1 (in end of Summer of 2024).</p>
<p><strong>The minimal wxPython version is, 4.0.7, and RIDE supports the current version, 4.2.1.</strong></p>
<p>We hope to implement or complete features and make fixes on next major version 2.1 (in mid Autumm of 2024).</p>
<p><strong>The minimal wxPython version is, 4.0.7, and RIDE supports the current version, 4.2.2, which we recommend.
</strong></p>
<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>, or by using the system package
manager.</p>
Expand Down Expand Up @@ -325,10 +332,10 @@ def set_content(self, html_win, content):
python -m robotide.__init__
</pre>
<p>You can then go to <cite>Tools&gt;Create RIDE Desktop Shortcut</cite>, or run the shortcut creation script with:</p>
<pre class="literal-block">
python -m robotide.postinstall -install
</pre>
<p>RIDE {VERSION} was released on 20/September/2024.</p>
<pre class="literal-block">python -m robotide.postinstall -install</pre>
<p>or</p>
<pre class="literal-block">ride_postinstall.py -install</pre>
<p>RIDE {VERSION} was released on 22/September/2024.</p>
<!-- <br/>
<h3>May The Fourth Be With You!</h3>
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>
Expand Down
2 changes: 1 addition & 1 deletion src/robotide/application/updatenotifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from .. import version
from ..utils.versioncomparator import cmp_versions, parse_version
from ..widgets import ButtonWithHandler, HtmlWindow, RIDEDialog
from ..postinstall.__main__ import MessageDialog
from ..postinstall import MessageDialog

_ = wx.GetTranslation # To keep linter/code analyser happy
builtins.__dict__['_'] = wx.GetTranslation
Expand Down
12 changes: 9 additions & 3 deletions src/robotide/editor/gridbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ def __init__(self, parent, num_rows, num_cols, popup_creator=None):
self.GetGridRowLabelWindow().SetBackgroundColour(Colour(self.color_secondary_background))
self.GetGridRowLabelWindow().SetForegroundColour(Colour(self.color_secondary_foreground))
self._popup_creator = popup_creator or PopupCreator()
parent.SetupScrolling()
if hasattr(parent, 'SetupScrolling'):
parent.SetupScrolling()
elif hasattr(self, 'SetupScrolling'):
self.SetupScrolling()
else:
print("DEBUG: GridBase init NO SetupScrolling\n")

def _bind_to_events(self):
self.Bind(grid.EVT_GRID_SELECT_CELL, self.on_select_cell)
Expand Down Expand Up @@ -115,9 +120,10 @@ def select(self, row, column):
self.MakeCellVisible(row, column)

def copy(self):
# print("DEBUG: GridBase copy() called\n")
print("DEBUG: GridBase copy() called\n")
self._clipboard_handler.clear()
self._clipboard_handler.clipboard_content()
data = self._clipboard_handler.clipboard_content()
print(f"DEBUG: GridBase copy() clipboard_content =={data}\n")
self._clipboard_handler.copy()

def cut(self):
Expand Down
3 changes: 2 additions & 1 deletion src/robotide/localization/TRANSLATORS.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
= Translators
ifdef::env-github[:outfilesuffix: .adoc]

- https://github.com/HelioGuilherme66[Hélio Guilherme]: Portuguese, Brazilian Portuguese
- https://github.com/JFoederer[J. Foederer]: Dutch
- Minerva Järvensivu: Finnish
- https://github.com/HelioGuilherme66[Hélio Guilherme]: Portuguese, Brazilian Portuguese
- Hyeonho Kang: Korean
- Unknown: Pirates
Loading

0 comments on commit 28276ac

Please sign in to comment.