Skip to content

Commit a17739a

Browse files
committed
Update default behavior for clearing workspace and enhance help text for HDF5 loading settings
1 parent d1aa72d commit a17739a

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

datalab/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def initialize():
413413
Conf.console.external_editor_path.get("code")
414414
Conf.console.external_editor_args.get("-g {path}:{line_number}")
415415
# IO section
416-
Conf.io.h5_clear_workspace.get(False)
416+
Conf.io.h5_clear_workspace.get(True) # Default to avoid objects UUID reset
417417
Conf.io.h5_clear_workspace_ask.get(True)
418418
Conf.io.h5_fullpath_in_title.get(False)
419419
Conf.io.h5_fname_in_title.get(True)

datalab/gui/settings.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,17 @@ class IOSettings(gds.DataSet):
105105
"""DataLab I/O settings"""
106106

107107
g0 = gds.BeginGroup(_("Settings for I/O operations"))
108-
h5_clear_workspace = gds.BoolItem("", _("Clear workspace before loading HDF5 file"))
108+
h5_clear_workspace = gds.BoolItem(
109+
"",
110+
_("Clear workspace before loading HDF5 file"),
111+
help=_(
112+
"If enabled, the current workspace will be cleared before loading a "
113+
"new HDF5 file.\n"
114+
"If disabled, imported objects' processing history will "
115+
"be lost (features like 'Show source' and 'Recompute' will not work) "
116+
"because object identifiers will be regenerated to avoid conflicts."
117+
),
118+
)
109119
h5_clear_workspace_ask = gds.BoolItem("", _("Ask before clearing workspace"))
110120
h5_fullpath_in_title = gds.BoolItem(
111121
"",

datalab/locale/fr/LC_MESSAGES/datalab.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: datalab\n"
88
"Report-Msgid-Bugs-To: p.raybaut@codra.fr\n"
9-
"POT-Creation-Date: 2025-11-12 16:07+0100\n"
9+
"POT-Creation-Date: 2025-11-12 18:35+0100\n"
1010
"PO-Revision-Date: 2025-05-22 15:46+0200\n"
1111
"Last-Translator: Christophe Debonnel <c.debonnel@codra.fr>\n"
1212
"Language: fr\n"
@@ -2225,6 +2225,14 @@ msgstr "Réglages des opérations d'entrée/sortie"
22252225
msgid "Clear workspace before loading HDF5 file"
22262226
msgstr "Effacer l'espace de travail avant de charger un fichier HDF5"
22272227

2228+
#, python-format
2229+
msgid ""
2230+
"If enabled, the current workspace will be cleared before loading a new HDF5 file.\n"
2231+
"If disabled, imported objects' processing history will be lost (features like 'Show source' and 'Recompute' will not work) because object identifiers will be regenerated to avoid conflicts."
2232+
msgstr ""
2233+
"Si activé, l'espace de travail actuel sera effacé avant de charger un nouveau fichier HDF5.\n"
2234+
"Si désactivé, l'historique de traitement des objets importés sera perdu (des fonctionnalités telles que 'Afficher la source' et 'Recalculer' ne fonctionneront pas) car les identifiants d'objet seront régénérés pour éviter les conflits."
2235+
22282236
msgid "Ask before clearing workspace"
22292237
msgstr "Demander avant d'effacer l'espace de travail"
22302238

0 commit comments

Comments
 (0)