diff --git a/doc/source/changes.rst b/doc/source/changes.rst index 3387b72..dc305a6 100644 --- a/doc/source/changes.rst +++ b/doc/source/changes.rst @@ -1,6 +1,14 @@ Change log ########## +Version 0.34.3 +============== + +In development. + +.. include:: ./changes/version_0_34_3.rst.inc + + Version 0.34.2 ============== diff --git a/doc/source/changes/version_0_34_3.rst.inc b/doc/source/changes/version_0_34_3.rst.inc new file mode 100644 index 0000000..be99fa5 --- /dev/null +++ b/doc/source/changes/version_0_34_3.rst.inc @@ -0,0 +1,8 @@ +.. py:currentmodule:: larray_editor + +Fixes +^^^^^ + +* changes made to arrays in the console using the "points" syntax (for example: `arr.points['a0,a1', 'b0,b1'] = 0`) + and the other special `.something[]` syntaxes were not detected by the viewer and thus not displayed (closes + :editor_issue:`269`). diff --git a/larray_editor/__init__.py b/larray_editor/__init__.py index e23cad5..684e726 100644 --- a/larray_editor/__init__.py +++ b/larray_editor/__init__.py @@ -1,3 +1,3 @@ from larray_editor.api import * # noqa: F403 -__version__ = '0.34.2' +__version__ = '0.34.3-dev' diff --git a/larray_editor/editor.py b/larray_editor/editor.py index ca7f706..857a8a6 100644 --- a/larray_editor/editor.py +++ b/larray_editor/editor.py @@ -75,7 +75,7 @@ REOPEN_LAST_FILE = object() assignment_pattern = re.compile(r'[^\[\]]+[^=]=[^=].+') -setitem_pattern = re.compile(r'(.+)\[.+\][^=]=[^=].+') +setitem_pattern = re.compile(r'(\w+)(\.i|\.iflat|\.points|\.ipoints)?\[.+\][^=]=[^=].+') history_vars_pattern = re.compile(r'_i?\d+') # XXX: add all scalars except strings (from numpy or plain Python)? # (long) strings are not handled correctly so should NOT be in this list @@ -695,9 +695,9 @@ def ipython_cell_executed(self): # 'In' and '_ih' point to the same object (but '_ih' is supposed to be the non-overridden one) cur_input_num = len(user_ns['_ih']) - 1 last_input = user_ns['_ih'][-1] - if setitem_pattern.match(last_input): - m = setitem_pattern.match(last_input) - varname = m.group(1) + setitem_match = setitem_pattern.match(last_input) + if setitem_match: + varname = setitem_match.group(1) # otherwise it should have failed at this point, but let us be sure if varname in clean_ns: if self._display_in_grid(varname, clean_ns[varname]): diff --git a/setup.py b/setup.py index baaec93..58d342e 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ def readlocal(fname): DISTNAME = 'larray-editor' -VERSION = '0.34.2' +VERSION = '0.34.3-dev' AUTHOR = 'Gaetan de Menten, Geert Bryon, Johan Duyck, Alix Damman' AUTHOR_EMAIL = 'gdementen@gmail.com' DESCRIPTION = "Graphical User Interface for LArray library"