diff --git a/+PlotID/Publish.m b/+PlotID/Publish.m index 2c2f2d58d8ffa4d4497d175e4d59c8034c5a5f03..231c185ab862f4e32daa5c97a263f1a49a5c1e02 100644 --- a/+PlotID/Publish.m +++ b/+PlotID/Publish.m @@ -187,21 +187,6 @@ dlgObj.userMSG(msg); exportPath = fullfile(storPath,folderName); configObj.writeConfig(exportPath); -% if ~dlgObj.configError -% % copy config file -% configPath = PlotID.createFileCopy('config.json',folderName,... -% storPath,ID, 'data'); -% else -% %create config file -% configPath = fullfile(storPath,folderName,'config.json'); -% config = options; -% end -% %write config -% fid = fopen(char(configPath),'w'); -% txt = jsonencode(config,'PrettyPrint',true); -% fprintf(fid,txt); -% fclose(fid); - % add further Metadata meta =struct(); if ispc diff --git a/CI_files/default_test.m b/CI_files/default_test.m index 6acb781c186427727d9fe41457a7f3ef0aff6416..595eea0c44c5bb8bd9ca9a7f3c24f191b0f43ac4 100644 --- a/CI_files/default_test.m +++ b/CI_files/default_test.m @@ -27,6 +27,13 @@ fid = fopen(fullfile('CI_files','log.txt'),'w'); txt = ['default test started ' newline]; fprintf(fid,txt); +% create Config for CI-Tests +fid1 = fopen(fullfile('CI_files','CI_config.json'),'w'); +configData.Author = 'CI-Test'; configData.ProjectID = 'CI-001'; +txt = jsonencode(configData,'PrettyPrint',true); +%fprintf does not write paths correctly !!! +fwrite(fid1,txt); +fclose(fid1); try ProjectID = 'Test01'; @@ -82,7 +89,9 @@ try % file name of the data rdata = {dataset1,dataset2} ; % don't forget the extension - PlotID.Publish(rdata,script, figs, 'Location', 'CI-Test') + PlotID.Publish(rdata,script, figs, 'Location', 'CI-Test',... + 'ConfigFileName', 'CI_config.json'); + msg = 'simple_test succeed Stage 2'; catch @@ -109,6 +118,7 @@ try delete(['CI_files' filesep '*.mat']); delete(['CI_files' filesep '*.h5']); rmdir(['CI_files' filesep 'export'],'s'); + delete(fullfile('CI_files','CI_config.json')); end end