Skip to content
Snippets Groups Projects

remove Server option (now part of config file)

Merged Lemmer, Jan requested to merge 93-rework-options-storage into development
4 files
+ 18
38
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 8
10
@@ -10,13 +10,13 @@ function Publish(DataPaths,scriptPath, figure, options)
% Location sets the storage location. 'local' sets the storage location
% to the current folder (an export folder will be created), 'manual' opens
% a explorer window, where you can choose the folder. If you define a export
% path in the config file, this will used per default.
% path in the config file, this will used per defaul (exportPath).
% remote path, that is defined in the config file.
% Two Methods are implemented 'individual' stores the data for
% each plot while 'centralized' uses a data folder and uses reference links
% to the original data (hdf5 only).
% 'ParentFolder' is the folder Name where the exported data is stored if an
% path is used, PlotId will use this path a storagePath
% path is used, PlotId will use this path as storagePath
% 'ConfigFileName' is needed for handling multiple config files (see example)
% 'CSV' turns a summary table of all exports on or off
%
@@ -29,7 +29,7 @@ arguments
DataPaths {mustBeDataPath} % location of the data-file(s)
scriptPath (1,:) {mustBeText} % location of the matlab script
figure (1,:) {mustBeFigure} % Checks if figure is a figure object
options.Location {mustBeMember(options.Location ,{'local','server','manual','CI-Test'})} = 'local' % storage path
options.Location {mustBeMember(options.Location ,{'local','exportPath','manual','CI-Test'})} = 'local' % storage path
options.Method {mustBeMember(options.Method ,{'individual','centralized'})} = 'individual'
options.ParentFolder (1,:) {mustBeText} = 'PlotID_export' % name of the ParentFolder
options.ConfigFileName (1,:) {mustBeText} = 'config.json' %individual config names possible
@@ -69,6 +69,11 @@ end
% find scriptpath
if ~isfile(scriptPath)
scriptPath= which(['/',scriptPath]);
if ~isfile(scriptPath)
msg = ['Script path: ',scriptPath, ' not found on matlab path', newline, ...
'- check spelling or us a path'];
error(msg);
end
end
% catch missing .m extension
@@ -123,13 +128,6 @@ switch options.Location
'does not exist, check the config file - publishing not possible!'];
dlgObj.error(msg);
end
case 'server' %legacy
if dlgObj.configError
msg = ['Error while reading the config file' newline,...
' publishing on server not possible'];
dlgObj.error(msg);
end
storPath = configObj.configData.ServerPath;
case 'manual' %UI
storPath = uigetdir();
case 'CI-Test' %only for CI tests
Loading