From f518497b3280f3610555112dce890896d7476e2e Mon Sep 17 00:00:00 2001 From: Jan Lemmer <jan.lemmer@fst.tu-darmstadt.de> Date: Tue, 23 Nov 2021 08:58:49 +0100 Subject: [PATCH] Fix of the CI-Test --- +PlotID/Publish.m | 15 --------------- CI_files/default_test.m | 12 +++++++++++- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/+PlotID/Publish.m b/+PlotID/Publish.m index 2c2f2d5..231c185 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 6acb781..595eea0 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 -- GitLab