Skip to content

Commit 9b223de

Browse files
Merge pull request #891 from DLR-RM/develop
Update to 2.1.3
2 parents fa5e54a + cc287ac commit 9b223de

17 files changed

+52
-35
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.1.2
2+
current_version = 2.1.3
33

44
[bumpversion:glob:**/pyproject.toml]
55
search = version = "{current_version}" # Handled by bump2version

CHANGELOG.rst

+13
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ Changelog
44
Information about :ref:`RAFCON` changes in each release will be published here. More
55
details can be found in the `GIT commit log <https://github.com/DLR-RM/RAFCON/commits/master>`__.
66

7+
2.1.3
8+
""""""
9+
- Bug fixes:
10+
- Fixed AboutDialog logo image path
11+
- Bringing back state editor guide lines
12+
- Fixed issue that children states can be dragged out of parent states (same for state titles)
13+
- Fixed issue where CTRL+Z in Source Editor or Description would undo twice instead of once
14+
- Fixed cramped Linkage Overview widget (now properly displays the logical linkage)
15+
- Fixes bug when trying to connect a data port outside of the parent state
16+
17+
- Miscellaneous:
18+
- Updated docs text, configuration and layout for webpage
19+
720
2.1.2
821
""""""
922
- Bug fixes:

CITATION.cff

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
cff-version: "1.2.0"
44
message: "If you use this software, please cite it using these metadata."
55
title: RAFCON
6-
version: 2.1.2 # Handled by bump2version
7-
date-released: 2024-03-05
6+
version: 2.1.3 # Handled by bump2version
7+
date-released: 2024-04-19
88
license: EPL-1.0
99
doi: "10.5281/zenodo.1493058"
1010
authors:

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.2
1+
2.1.3

doc/concepts.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Subsequently, the events are forwarded via the ExecutionHistory
236236
to the ConsumerManager. The ConsumerManager distributes the events to different Consumers.
237237
RAFCON ships with a default Consumer called the FileSystemConsumer.
238238
If FILE_SYSTEM_EXECUTION_HISTORY_ENABLE is enabled the FileSystemConsumer will write all history on disk into a shelve file.
239-
The execution_log_viewer.py can then be used to analyze the execution history logs after untime.
239+
The execution_log_viewer.py can then be used to analyze the execution history logs after runtime.
240240

241241
It is straightforward to create other consumers (e.g. for logging the execution-history via a middleware).
242242
Therefore, a plugin can be created that just works similar to the FileSystemConsumer.

doc/configuration.rst

+4-10
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ A typical config file looks like this:
3030
"intermediate_level": "${RAFCON_LIB_PATH}/../examples/functionality_examples"
3131
}
3232
LIBRARY_RECOVERY_MODE: False
33+
3334
LOAD_SM_WITH_CHECKS: True
3435
3536
STORAGE_PATH_WITH_STATE_NAME: True
@@ -42,7 +43,6 @@ A typical config file looks like this:
4243
EXECUTION_LOG_SET_READ_AND_WRITABLE_FOR_ALL: False
4344
4445
SCRIPT_RECOMPILATION_ON_STATE_EXECUTION: True
45-
SCRIPT_COMPILE_ON_FILESYSTEM_LOAD: True
4646
4747
.. _core_config_docs:
4848

@@ -100,13 +100,14 @@ NO\_PROGRAMMATIC\_CHANGE\_OF\_LIBRARY\_STATES\_PERFORMED
100100
| Type: boolean
101101
| Default: ``False``
102102
| Set this to True if you can make sure that the interface of library states is not programmatically changed anywhere inside your state machines. This will speed up loading of libraries.
103+
If you use template state machines that insert states during runtime, this must be disabled.
103104
104-
EXECUTION\_HISTORY\_ENABLE
105+
IN\_MEMORY\_EXECUTION\_HISTORY\_ENABLE
105106
| Type: boolean
106107
| Default: ``True``
107108
| Enables execution history. The execution history is required for backward execution and execution logging to the file system.
108109
109-
EXECUTION\_LOG\_ENABLE
110+
FILE\_SYSTEM\_EXECUTION\_HISTORY\_ENABLE
110111
| Type: boolean
111112
| Default: ``True``
112113
| Enables the logging of rafcon execution histories to the file system. Every time a statemachine is executed, a python shelve is created in the execution log directory, e.g. ``/tmp/rafcon_execution_logs/rafcon_execution_log_99-Bottles-of-Beer_2017-08-31-16-07-17.shelve``. Some helpful utility functions for working with log files through python are in: ``import rafcon.utils.execution_log``. A tiny tiny code snippet which shows how to use the pandas.DataFrame representation to query the outcomes of a state named ‘CheckFinished’ is here: ``https://rmc-github.robotic.dlr.de/common/rafcon/pull/324#issuecomment-2520``
@@ -128,13 +129,6 @@ SCRIPT\_RECOMPILATION\_ON\_STATE\_EXECUTION:
128129
resetting all global variables. For reasons of backwards compatibility, the default value is ``True``. It is
129130
recommended to set the value to ``False``, causing a recompilation only when the execution of a state machine is
130131
newly started, which is a bit faster and allows to share data between consecutive state executions.
131-
132-
SCRIPT\_COMPILE\_ON\_FILESYSTEM\_LOAD:
133-
| Type: boolean
134-
| Default: ``True``
135-
| If True, the script of an ``ExecutionState`` will be recompiled each time the state is loaded from file-system.
136-
For faster loading times the setting can be changed to false.
137-
Then, however, it might be the case that during runtime, script compilation error occur.
138132
139133
GUI Configuration
140134
-----------------

doc/tutorials.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ Similarly, the ``path_to_state_machine`` must point to an already existing state
437437
rafcon_start.pre_setup_plugins()
438438
rafcon_start.setup_environment()
439439
rafcon_start.setup_configuration("/home/user/.config/rafcon/config.yaml")
440-
rafcon_global_config.set_config_value("EXECUTION_LOG_ENABLE", True)
440+
rafcon_global_config.set_config_value("FILE_SYSTEM_EXECUTION_HISTORY_ENABLE", True)
441441
442442
print("Set and load state machine ... ")
443443
path_to_state_machine = '/home/user/rafcon/source/rafcon/share/rafcon/examples/tutorials/99_bottles_of_beer/statemachine.json'

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "rafcon"
3-
version = "2.1.2" # Handled by bump2version
3+
version = "2.1.3" # Handled by bump2version
44
description = "Develop your robotic tasks with hierarchical state machines using an intuitive graphical user interface"
55
keywords = ["state machine", "robotic", "FSM", "development", "GUI", "visual programming"]
66
readme = "README.rst"

source/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies = [
1818
"jsonconversion<1.0.0,>=0.2.13",
1919
]
2020
name = "rafcon-core"
21-
version = "2.1.2" # Handled by bump2version
21+
version = "2.1.3" # Handled by bump2version
2222
description = "Develop your robotic tasks with hierarchical state machines"
2323
keywords = [
2424
"state machine",

source/rafcon/core/state_elements/data_flow.py

+17-11
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,23 @@ def __str__(self):
8181
default_string = "Data flow - from_state: %s, from_key: %s, to_state: %s, to_key: %s, id: %s" % \
8282
(self._from_state, self._from_key, self._to_state, self._to_key, self._data_flow_id)
8383
if self.parent:
84-
from_port = None
85-
if self.from_state == self.parent.state_id:
86-
from_port = self.parent.get_data_port_by_id(self.from_key)
87-
else:
88-
from_port = self.parent.states[self.from_state].get_data_port_by_id(self.from_key)
89-
90-
to_port = None
91-
if self.to_state == self.parent.state_id:
92-
to_port = self.parent.get_data_port_by_id(self.to_key)
93-
else:
94-
to_port = self.parent.states[self.to_state].get_data_port_by_id(self.to_key)
84+
try:
85+
from_port = None
86+
if self.from_state == self.parent.state_id:
87+
from_port = self.parent.get_data_port_by_id(self.from_key)
88+
else:
89+
from_port = self.parent.states[self.from_state].get_data_port_by_id(self.from_key)
90+
except:
91+
pass
92+
93+
try:
94+
to_port = None
95+
if self.to_state == self.parent.state_id:
96+
to_port = self.parent.get_data_port_by_id(self.to_key)
97+
else:
98+
to_port = self.parent.states[self.to_state].get_data_port_by_id(self.to_key)
99+
except:
100+
pass
95101

96102
if from_port and to_port:
97103
return "Data flow - from_state: %s, from_port_key: %s, from_port_name: %s, " \

source/rafcon/core/state_elements/state_element.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def parent(self, parent):
138138
raise RecoveryModeException("{0} invalid within state \"{1}\" (id {2}): {3}".format(
139139
class_name, parent.name, parent.state_id, message), do_delete_item=do_delete_item)
140140
else:
141-
raise ValueError("{0} invalid within state \"{1}\" (id {2}): {3} {4}".format(
141+
raise ValueError("{0} invalid within state \"{1}\" (id {2}): {3} for {4}".format(
142142
class_name, parent.name, parent.state_id, message, self))
143143

144144
@property

source/rafcon/gui/controllers/execution_ticker.py

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from rafcon.gui.controllers.utils.extended_controller import ExtendedController
2020
from rafcon.gui.models.state_machine_execution_engine import StateMachineExecutionEngineModel
2121

22+
# noinspection PyUnresolvedReferences
23+
from rafcon.gui.mygaphas import guide
2224
import rafcon.gui.singleton
2325

2426
from rafcon.utils import log

source/rafcon/gui/controllers/graphical_editor_gaphas.py

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
from rafcon.gui.models.signals import MetaSignalMsg
4444
from rafcon.gui.models.state_machine import StateMachineModel
4545
from rafcon.gui.mygaphas.canvas import MyCanvas
46+
# noinspection PyUnresolvedReferences
47+
from rafcon.gui.mygaphas import guide
4648
from rafcon.gui.mygaphas.items.connection import DataFlowView, TransitionView
4749
from rafcon.gui.mygaphas.items.ports import OutcomeView, DataPortView, ScopedVariablePortView
4850
from rafcon.gui.mygaphas.items.state import StateView, NameView

source/rafcon/gui/controllers/utils/editor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _undo(self, *event, **kwargs):
7878
if react_to_event(self.view, self.view.textview, event) and hasattr(buffer, 'can_undo') and buffer.can_undo():
7979
logger.debug('Run undo on {}'.format(self.__class__.__name__))
8080
return buffer.undo()
81-
return False
81+
return True
8282

8383
def _redo(self, *event, **kwargs):
8484
if not self.view:
@@ -87,7 +87,7 @@ def _redo(self, *event, **kwargs):
8787
if react_to_event(self.view, self.view.textview, event) and hasattr(buffer, 'can_redo') and buffer.can_redo():
8888
logger.debug('Run redo on {}'.format(self.__class__.__name__))
8989
return buffer.redo()
90-
return False
90+
return True
9191

9292
def _apply(self, *event, **kwargs):
9393

source/rafcon/gui/glade/linkage_overview_one.glade

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
</child>
241241
</object>
242242
<packing>
243-
<property name="expand">False</property>
243+
<property name="expand">True</property>
244244
<property name="fill">True</property>
245245
<property name="position">1</property>
246246
</packing>

source/rafcon/share/themes/RAFCON/colors-dark.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
"NAME_RESIZE_HANDLE_BORDER": "#333",
3232
"STATE_MACHINE_ACTIVE": "#39af57",
3333
"STATE_MACHINE_NOT_ACTIVE": "#fefefe",
34-
"GUIDE_COLOR": "#00f"
34+
"GUIDE_COLOR": "#97a2ad"
3535
}

source/rafcon/share/themes/RAFCON/colors.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
"NAME_RESIZE_HANDLE_BORDER": "#333",
3232
"STATE_MACHINE_ACTIVE": "#39af57",
3333
"STATE_MACHINE_NOT_ACTIVE": "#fefefe",
34-
"GUIDE_COLOR": "#00f"
34+
"GUIDE_COLOR": "SELECTED_BG_COLOR"
3535
}

0 commit comments

Comments
 (0)