DataLab-Platform / DataLab

Open-source Platform for Scientific and Technical Data Processing and Visualization
https://datalab-platform.com
BSD 3-Clause "New" or "Revised" License
43 stars 4 forks source link

Macros are not renamed in DataLab after exporting them to Python scripts #82

Closed PierreRaybaut closed 4 months ago

PierreRaybaut commented 4 months ago

Reported by a user directly by email:

In the macro tab, the name "untitled_0" always appears even after saving the macro. I believe this is just a display issue

Regarding macros, the user experience might be a bit confusing, but the behavior you are observing is not a bug. Indeed, when you save your macro in a Python script, you are actually performing an export, not a save. Macros are automatically saved with the DataLab workspace when you save the latter in HDF5 format. They can be renamed, but this renaming is entirely independent of the export process to a Python script. In other words, when you export your macro to a Python script, it is not renamed with the name of the Python file you chose.

However, I agree that this might not be very intuitive, and at the very least, it might be necessary to rename the macro when you export it. That's the purpose of this Issue.