Skip to content

Commit

Permalink
Fix for update and init scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentheirendt committed Apr 25, 2017
1 parent bac7038 commit af3d647
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/SOLVERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Platform-specific instructions are marked with
````
<img src="https://prince.lcsb.uni.lu/jenkins/userContent/windows.png" height="20px" alt="Windows"> Run `moseksetupwin64x86.msi` and select `Typical` installation. This will install `mosek` in `C:\Program Files\Mosek`.
<img src="https://prince.lcsb.uni.lu/jenkins/userContent/apple.png" height="20px" alt="Linux"> Browse to `/Applications` and double-click the archive to uncompress.
:warning: It is important to run the script `python /Applications/mosek/<ver>/tools/platform/osx64x86/bin/install.py`, which makes important updates to the installation.
5) <img src="https://prince.lcsb.uni.lu/jenkins/userContent/apple.png" height="20px" alt="macOS"> <img src="https://prince.lcsb.uni.lu/jenkins/userContent/linux.png" height="20px" alt="Linux"> Configure the `PATH` and `MOSEKLM_LICENSE_FILE` environment variables in `~/.bashrc` by editing your `bashrc` file
````bash
Expand Down
13 changes: 8 additions & 5 deletions initCobraToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function initCobraToolbox()
% add the folders of The COBRA Toolbox
onPath = ~isempty(strfind(lower(path), lower(CBTDIR)));

folders = {'external', 'tutorials', 'papers', 'binary', 'deprecated', 'src', 'test'};
folders = {'tutorials', 'papers', 'binary', 'deprecated', 'src', 'test'};

if ~onPath
if ENV_VARS.printLevel
Expand All @@ -167,14 +167,17 @@ function initCobraToolbox()
% add the root folder
addpath(CBTDIR);

% add the external folder first
addpath(genpath([CBTDIR, filesep, 'external']));

% remove the SBML Toolbox
rmpath(genpath([CBTDIR, filesep, 'external', filesep, 'SBMLToolbox']));

% add specific subfolders
for k = 1:length(folders)
addpath(genpath([CBTDIR, filesep, folders{k}]));
end

% remove the SBML Toolbox
rmpath(genpath([CBTDIR, filesep, 'external', filesep, 'SBMLToolbox']));

% print a success message
if ENV_VARS.printLevel
fprintf(' Done.\n');
Expand Down Expand Up @@ -251,7 +254,7 @@ function initCobraToolbox()
SOLVERS.glpk.type = {'LP', 'MILP'};
SOLVERS.gurobi.type = {'LP', 'MILP', 'QP', 'MIQP'};
SOLVERS.ibm_cplex.type = {'LP', 'MILP', 'QP', 'MIQP'};
SOLVERS.matlab.type = {'NLP'};
SOLVERS.matlab.type = {'LP', 'NLP'};
SOLVERS.mosek.type = {'LP', 'QP', 'MILP'};
SOLVERS.pdco.type = {'LP', 'QP', 'NLP'};
SOLVERS.quadMinos.type = {'LP', 'NLP'};
Expand Down
4 changes: 2 additions & 2 deletions updateCobraToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ function updateCobraToolbox(fetchAndCheckOnly)
end

% determine the number of commits that the local master branch is behind
[status_gitCountMaster, result_gitCountMaster] = system('git rev-list --count origin/master...HEAD');
[status_gitCountMaster, result_gitCountMaster] = system('git rev-list --no-merges --count origin/master...HEAD');
result_gitCountMaster = char(result_gitCountMaster);
result_gitCountMaster = result_gitCountMaster(1:end-1);

[status_gitCountDevelop, result_gitCountDevelop] = system('git rev-list --count origin/develop...HEAD');
[status_gitCountDevelop, result_gitCountDevelop] = system('git rev-list --no-merges --count origin/develop...HEAD');
result_gitCountDevelop = char(result_gitCountDevelop);
result_gitCountDevelop = result_gitCountDevelop(1:end-1);

Expand Down

0 comments on commit af3d647

Please sign in to comment.