Skip to content

Commit

Permalink
Re #10234. Renamed algorithm to "SavePlot1DAsJson"
Browse files Browse the repository at this point in the history
  • Loading branch information
yxqd committed Sep 3, 2015
1 parent d82c5a6 commit 6f33c23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# See ticket #10234

class Save1DPlottableAsJson(PythonAlgorithm):
class SavePlot1DAsJson(PythonAlgorithm):
""" Save 1D plottable data in json format from workspace.
"""
def category(self):
Expand All @@ -17,7 +17,7 @@ def category(self):
def name(self):
"""
"""
return "Save1DPlottableAsJson"
return "SavePlot1DAsJson"

def summary(self):
""" Return summary
Expand Down Expand Up @@ -108,4 +108,4 @@ def _serialize(self, workspace, plotname):


# Register algorithm with Mantid
AlgorithmFactory.subscribe(Save1DPlottableAsJson)
AlgorithmFactory.subscribe(SavePlot1DAsJson)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_save_one_curve(self):
# Execute
out_path = "tempout_curve.json"
alg_test = run_algorithm(
"Save1DPlottableAsJson",
"SavePlot1DAsJson",
InputWorkspace = datawsname,
JsonFilename = out_path)
# executed?
Expand All @@ -45,7 +45,7 @@ def test_save_one_histogram(self):
# Execute
out_path = "tempout_hist.json"
alg_test = run_algorithm(
"Save1DPlottableAsJson",
"SavePlot1DAsJson",
InputWorkspace = datawsname,
JsonFilename = out_path)
# Executed?
Expand All @@ -69,7 +69,7 @@ def test_save_two_curves(self):
# Execute
out_path = "tempout_2curves.json"
alg_test = run_algorithm(
"Save1DPlottableAsJson",
"SavePlot1DAsJson",
InputWorkspace = datawsname,
JsonFilename = out_path)
# executed?
Expand All @@ -96,7 +96,7 @@ def test_save_one_curve_withdesignatedname(self):
# Execute
out_path = "tempout_curve_withname.json"
alg_test = run_algorithm(
"Save1DPlottableAsJson",
"SavePlot1DAsJson",
InputWorkspace = datawsname,
JsonFilename = out_path,
PlotName = "myplot")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Usage
# output path
out_json = "myplot.json"
# run algorithm
Save1DPlottableAsJson(InputWorkspace=dataws, JsonFilename=out_json, PlotName="myplot")
SavePlot1DAsJson(InputWorkspace=dataws, JsonFilename=out_json, PlotName="myplot")


.. categories::
Expand Down

0 comments on commit 6f33c23

Please sign in to comment.