Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
# os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']

defaults:
run:
Expand Down
69 changes: 58 additions & 11 deletions condarecipe/larray-editor/larray-editor.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,72 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://schemas.conda.io/menuinst-1-1-3.schema.json",
"menu_name": "LArray",
"menu_items": [
{
"name": "LArray Editor",
"pywscript": "${PYTHON_SCRIPTS}/larray-editor-script.py",
"icon": "${MENU_DIR}/larray.ico"
"name": {
"target_environment_is_base": "LArray Editor",
"target_environment_is_not_base": "LArray Editor ({{ ENV_NAME }})"
},
"description": "LArray Editor",
"activate": false,
"terminal": false,
"command": [
"{{ PYTHONW }}",
"{{ SCRIPTS_DIR }}/larray-editor-script.py",
"%*"
],
"icon": "{{ MENU_DIR }}/larray.ico",
"platforms": {
"win": {
"file_extensions": [
".h5",
".hdf",
".parquet",
".feather",
".ddb",
".duckdb"
]
}
}
},
{
"name": "LArray Documentation",
"webbrowser": "http://larray.readthedocs.io/en/0.35",
"icon": "${MENU_DIR}/larray-help.ico"
"name": {
"target_environment_is_base": "LArray Documentation",
"target_environment_is_not_base": "LArray Documentation ({{ ENV_NAME }})"
},
"description": "LArray Documentation",
"activate": false,
"terminal": false,
"command": [
"{{ BASE_PYTHONW }}",
"-m",
"webbrowser",
"http://larray.readthedocs.io/en/0.35"
],
"icon": "{{ MENU_DIR }}/larray-help.ico",
"platforms": {
"win": {}
}
},
{
"name": "Update LArray",
"system": "${ROOT_PREFIX}/Scripts/conda.exe",
"scriptarguments": [
"name": {
"target_environment_is_base": "Update LArray",
"target_environment_is_not_base": "Update LArray ({{ ENV_NAME }})"
},
"description": "Update LArray",
"activate": false,
"terminal": false,
"command": [
"{{ BASE_PREFIX }}/Scripts/conda.exe",
"update",
"-p",
"${PREFIX}",
"{{ PREFIX }}",
"larrayenv"
]
],
"platforms": {
"win": {}
}
}
]
}
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.35.1
==============

In development.

.. include:: ./changes/version_0_35_1.rst.inc


Version 0.35
============

Expand Down
48 changes: 48 additions & 0 deletions doc/source/changes/version_0_35_1.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.. py:currentmodule:: larray_editor

New features
^^^^^^^^^^^^

* added explicit support for Python 3.14.


Miscellaneous improvements
^^^^^^^^^^^^^^^^^^^^^^^^^^

* Files passed as command-line arguments to the editor are now displayed via
the "File Explorer" mechanism instead of being loaded as a Session
(closes :editor_issue:`303`).
In practice, this means we can support many more file formats (.feather,
.parquet, .dta, .sas7bdat, ...) and it is possible to open files which do not
fit entirely in memory and much faster to open other large files.

On the other hand, we loose the ability to *directly* manipulate the data as
arrays, unless the user loads the file explicitly. Assuming the format is
supported by Session (.h5, larray-formatted .xlsx or directory of .csv), this
can be done either via the File->Open Data menu or via this command in the
console:

Session(name_of_the_variable_with_the_filepath).to_globals()


Fixes
^^^^^

* fixed displaying DataFrames with Pandas >= 3 (closes :editor_issue:`308`).

* fixed some objects not being updated immediately when updated. This includes
updates to Pandas DataFrames done via `df.loc[key] = value` and
`df.iloc[position] = value` (closes :editor_issue:`310`).

* fixed File Explorer on Python 3.9 (closes :editor_issue:`300`).

* fixed displaying "Collection" objects which raise an error on computing
their length and/or iterating them, such as scalar Groups (closes
:editor_issue:`313`).

* avoid warnings when displaying data with any column entirely non-numeric
(including NaN). Closes :editor_issue:`311`.

* fixed the mechanism writing warning/error messages happening during the
editor initialization. The errors are now correctly written in the user
TEMP directory / larray-editor-stderr.log
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.35'
__version__ = '0.35.1-dev'
30 changes: 22 additions & 8 deletions larray_editor/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from inspect import getframeinfo
from pathlib import Path

from qtpy.QtWidgets import QApplication
from qtpy.QtWidgets import QApplication, QMessageBox
import larray as la

from larray_editor.comparator import SessionComparatorWindow, ArrayComparatorWindow
Expand Down Expand Up @@ -277,7 +277,9 @@ def limit_lines(s, max_lines=10):


def qt_display_exception(exception, parent=None):
from qtpy.QtWidgets import QMessageBox
app = QApplication.instance()
if app is None:
app = QApplication(sys.argv)

# TODO: after we drop Python3.9 support, use traceback.format_exception
tb_lines = format_exception(exception)
Expand All @@ -290,7 +292,7 @@ def qt_display_exception(exception, parent=None):
msg = f"<b>Oops, something went wrong</b><p>{exception_str}</p>"
detailed_text = ''.join(tb_lines)

msg_box = QMessageBox(QMessageBox.Critical, title, msg, parent=parent)
msg_box = QMessageBox(QMessageBox.Critical, title, msg)
msg_box.setDetailedText(detailed_text)
msg_box.exec()

Expand All @@ -305,12 +307,24 @@ def _qt_except_hook(type_, value, tback):
# BaseExceptionGroup and GeneratorExit), we only print the exception
# and do *not* exit the program. For BaseExceptionGroup, this might
# not be 100% correct but I have yet to encounter such a case.
display_exception(value)


def display_exception(value):
# TODO: after we drop Python3.9 support, use traceback.print_exception
print_exception(value)
try:
qt_display_exception(value)
except Exception as e2:
err = sys.stderr
err.write('\n')
err.write('-----------------------------------------\n')
err.write('Error displaying the error in a Qt dialog\n')
err.write('-----------------------------------------\n')
err.write('\n')
# TODO: after we drop Python3.9 support, use traceback.print_exception
print_exception(value)
try:
qt_display_exception(value)
except Exception:
pass
print_exception(e2)
err.flush()


def install_except_hook():
Expand Down
Loading
Loading