Ticket #8729 (closed: fixed)
[ICAT] Publish algorithm should not create python file
Reported by: | Jay Rainey | Owned by: | Jay Rainey |
---|---|---|---|
Priority: | trivial | Milestone: | Release 3.1 |
Component: | Framework | Keywords: | ICAT4,publish |
Cc: | Blocked By: | ||
Blocking: | Tester: | Arturs Bekasovs |
Description
Currently, the publishing algorithm creates a .py history file, even though it does not use it. (It uses the property of that file to obtain the history as a string, and uses that for publishing). This should be removed.
Change History
comment:2 Changed 7 years ago by Jay Rainey
Note
- You can only publish data to investigations of which you are an investigator on.
- You can only test this ticket if you have results in "my data". (E.g. you are an investigator in investigations.)
To test
Change Facilities.xml
You will need to change the soapendpoint and externaldownload in Facilities.xml to:
soapendpoint -> "https://icatdev.isis.cclrc.ac.uk/ICATService/ICAT" externaldownload -> "https://isisoxfordvmsrv.isis.cclrc.ac.uk/ids/"
Publishing a file (with a valid name)
- Select a datafile and load it into Mantid.
- Log into the catalog.
- Select "Publish" and select the workspace you previously loaded.
- Provide a name for the file (E.g. example1234.nxs)
- Press "Run". The file will now be uploaded to the archives. The workspace will first be converted to a nexus file and saved to your default directory. A .py file containing the workspace history must NOT be saved.
- Select an investigation where you want to publish the file to.
- Click "Search" in the catalog menu and enter the name of your file into the "Datafile name" field. The investigation you saved this file to will appear. Double click it.
- You should now see your uploaded file AND the .py file.
In other words, the change made will prevent the file being saved to your drive as it's never used for uploading. (The ScriptText property that is returned from the method contains the workspace history and is the one used for publishing!)
comment:3 Changed 7 years ago by Jay Rainey
- Status changed from inprogress to verify
- Resolution set to fixed
comment:4 Changed 7 years ago by Jay Rainey
- Summary changed from [ICAT] Publish algorithm creates py file to [ICAT] Publish algorithm should not create python file
comment:5 Changed 7 years ago by Arturs Bekasovs
- Status changed from verify to verifying
- Tester set to Arturs Bekasovs
comment:6 Changed 7 years ago by Arturs Bekasovs
Mentioned .py file is not being created in default save directory anymore. At the same time, the "history script" is being uploaded correctly to the archive together with the data file.
Code changes are pretty straightforward and sensible, not to mention numerous. :-)
comment:7 Changed 7 years ago by Arturs Bekasovs
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/8729_icat_publish_rm_ws_hist_file'
Full changeset: 6187488fdafc4431c7cf8e1218ae58c32167d40c
Do not save the workspace history to a file. Refs #8729.
Changeset: 1f544b57855cc8c5b1f4a7890a088adfdeb5f21f