Skip to content

Issue269 #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/source/changes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Change log
##########

Version 0.34.3
==============

In development.

.. include:: ./changes/version_0_34_3.rst.inc


Version 0.34.2
==============

Expand Down
8 changes: 8 additions & 0 deletions doc/source/changes/version_0_34_3.rst.inc
Original file line number Diff line number Diff line change
@@ -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`).
2 changes: 1 addition & 1 deletion larray_editor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from larray_editor.api import * # noqa: F403

__version__ = '0.34.2'
__version__ = '0.34.3-dev'
8 changes: 4 additions & 4 deletions larray_editor/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '[email protected]'
DESCRIPTION = "Graphical User Interface for LArray library"
Expand Down
Loading