Skip to content
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

Workspace comment and title fields changed via python are not persistent when saved and reloaded #11386

Closed
millersd opened this issue Nov 12, 2014 · 4 comments
Labels
Framework Issues and pull requests related to components in the Framework

Comments

@millersd
Copy link

This issue was originally TRAC 10544

Using python, one can view and change the workspace comment and title fields. However upon saving the workspace with changes made to these fields and reloading the workspace, the added comments and title are not present. It appears that the corresponding workspace writers and/or readers for these fields are not present.

Two python script files are attached to illustrate these issues.


Keywords: Student

@millersd millersd added Framework Issues and pull requests related to components in the Framework Easy labels Jun 3, 2015
@mantid-builder
Copy link
Collaborator

@mantid-builder
Copy link
Collaborator

@tgrbrooks
Copy link
Contributor

The save and load functions for MD workspaces are complete but the majority of other types (e.g SaveNexus, LoadNexusProcessed, etc) don't write/read comments and sometimes titles set in python. There doesn't appear to be a common base class as they all save or load files in different ways, so each function will probably need to be changed individually.

@NickDraper
Copy link
Contributor

Tests show that currently the title is preserved, but the comment isn't

ws = Load(Filename="ENGINX00228061.nxs")
print "Original title'%s'" % (ws.getTitle())
print "Original comment'%s'" % (ws.getComment())
SaveNexus(ws,r"d:\data\test.nxs")
wsReloaded = Load(r"d:\data\test.nxs")
print "reloaded title'%s'" % (wsReloaded.getTitle())
print "reloaded comment'%s'" % (wsReloaded.getComment())
#edited
ws.setTitle("CustomTitle")
ws.setComment("CustomComment")
SaveNexus(ws,r"d:\data\test.nxs")
wsEdited = Load(r"d:\data\test.nxs")
print "edited title'%s'" % (wsEdited.getTitle())
print "edited comment'%s'" % (wsEdited.getComment())

ouptut


Original title'yscan;y=250.210'
Original comment''
reloaded title'yscan;y=250.210'
reloaded comment''
edited title'CustomTitle'
edited comment''

Comments are not used often at all, so closing this issue

@NickDraper NickDraper removed this from the Temporary Holding milestone Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework
Projects
None yet
Development

No branches or pull requests

5 participants