From 08c66756ec35d175a20d7862520886283175e73d Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Mon, 11 Mar 2019 09:55:34 +0100 Subject: [PATCH 01/31] change of env vars --- .artenolis/runtests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.artenolis/runtests.sh b/.artenolis/runtests.sh index a401247..e5f61b8 100644 --- a/.artenolis/runtests.sh +++ b/.artenolis/runtests.sh @@ -1,5 +1,5 @@ #!/bin/sh cd ./test -/mnt/prince-data/MATLAB/$MATLAB_VER/bin/./matlab -nodesktop -nosplash -r "launchTests;" < inputCI.txt; +$ARTENOLIS_SOFT_PATH/MATLAB/$MATLAB_VER/bin/./matlab -nodesktop -nosplash -r "launchTests;" < inputCI.txt; CODE=$? exit $CODE From 05ed9a12ced63c5b46ae4f76a5cf44c3a0e93865 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Mon, 11 Mar 2019 09:55:46 +0100 Subject: [PATCH 02/31] change of url --- .artenolis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.artenolis.yml b/.artenolis.yml index 8f51993..028fc87 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -22,7 +22,7 @@ script: # before launching the tests, make sure that the upstream repository is changed - cd; - rm -rf ~/MATLAB.devTools.CI; - - git clone git@github.com:uni-lu/MATLAB.devTools.CI.git; + - git clone git@github.com:LCSB-BioCore/MATLAB.devTools.CI.git; - cd MATLAB.devTools.CI; - git remote -v; - eval "$(ssh-agent -s)"; From af735d82701da3a3f042970752f166ebf5974280 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Tue, 12 Mar 2019 11:54:35 +0100 Subject: [PATCH 03/31] change of mechanism for code coverage badge --- test/launchTests.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/launchTests.m b/test/launchTests.m index d3e059a..ed1462b 100644 --- a/test/launchTests.m +++ b/test/launchTests.m @@ -70,11 +70,10 @@ end % set the new badge - system(['cp /mnt/prince-data/jenkins/userContent/codegrade-', grade, '.svg /mnt/prince-data/jenkins/userContent/codegrade-MATLABdevTools.svg']); - - % secure copy the badge from the slave - system('scp -P 8022 /mnt/prince-data/jenkins/userContent/codegrade-MATLABdevTools.svg jenkins@prince-server.lcsb.uni.lux:/var/lib/jenkins/userContent'); - + if ~isempty(strfind(getenv('HOME'), 'jenkins')) + coverageBadgePath = [getenv('ARTENOLIS_DATA_PATH') filesep 'MATLAB.devTools' filesep 'codegrade' filesep]; + system(['cp ' coverageBadgePath 'codegrade-', grade, '.svg ' coverageBadgePath 'codegrade.svg']); + end end try From b24cd56d92684b62ace9c41a60abead3d248886a Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Tue, 12 Mar 2019 11:54:52 +0100 Subject: [PATCH 04/31] change of repo url --- test/testCheckSystem.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testCheckSystem.m b/test/testCheckSystem.m index 29517b5..0e4123b 100644 --- a/test/testCheckSystem.m +++ b/test/testCheckSystem.m @@ -3,7 +3,7 @@ % define the configuration of the MATLAB.devTools launcher = '\n\n ~~~ MATLAB.devTools ~~~\n\n'; -remoteRepoURL = 'https://github.com/uni-lu/MATLAB.devTools.CI.git'; +remoteRepoURL = 'https://github.com/LCSB-Biocore/MATLAB.devTools.CI.git'; nickName = 'MATLAB.devTools.CI'; printLevel = 1; From 8b6d70cc0d2af37208e9ebefd1d42cac1ee0d731 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Tue, 12 Mar 2019 12:54:49 +0100 Subject: [PATCH 05/31] change of urls for doc requirements --- docs/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 175c844..1eb68b0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ -git+https://github.com/uni-lu/sphinx.git@develop#egg=sphinx +git+https://github.com/LCSB-BioCore/sphinx.git@develop#egg=sphinx git+https://github.com/syarra/sphinxcontrib-matlabdomain#egg=sphinxcontrib-matlabdomain sphinx_rtd_theme -git+https://github.com/uni-lu/sphinx_julia_theme.git@develop#egg=sphinx_julia_theme +git+https://github.com/LCSB-BioCore/sphinx_julia_theme.git@develop#egg=sphinx_julia_theme git+https://github.com/syarra/Documenter.py@develop#egg=documenter -git+https://github.com/uni-lu/sphinxcontrib-napoleon.git@develop#egg=sphinxcontrib_napoleon +git+https://github.com/LCSB-BioCore/sphinxcontrib-napoleon.git@develop#egg=sphinxcontrib_napoleon From c18448afd157e9826baa38a61a522dec05e43014 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Tue, 12 Mar 2019 12:55:10 +0100 Subject: [PATCH 06/31] change of url of submodule --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index f5bb9ed..170b920 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "external/rdir"] path = external/rdir - url = https://github.com/uni-lu/rdir.git + url = https://github.com/LCSB-BioCore/rdir.git From f6221d7a9a45df9bc7930f6f8432c528d8a21653 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Tue, 12 Mar 2019 12:55:32 +0100 Subject: [PATCH 07/31] change of local locations of temporary repos --- .artenolis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.artenolis.yml b/.artenolis.yml index 028fc87..bd5949a 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -7,7 +7,7 @@ before_install: - CURRENT_DIR=`pwd`; # remove the cloned repository even after failure - - rm -rf ~/MATLAB.devTools.CI; + - rm -rf $ARTENOLIS_DATA_PATH/repos/MATLAB.devTools.CI; # change to the current directory - cd $CURRENT_DIR; @@ -21,7 +21,7 @@ script: # before launching the tests, make sure that the upstream repository is changed - cd; - - rm -rf ~/MATLAB.devTools.CI; + - rm -rf $ARTENOLIS_DATA_PATH/repos/MATLAB.devTools.CI; - git clone git@github.com:LCSB-BioCore/MATLAB.devTools.CI.git; - cd MATLAB.devTools.CI; - git remote -v; @@ -50,15 +50,15 @@ script: # launch the tests - sh ./.artenolis/runtests.sh; - - cd ~/fork-MATLAB.devTools.CI; + - cd $ARTENOLIS_DATA_PATH/repos/fork-MATLAB.devTools.CI; - git reset --hard origin/develop; after_success: # remove the cloned fork-repo - - if [ "$MATLAB_VER" == "R2016b" ]; then + - if [ "$MATLAB_VER" == "R2017b" ]; then bash <(curl -s https://codecov.io/bash) -f "!*.lst"; - export PATH="/home/sbg-jenkins/.local/bin":$PATH; + export PATH="/home/jenkins/.local/bin":$PATH; cd $CURRENT_DIR; pip install --upgrade --user -r docs/requirements.txt; python -c "from documenter.deploy import Documentation; doc = Documentation('github.com/opencobra/MATLAB.devTools', ci='jenkins'); doc.deploy()"; From bf64e8bf6ec8142298ac122ed0c2b92d1e558c28 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Tue, 12 Mar 2019 12:58:49 +0100 Subject: [PATCH 08/31] change of local clone location --- test/inputCI.txt | 4 ++-- test/testCheckSystem.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/inputCI.txt b/test/inputCI.txt index 33f354e..738bee0 100644 --- a/test/inputCI.txt +++ b/test/inputCI.txt @@ -1,5 +1,5 @@ -cobrabot -/home/sbg-jenkins/ +artenobot +/mnt/artenolis-data/repos/ y n testFile1 diff --git a/test/testCheckSystem.m b/test/testCheckSystem.m index 0e4123b..c67df06 100644 --- a/test/testCheckSystem.m +++ b/test/testCheckSystem.m @@ -18,7 +18,7 @@ checkSystem(); % initialize the devTools -initDevTools(); % <-- input 1: cobrabot, input 2: ~/ +initDevTools(); % <-- input 1: artenobot, input 2: ~/ % check the devTools checkDevTools() From bb6c9cf5353eef9bca762d00e1e84c895faa8de0 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Tue, 12 Mar 2019 14:30:06 +0100 Subject: [PATCH 09/31] change of test sequence --- .artenolis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.artenolis.yml b/.artenolis.yml index bd5949a..5f81b3a 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -20,7 +20,6 @@ script: - cd $CURRENT_DIR; # before launching the tests, make sure that the upstream repository is changed - - cd; - rm -rf $ARTENOLIS_DATA_PATH/repos/MATLAB.devTools.CI; - git clone git@github.com:LCSB-BioCore/MATLAB.devTools.CI.git; - cd MATLAB.devTools.CI; From 84201d4dec941957f60a540f9f9de16449f04a52 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Wed, 13 Mar 2019 06:09:52 +0100 Subject: [PATCH 10/31] changes to comments for input --- test/testCheckSystem.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testCheckSystem.m b/test/testCheckSystem.m index c67df06..a430b09 100644 --- a/test/testCheckSystem.m +++ b/test/testCheckSystem.m @@ -18,7 +18,7 @@ checkSystem(); % initialize the devTools -initDevTools(); % <-- input 1: artenobot, input 2: ~/ +initDevTools(); % <-- input 1: artenobot, input 2: /path/specified/ % check the devTools checkDevTools() From b0b5689b869873308ace93a29f915db72d4923fa Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Wed, 13 Mar 2019 06:10:09 +0100 Subject: [PATCH 11/31] remove path --- .artenolis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.artenolis.yml b/.artenolis.yml index 5f81b3a..59da411 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -57,7 +57,6 @@ after_success: # remove the cloned fork-repo - if [ "$MATLAB_VER" == "R2017b" ]; then bash <(curl -s https://codecov.io/bash) -f "!*.lst"; - export PATH="/home/jenkins/.local/bin":$PATH; cd $CURRENT_DIR; pip install --upgrade --user -r docs/requirements.txt; python -c "from documenter.deploy import Documentation; doc = Documentation('github.com/opencobra/MATLAB.devTools', ci='jenkins'); doc.deploy()"; From 480cc8400312e229f32e844b4bd05b8141796067 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Wed, 13 Mar 2019 06:11:07 +0100 Subject: [PATCH 12/31] change matlab version --- .artenolis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.artenolis.yml b/.artenolis.yml index 59da411..ed6a8c9 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -55,7 +55,7 @@ script: after_success: # remove the cloned fork-repo - - if [ "$MATLAB_VER" == "R2017b" ]; then + - if [ "$MATLAB_VER" == "R2016b" ]; then bash <(curl -s https://codecov.io/bash) -f "!*.lst"; cd $CURRENT_DIR; pip install --upgrade --user -r docs/requirements.txt; From 2328044def6de900cda03572447a5762e9789004 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Wed, 13 Mar 2019 10:26:32 +0100 Subject: [PATCH 13/31] change of matlab version for doc deployment --- .artenolis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.artenolis.yml b/.artenolis.yml index ed6a8c9..d222536 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -55,7 +55,7 @@ script: after_success: # remove the cloned fork-repo - - if [ "$MATLAB_VER" == "R2016b" ]; then + - if [ "$MATLAB_VER" == "R2018b" ]; then bash <(curl -s https://codecov.io/bash) -f "!*.lst"; cd $CURRENT_DIR; pip install --upgrade --user -r docs/requirements.txt; From 66e6d6cb34ba8c07835e1e0326f514e1c35f14e7 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Wed, 13 Mar 2019 14:53:51 +0100 Subject: [PATCH 14/31] Revert "remove path" This reverts commit b0b5689b869873308ace93a29f915db72d4923fa. --- .artenolis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.artenolis.yml b/.artenolis.yml index d222536..b8cfdb6 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -57,6 +57,7 @@ after_success: # remove the cloned fork-repo - if [ "$MATLAB_VER" == "R2018b" ]; then bash <(curl -s https://codecov.io/bash) -f "!*.lst"; + export PATH="/home/jenkins/.local/bin":$PATH; cd $CURRENT_DIR; pip install --upgrade --user -r docs/requirements.txt; python -c "from documenter.deploy import Documentation; doc = Documentation('github.com/opencobra/MATLAB.devTools', ci='jenkins'); doc.deploy()"; From 32d7ecc3b51e6b7569706cd0dd055436605d21a7 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Thu, 14 Mar 2019 14:13:41 +0100 Subject: [PATCH 15/31] change of root folder for doc --- .artenolis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.artenolis.yml b/.artenolis.yml index b8cfdb6..7ac6cd8 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -20,6 +20,7 @@ script: - cd $CURRENT_DIR; # before launching the tests, make sure that the upstream repository is changed + - cd $ARTENOLIS_DATA_PATH/repos; - rm -rf $ARTENOLIS_DATA_PATH/repos/MATLAB.devTools.CI; - git clone git@github.com:LCSB-BioCore/MATLAB.devTools.CI.git; - cd MATLAB.devTools.CI; From c23aaff324dbcd30be8735e76fbc2070eed698df Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Thu, 14 Mar 2019 16:26:08 +0100 Subject: [PATCH 16/31] debugging --- .artenolis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.artenolis.yml b/.artenolis.yml index 7ac6cd8..7619c93 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -7,7 +7,7 @@ before_install: - CURRENT_DIR=`pwd`; # remove the cloned repository even after failure - - rm -rf $ARTENOLIS_DATA_PATH/repos/MATLAB.devTools.CI; + - rm -rf ~/MATLAB.devTools.CI; # change to the current directory - cd $CURRENT_DIR; @@ -20,8 +20,8 @@ script: - cd $CURRENT_DIR; # before launching the tests, make sure that the upstream repository is changed - - cd $ARTENOLIS_DATA_PATH/repos; - - rm -rf $ARTENOLIS_DATA_PATH/repos/MATLAB.devTools.CI; + - cd; + - rm -rf ~/MATLAB.devTools.CI; - git clone git@github.com:LCSB-BioCore/MATLAB.devTools.CI.git; - cd MATLAB.devTools.CI; - git remote -v; @@ -50,7 +50,7 @@ script: # launch the tests - sh ./.artenolis/runtests.sh; - - cd $ARTENOLIS_DATA_PATH/repos/fork-MATLAB.devTools.CI; + - cd ~/fork-MATLAB.devTools.CI; - git reset --hard origin/develop; after_success: From 9c5f982b46b4fb500678f85eead1a1e936000154 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Thu, 14 Mar 2019 16:52:04 +0100 Subject: [PATCH 17/31] change of location of fork --- test/inputCI.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/inputCI.txt b/test/inputCI.txt index 738bee0..b8d03e4 100644 --- a/test/inputCI.txt +++ b/test/inputCI.txt @@ -1,5 +1,5 @@ artenobot -/mnt/artenolis-data/repos/ +/home/jenkins/ y n testFile1 From d477adaa027a35bd6dbe037f3a07c826be77174e Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 15 Mar 2019 10:37:45 +0100 Subject: [PATCH 18/31] setting paths for forks --- .artenolis.yml | 8 ++++---- test/inputCI.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.artenolis.yml b/.artenolis.yml index 7619c93..6427aaf 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -7,7 +7,7 @@ before_install: - CURRENT_DIR=`pwd`; # remove the cloned repository even after failure - - rm -rf ~/MATLAB.devTools.CI; + - rm -rf $ARTENOLIS_DATA_PATH/repos/MATLAB.devTools.CI; # change to the current directory - cd $CURRENT_DIR; @@ -20,8 +20,8 @@ script: - cd $CURRENT_DIR; # before launching the tests, make sure that the upstream repository is changed - - cd; - - rm -rf ~/MATLAB.devTools.CI; + - cd $ARTENOLIS_DATA_PATH/repos/; + - rm -rf MATLAB.devTools.CI; - git clone git@github.com:LCSB-BioCore/MATLAB.devTools.CI.git; - cd MATLAB.devTools.CI; - git remote -v; @@ -50,7 +50,7 @@ script: # launch the tests - sh ./.artenolis/runtests.sh; - - cd ~/fork-MATLAB.devTools.CI; + - cd $ARTENOLIS_DATA_PATH/repos/fork-MATLAB.devTools.CI; - git reset --hard origin/develop; after_success: diff --git a/test/inputCI.txt b/test/inputCI.txt index b8d03e4..738bee0 100644 --- a/test/inputCI.txt +++ b/test/inputCI.txt @@ -1,5 +1,5 @@ artenobot -/home/jenkins/ +/mnt/artenolis-data/repos/ y n testFile1 From 3225a8e6ece670df705ea4bcfb64e3335c3959c5 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 15 Mar 2019 10:53:15 +0100 Subject: [PATCH 19/31] adding documenter enc file in gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1ee3278..2c0dfe6 100644 --- a/.gitignore +++ b/.gitignore @@ -36,5 +36,7 @@ Temporary Items [Dd]esktop.ini # Documentation related files +docs/.documenter.enc +docs/.documenter docs/source/_static/json/functions.json *.pyc From 5be75862a174b8723810d20bda2e0520e4d5bf14 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 15 Mar 2019 11:04:41 +0100 Subject: [PATCH 20/31] change url of dependency for testing --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1eb68b0..5f79dc9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,5 +2,5 @@ git+https://github.com/LCSB-BioCore/sphinx.git@develop#egg=sphinx git+https://github.com/syarra/sphinxcontrib-matlabdomain#egg=sphinxcontrib-matlabdomain sphinx_rtd_theme git+https://github.com/LCSB-BioCore/sphinx_julia_theme.git@develop#egg=sphinx_julia_theme -git+https://github.com/syarra/Documenter.py@develop#egg=documenter +git+https://github.com/laurentheirendt/Documenter.py@testing#egg=documenter git+https://github.com/LCSB-BioCore/sphinxcontrib-napoleon.git@develop#egg=sphinxcontrib_napoleon From ec17c466f6b0118a9dc6ce1042401273081793f5 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 15 Mar 2019 16:10:39 +0100 Subject: [PATCH 21/31] change of req --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 5f79dc9..f1ba850 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,5 +2,5 @@ git+https://github.com/LCSB-BioCore/sphinx.git@develop#egg=sphinx git+https://github.com/syarra/sphinxcontrib-matlabdomain#egg=sphinxcontrib-matlabdomain sphinx_rtd_theme git+https://github.com/LCSB-BioCore/sphinx_julia_theme.git@develop#egg=sphinx_julia_theme -git+https://github.com/laurentheirendt/Documenter.py@testing#egg=documenter +git+https://github.com/syarra/Documenter.py@master#egg=documenter git+https://github.com/LCSB-BioCore/sphinxcontrib-napoleon.git@develop#egg=sphinxcontrib_napoleon From 3755cbe66b8ac12afd00e53f8f6c4389172abe13 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Wed, 27 Mar 2019 07:55:00 +0100 Subject: [PATCH 22/31] fix for coverage --- test/launchTests.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/launchTests.m b/test/launchTests.m index ed1462b..33adb86 100644 --- a/test/launchTests.m +++ b/test/launchTests.m @@ -1,7 +1,7 @@ if ~isempty(strfind(getenv('HOME'), 'jenkins')) % do not change the paths below - addpath(genpath('/home/sbg-jenkins/MOcov')); - addpath(genpath('/home/sbg-jenkins/jsonlab')); + addpath(genpath(getenv('MOCOV_PATH'))) + addpath(genpath(getenv('JSONLAB_PATH'))) % change the directory on the CI server cd([pwd, '/../']) From d1d42cd091c32eaf9ea8cf162c88c1fb3f874a5d Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 09:57:15 +0100 Subject: [PATCH 23/31] introduce coverage boolean --- test/launchTests.m | 68 ++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/test/launchTests.m b/test/launchTests.m index 33adb86..5e28ede 100644 --- a/test/launchTests.m +++ b/test/launchTests.m @@ -1,10 +1,14 @@ -if ~isempty(strfind(getenv('HOME'), 'jenkins')) - % do not change the paths below +if ~isempty(getenv('MOCOV_PATH')) && ~isempty(getenv('JSONLAB_PATH')) addpath(genpath(getenv('MOCOV_PATH'))) addpath(genpath(getenv('JSONLAB_PATH'))) + COVERAGE = true; % change the directory on the CI server - cd([pwd, '/../']) + cd([pwd filesep '..' filesep]) + + fprintf('MoCov and JsonLab are on path, coverage will be computed.\n') +else + COVERAGE = false; end % include the root folder and all subfolders @@ -80,41 +84,45 @@ % run the tests in the subfolder recursively result = runtests('./test', 'Recursively', true); - % write coverage based on profile('info') - mocov('-cover','./src',... - '-profile_info',... - '-cover_json_file','coverage.json',... - '-cover_method', 'profile'); + if COVERAGE + % write coverage based on profile('info') + fprintf(['Running MoCov ... Current directory: ' pwd '\n']); - sumFailed = 0; - sumIncomplete = 0; + mocov('-cover','./src',... + '-profile_info',... + '-cover_json_file','coverage.json',... + '-cover_method', 'profile'); - for i = 1:size(result,2) - sumFailed = sumFailed + result(i).Failed; - sumIncomplete = sumIncomplete + result(i).Incomplete; - end + sumFailed = 0; + sumIncomplete = 0; + + for i = 1:size(result,2) + sumFailed = sumFailed + result(i).Failed; + sumIncomplete = sumIncomplete + result(i).Incomplete; + end - % load the coverage file - data = loadjson('coverage.json', 'SimplifyCell', 1); + % load the coverage file + data = loadjson('coverage.json', 'SimplifyCell', 1); - sf = data.source_files; - clFiles = zeros(length(sf), 1); - tlFiles = zeros(length(sf), 1); + sf = data.source_files; + clFiles = zeros(length(sf), 1); + tlFiles = zeros(length(sf), 1); - for i = 1:length(sf) - clFiles(i) = nnz(sf(i).coverage); - tlFiles(i) = length(sf(i).coverage); - end + for i = 1:length(sf) + clFiles(i) = nnz(sf(i).coverage); + tlFiles(i) = length(sf(i).coverage); + end - % average the values for each file - cl = sum(clFiles); - tl = sum(tlFiles); + % average the values for each file + cl = sum(clFiles); + tl = sum(tlFiles); - % print out a summary table - table(result) + % print out a summary table + table(result) - % print out the coverage as requested by gitlab - fprintf('Covered Lines: %i, Total Lines: %i, Coverage: %f%%.\n', cl, tl, cl/tl * 100); + % print out the coverage as requested by gitlab + fprintf('Covered Lines: %i, Total Lines: %i, Coverage: %f%%.\n', cl, tl, cl/tl * 100); + end if sumFailed > 0 || sumIncomplete > 0 exit_code = 1; From aecf1633634489a6a7135924dfba76dbe5b9fe92 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 10:30:29 +0100 Subject: [PATCH 24/31] change commands to reset hard --- .artenolis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.artenolis.yml b/.artenolis.yml index 6427aaf..764f38f 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -50,9 +50,6 @@ script: # launch the tests - sh ./.artenolis/runtests.sh; - - cd $ARTENOLIS_DATA_PATH/repos/fork-MATLAB.devTools.CI; - - git reset --hard origin/develop; - after_success: # remove the cloned fork-repo @@ -63,3 +60,5 @@ after_success: pip install --upgrade --user -r docs/requirements.txt; python -c "from documenter.deploy import Documentation; doc = Documentation('github.com/opencobra/MATLAB.devTools', ci='jenkins'); doc.deploy()"; fi + - cd $ARTENOLIS_DATA_PATH/repos/fork-MATLAB.devTools.CI; + - git reset --hard origin/develop; From 8c33d8b302274b59a5e99d05800dcbeb6fc5da7a Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 11:17:53 +0100 Subject: [PATCH 25/31] add after script to yml --- .artenolis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.artenolis.yml b/.artenolis.yml index 764f38f..b206ade 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -60,5 +60,8 @@ after_success: pip install --upgrade --user -r docs/requirements.txt; python -c "from documenter.deploy import Documentation; doc = Documentation('github.com/opencobra/MATLAB.devTools', ci='jenkins'); doc.deploy()"; fi + +after_script: + - cd $ARTENOLIS_DATA_PATH/repos/fork-MATLAB.devTools.CI; - git reset --hard origin/develop; From 3893b1e5fc483af7d1df0f32ed57c3a8eca1c0e8 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 11:30:22 +0100 Subject: [PATCH 26/31] change condition for deployment --- .artenolis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.artenolis.yml b/.artenolis.yml index b206ade..70c66f1 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -53,7 +53,7 @@ script: after_success: # remove the cloned fork-repo - - if [ "$MATLAB_VER" == "R2018b" ]; then + - if [[ "$MATLAB_VER" == "R2018b" && "$JENKINS_PULL_REQUEST" != "True" ]]; then bash <(curl -s https://codecov.io/bash) -f "!*.lst"; export PATH="/home/jenkins/.local/bin":$PATH; cd $CURRENT_DIR; From 6151fbfe116fe2c49664209c333c043ddcd4f1d8 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 11:35:41 +0100 Subject: [PATCH 27/31] fix for conditions in yml --- .artenolis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.artenolis.yml b/.artenolis.yml index 70c66f1..b1c8f69 100644 --- a/.artenolis.yml +++ b/.artenolis.yml @@ -52,9 +52,13 @@ script: after_success: - # remove the cloned fork-repo - - if [[ "$MATLAB_VER" == "R2018b" && "$JENKINS_PULL_REQUEST" != "True" ]]; then + # submit coverage report + - if [[ "$MATLAB_VER" == "R2018b" && "$ARCH" == "Linux" ]]; then bash <(curl -s https://codecov.io/bash) -f "!*.lst"; + fi + + # deploy the documentation + - if [[ "$MATLAB_VER" == "R2018b" && "$JENKINS_PULL_REQUEST" != "True" ]]; then export PATH="/home/jenkins/.local/bin":$PATH; cd $CURRENT_DIR; pip install --upgrade --user -r docs/requirements.txt; @@ -63,5 +67,6 @@ after_success: after_script: + # reset the fork - cd $ARTENOLIS_DATA_PATH/repos/fork-MATLAB.devTools.CI; - git reset --hard origin/develop; From 434a8c3949e89d539dda01c058dc18464a070d8f Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 13:57:39 +0100 Subject: [PATCH 28/31] change of urls for images --- README.rst | 16 +++++++-------- docs/source/cite.rst | 20 +++++++++---------- docs/source/contr_cobratoolbox.rst | 2 +- docs/source/funding.rst | 10 +++++----- docs/source/index.rst | 2 +- docs/source/prerequisites.rst | 4 ++-- .../source/troubleshooting/cobratutorials.rst | 10 +++++----- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.rst b/README.rst index fc16ebe..92d1a69 100644 --- a/README.rst +++ b/README.rst @@ -219,7 +219,7 @@ paper of The COBRA Toolbox shall we cited when referring to the ``MATLAB.devTool :target: https://prince.lcsb.uni.lu/jenkins/job/devTools-branches-auto/MATLAB_VER=R2015b/ .. |codecov| image:: https://codecov.io/gh/opencobra/MATLAB.devTools/branch/master/graph/badge.svg :target: https://codecov.io/gh/opencobra/MATLAB.devTools/branch/master -.. |Code grade| image:: https://prince.lcsb.uni.lu/jenkins/userContent/codegrade-MATLABdevTools.svg?maxAge=0 +.. |Code grade| image:: https://prince.lcsb.uni.lu/MATLAB.devTools/img/codegrade-MATLABdevTools.svg?maxAge=0 .. begin-screencast-marker @@ -233,30 +233,30 @@ paper of The COBRA Toolbox shall we cited when referring to the ``MATLAB.devTool .. begin-icon-marker .. |macos| raw:: html - macOS + macOS .. |linux| raw:: html - linux + linux .. |windows| raw:: html - windows + windows .. |matlab| raw:: html - matlab + matlab .. |important| raw:: html - bulb + bulb .. |warning| raw:: html - warning + warning .. |bulb| raw:: html - bulb + bulb .. end-icon-marker diff --git a/docs/source/cite.rst b/docs/source/cite.rst index a8af629..c7f5a92 100644 --- a/docs/source/cite.rst +++ b/docs/source/cite.rst @@ -3,47 +3,47 @@ How to cite .. include:: ../../README.rst :start-after: begin-how-to-cite-marker - :end-before: end-how-to-cite-marker + :end-before: end-how-to-cite-marker .. |macos| raw:: html - macOS + macOS .. |linux| raw:: html - linux + linux .. |windows| raw:: html - windows + windows .. |warning| raw:: html - warning + warning .. |matlab| raw:: html - matlab + matlab .. |tada| raw:: html - tada + tada .. |thumbsup| raw:: html - thumbsup + thumbsup .. |bulb| raw:: html - bulb + bulb .. |tutorials| raw:: html @@ -54,7 +54,7 @@ How to cite .. |latest| raw:: html - + .. |forum| raw:: html diff --git a/docs/source/contr_cobratoolbox.rst b/docs/source/contr_cobratoolbox.rst index 4614310..cba2794 100644 --- a/docs/source/contr_cobratoolbox.rst +++ b/docs/source/contr_cobratoolbox.rst @@ -204,7 +204,7 @@ directory `fork-cobratoolbox`. You can do so by typing: If there are changes listed, publish them by selecting procedure ``[3]`` of the contribute menu. -.. |branchModel| image:: https://prince.lcsb.uni.lu/img/figure6.png +.. |branchModel| image:: https://prince.lcsb.uni.lu/MATLAB.devTools/img/figure6.png .. include:: ../../README.rst :start-after: begin-icon-marker diff --git a/docs/source/funding.rst b/docs/source/funding.rst index 3449415..5f6362a 100644 --- a/docs/source/funding.rst +++ b/docs/source/funding.rst @@ -19,10 +19,10 @@ Funding
-
+
-
+
National Centre of Excellence in Research (NCER) on Parkinson’s disease. @@ -33,7 +33,7 @@ Funding
-
+
U.S. Department of Energy, Offices of Advanced Scientific Computing Research and the Biological and Environmental Research as part of the Scientific Discovery Through Advanced Computing program, grant no. DE-SC0010429 @@ -49,10 +49,10 @@ Funding

diff --git a/docs/source/index.rst b/docs/source/index.rst index 11386cb..a73255d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,7 +18,7 @@ MATLAB.devTools - Contribute the smart way
- View MATLAB.devTools source code on . + View MATLAB.devTools source code on .
.. include:: ../../README.rst diff --git a/docs/source/prerequisites.rst b/docs/source/prerequisites.rst index cd32dbb..b95930e 100644 --- a/docs/source/prerequisites.rst +++ b/docs/source/prerequisites.rst @@ -122,10 +122,10 @@ shell). On **Windows**, start ``GUI Bash``. Then type Please replace ``"yourGitHubUsername"`` and ``"first.last@server.com"`` with your respective credentials. -.. |windows0| image:: https://prince.lcsb.uni.lu/img/installation_git_windows_0.png +.. |windows0| image:: https://prince.lcsb.uni.lu/MATLAB.devTools/img/installation_git_windows_0.png :width: 280px -.. |windows1| image:: https://prince.lcsb.uni.lu/img/installation_git_windows_1.png +.. |windows1| image:: https://prince.lcsb.uni.lu/MATLAB.devTools/img/installation_git_windows_1.png :width: 280px .. include:: ../../README.rst diff --git a/docs/source/troubleshooting/cobratutorials.rst b/docs/source/troubleshooting/cobratutorials.rst index 5228e45..04aa986 100644 --- a/docs/source/troubleshooting/cobratutorials.rst +++ b/docs/source/troubleshooting/cobratutorials.rst @@ -3,7 +3,7 @@ COBRA.tutorials .. |warning| raw:: html - warning + warning |warning| This section is tailored to users who feel comfortable using the terminal (or shell). It is recommended for other users @@ -18,25 +18,25 @@ Fork and checkout your branch 1. Fork the `COBRA.tutorials repository `__ on Github. 2. Clone the forked repository to ``fork-COBRA.tutorials`` located in a directory of your choice: - + .. code-block:: console $ git clone git@github.com:/COBRA.tutorials.git fork-COBRA.tutorials.git 3. Change to the directory ``fork-COBRA.tutorials``: - + .. code-block:: console $ cd fork-COBRA.tutorials.git/ 4. Set the upstream to the ``opencobra/COBRA.tutorials`` repository: - + .. code-block:: console $ git remote add upstream git@github.com:opencobra/COBRA.tutorials.git 5. Fetch from the upstream repository - + .. code-block:: console $ git fetch upstream From d33556344ec4433c8e6a2184faa0406f91cbe9f8 Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 14:07:46 +0100 Subject: [PATCH 29/31] update of badge icon version --- README.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 92d1a69..874391b 100644 --- a/README.rst +++ b/README.rst @@ -9,9 +9,9 @@ +----------------+----------------+---------------+--------------+ -| MATLAB R2016b | MATLAB R2015b | Code Coverage | Code Grade | +| MATLAB R2018b | MATLAB R2017b | Code Coverage | Code Grade | +================+================+===============+==============+ -| |Build Status| | |Build Status| | |codecov| | |Code grade| | +| |bs2018| | |bs2017| | |codecov| | |Code grade| | +----------------+----------------+---------------+--------------+ .. begin-description-marker @@ -213,10 +213,10 @@ paper of The COBRA Toolbox shall we cited when referring to the ``MATLAB.devTool .. end-how-to-cite-marker -.. |Build Status| image:: https://prince.lcsb.uni.lu/jenkins/buildStatus/icon?job=devTools-branches-auto/MATLAB_VER=R2016b - :target: https://prince.lcsb.uni.lu/jenkins/job/devTools-branches-auto/MATLAB_VER=R2016b/ -.. |Build Status| image:: https://prince.lcsb.uni.lu/jenkins/buildStatus/icon?job=devTools-branches-auto/MATLAB_VER=R2015b - :target: https://prince.lcsb.uni.lu/jenkins/job/devTools-branches-auto/MATLAB_VER=R2015b/ +.. |bs2018| image:: https://prince.lcsb.uni.lu/jenkins/job/devTools-branches-auto/MATLAB_VER=R2018b,label=prince-slave-linux-01/badge/icon + :target: https://prince.lcsb.uni.lu/jenkins/job/devTools-branches-auto/MATLAB_VER=R2018b,label=prince-slave-linux-01 +.. |bs2017| image:: https://prince.lcsb.uni.lu/jenkins/job/devTools-branches-auto/MATLAB_VER=R2017b,label=prince-slave-linux-01/badge/icon + :target: https://prince.lcsb.uni.lu/jenkins/job/devTools-branches-auto/MATLAB_VER=R2017b,label=prince-slave-linux-01 .. |codecov| image:: https://codecov.io/gh/opencobra/MATLAB.devTools/branch/master/graph/badge.svg :target: https://codecov.io/gh/opencobra/MATLAB.devTools/branch/master .. |Code grade| image:: https://prince.lcsb.uni.lu/MATLAB.devTools/img/codegrade-MATLABdevTools.svg?maxAge=0 From 158e9398ca17d036879d9c257fbea39a1ad802fd Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 14:12:15 +0100 Subject: [PATCH 30/31] change of url for codegrade badge --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 874391b..105d55a 100644 --- a/README.rst +++ b/README.rst @@ -219,7 +219,7 @@ paper of The COBRA Toolbox shall we cited when referring to the ``MATLAB.devTool :target: https://prince.lcsb.uni.lu/jenkins/job/devTools-branches-auto/MATLAB_VER=R2017b,label=prince-slave-linux-01 .. |codecov| image:: https://codecov.io/gh/opencobra/MATLAB.devTools/branch/master/graph/badge.svg :target: https://codecov.io/gh/opencobra/MATLAB.devTools/branch/master -.. |Code grade| image:: https://prince.lcsb.uni.lu/MATLAB.devTools/img/codegrade-MATLABdevTools.svg?maxAge=0 +.. |Code grade| image:: https://prince.lcsb.uni.lu/MATLAB.devTools/codegrade/codegrade.svg?maxAge=0 .. begin-screencast-marker From 39d0cf662c40b7e957ab7ecf78e369e95458036a Mon Sep 17 00:00:00 2001 From: laurentheirendt Date: Fri, 29 Mar 2019 14:14:38 +0100 Subject: [PATCH 31/31] update of citation --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 105d55a..58fed45 100644 --- a/README.rst +++ b/README.rst @@ -207,8 +207,8 @@ paper of The COBRA Toolbox shall we cited when referring to the ``MATLAB.devTool A. Saunders, Costas D. Maranas, Nathan E. Lewis, Thomas Sauter, Bernhard Ø. Palsson, Ines Thiele, Ronan M.T. Fleming, **Creation and analysis of biochemical constraint-based models: the COBRA Toolbox - v3.0** (submitted), 2017, - `arXiv:1710.04038 `__. + v3.0**, Nature Protocols, volume 14, pages 639–702, 2019 + `doi.org/10.1038/s41596-018-0098-2 `__. .. end-how-to-cite-marker