Skip to content

Commit 9a83c42

Browse files
Initial utest for Project Settings.
1 parent 1087cf8 commit 9a83c42

File tree

73 files changed

+4073
-3578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4073
-3578
lines changed

CHANGELOG.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
88

99
== https://github.com/robotframework/RIDE[Unreleased]
1010

11+
=== Added
12+
- Added Project Settings concept. The Project Settings is a file named ``ride_settings.cfg`` inside a directory named ``.robot`` located in the Test Suite directory. The search for this directory, is done upwards from the Test Suite directory. You can create an empty directory, ``.robot`` located in the Test Suite directory or any parent directory, and RIDE will create and use the ``ride_settings.cfg``. This way you can have different settings, like: colors, UI language, and Plugins settings. The most relevant example is the creation of different Run Profiles or Arguments, in Test Runner. When you open a Test Suite outside one with Project Settings, you will see a dialog to restart RIDE, to use the ``Global Settings``.
13+
1114
=== Fixed
1215
- Fixed crash when renaming test cases names on Tree (Project Explorer), by cancelling with Escape or by adding a Space in the end.
1316
- Fixed missing text colorization in suites and test settings on Grid Editor.

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Likewise, the current version of wxPython, is 4.2.3, but RIDE is known to work w
4444

4545
`pip install -U robotframework-ride`
4646

47-
(3.8 <= python <= 3.14) Install current development version (**2.2dev41**) with:
47+
(3.8 <= python <= 3.14) Install current development version (**2.2dev42**) with:
4848

4949
`pip install -U https://github.com/robotframework/RIDE/archive/develop.zip`
5050

src/robotide/application/CHANGELOG.html

Lines changed: 19 additions & 17 deletions
Large diffs are not rendered by default.

src/robotide/application/releasenotes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ def set_content(self, html_win, content):
175175
</ul>
176176
<p><strong>New Features and Fixes Highlights</strong></p>
177177
<ul class="simple">
178+
<li>Added Project Settings concept. The Project Settings is a file named <b>ride_settings.cfg</b> inside a directory
179+
named <b>.robot</b> located in the Test Suite directory.</li>
178180
<li>Fixed crash when renaming test cases names on Tree (Project Explorer), by cancelling with Escape or by adding a Space
179181
in the end.</li>
180182
<li>Fixed missing text colorization in suites and test settings on Grid Editor.</li>
@@ -243,7 +245,7 @@ def set_content(self, html_win, content):
243245
<pre class="literal-block">python -m robotide.postinstall -install</pre>
244246
<p>or</p>
245247
<pre class="literal-block">ride_postinstall.py -install</pre>
246-
<p>RIDE {VERSION} was released on 17/August/2025.</p>
248+
<p>RIDE {VERSION} was released on 16/September/2025.</p>
247249
<!-- <br/>
248250
<h3>May The Fourth Be With You!</h3>
249251
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>

src/robotide/controller/project.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
from ..spec.xmlreaders import SpecInitializer
2929

3030

31+
PROJECT_SETTINGS_DIR = '.robot'
32+
33+
3134
class Project(_BaseController, WithNamespace):
3235

3336
def __init__(self, namespace=None, settings=None, library_manager=None, tasks=False, file_language=None):
@@ -89,7 +92,7 @@ def update_project_settings(self, path):
8992
self._set_project_settings(local_settings_dir)
9093
else:
9194
old_settings = os.getenv('RIDESETTINGS', '')
92-
if old_settings and '.robot' in old_settings.split(os.path.sep):
95+
if old_settings and PROJECT_SETTINGS_DIR in old_settings.split(os.path.sep):
9396
restore = True
9497
os.environ['RIDESETTINGS'] = ''
9598
self._loader = DataLoader(self._name_space, self.internal_settings)
@@ -103,29 +106,25 @@ def update_project_settings(self, path):
103106
def _locate_local_settings_dir(self, default_dir):
104107
if not default_dir:
105108
return None
106-
settings_path = os.path.abspath(default_dir) if default_dir.endswith('.robot') else\
107-
os.path.abspath(os.path.join(default_dir, '.robot'))
109+
settings_path = os.path.abspath(default_dir) if default_dir.endswith(PROJECT_SETTINGS_DIR) else\
110+
os.path.abspath(os.path.join(default_dir, PROJECT_SETTINGS_DIR))
108111
if os.path.isdir(settings_path):
109112
return settings_path
110-
settings_path = os.path.abspath(default_dir) if not default_dir.endswith('.robot') else \
113+
settings_path = os.path.abspath(default_dir) if not default_dir.endswith(PROJECT_SETTINGS_DIR) else \
111114
os.path.abspath(os.path.split(default_dir)[0])
112-
head, tail = os.path.splitdrive(settings_path)
115+
_, tail = os.path.splitdrive(settings_path)
113116
root = tail.split(os.path.sep)[0] or os.path.sep
114117
# print(f"DEBUG: Project.py Project _locate_local_settings_dir ENTER LOOP"
115118
# f" separator={os.path.sep} head={head} tail={tail} "
116119
# f"root={root} default_dir={default_dir}\n path={settings_path}")
117-
while tail != root:
118-
if os.path.isdir(os.path.join(settings_path, '.robot')):
119-
return os.path.join(settings_path, '.robot')
120+
if tail != root:
121+
if os.path.isdir(os.path.join(settings_path, PROJECT_SETTINGS_DIR)):
122+
return os.path.join(settings_path, PROJECT_SETTINGS_DIR)
120123
else:
121124
settings_path = os.path.abspath(os.path.join(settings_path, '..'))
122-
# head, tail = os.path.splitdrive(settings_path)
123-
# print(
124-
# f"DEBUG: Project.py Project _locate_local_settings_dir CALL RECURSIVE root={root}"
125-
# f" tail={tail} path={settings_path}")
126125
settings_path = self._locate_local_settings_dir(settings_path)
127126
if not settings_path:
128-
break
127+
return None
129128
else:
130129
return settings_path
131130
return None

0 commit comments

Comments
 (0)