Skip to content

Commit

Permalink
Merge branch 'generate-zip' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentheirendt committed Dec 14, 2017
2 parents 9d8a2f8 + a904f6f commit 1657f6d
Show file tree
Hide file tree
Showing 76 changed files with 131 additions and 161 deletions.
56 changes: 56 additions & 0 deletions .ci/generateZip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/sh

# script called at the end of a build on a -branches platform,
# generates a .zip file of the working directory,
# and puts it to the webserver.

echo "-- Generation of zip of workspace directory -- "
echo " > Architecture: $ARCH"
echo " > MATLAB version: $MATLAB_VER"
echo " > Branch: $GIT_BRANCH"

if [ "$ARCH" = "Linux" ] && [ "$MATLAB_VER" = "R2016b" ] && [ "$GIT_BRANCH" = "origin/master" ]; then

# make a clean local temporary release directory
rm -rf /tmp/releaseCT && mkdir /tmp/releaseCT
echo " > New temporary folder created: /tmp/releaseCT"

# clone from local repository
git clone file:///mnt/prince-data/jenkins/workspace/COBRAToolbox-branches-auto-linux/MATLAB_VER/$MATLAB_VER/label/linux /tmp/releaseCT --depth 1
echo " > Workspace cloned"

# change to the local temporary release directory
cd /tmp/releaseCT

# set the remote URL
git remote set-url origin https://github.com/opencobra/cobratoolbox.git
echo " > Remote set"

# clone submodules
git submodule update --init --remote --depth 1
echo " > Submodules cloned"

# retrieve the SHA1 of the detached head
lastCommit=$(git rev-parse --short HEAD)
echo " > Last commit determined as $lastCommit"

# zip the entire directory
zip -qr /mnt/prince-data/releases/the_COBRA_Toolbox-$lastCommit.zip .
echo " > Workspace zipped"

# move the zip file to /mnt/isilon-dat/releases
scp -P 8022 /mnt/prince-data/releases/the_COBRA_Toolbox-$lastCommit.zip jenkins@prince-server.lcsb.uni.lux:/mnt/isilon-dat/releases
echo " > .zip file sent to prince-server"

# update the symbolic link
ssh -p8022 jenkins@prince-server.lcsb.uni.lux -o TCPKeepAlive=no "cd /mnt/isilon-dat/releases && rm the_COBRA_Toolbox.zip && ln -s the_COBRA_Toolbox-$lastCommit.zip the_COBRA_Toolbox.zip"
echo " > .zip alias set on prince-server"

# remove the local zip file
rm /mnt/prince-data/releases/the_COBRA_Toolbox-$lastCommit.zip

# provide an output message
echo " > Local .zip file removed"
echo "-- Done. The zip file can be downloaded from https://prince.lcsb.uni.lu/releases/the_COBRA_Toolbox-$lastCommit.zip --"

fi
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ EcoliModelSamples_3.mat
EcoliModelSamples_4.mat
modelRedTmp.mat
sampleCbModelTmp.mat
test/verifiedTests/analysis/testEnumerateOptimal/MILPProblem.mat
test/verifiedTests/analysis/testThermo/MILPProblem.mat
test/verifiedTests/design/MILPProblem.mat

# shared libraries
*.so
Expand Down Expand Up @@ -146,3 +149,6 @@ output/
# directory for windows when rmdir fails
test/verifiedTests/base/testIO/m_model_collection
tutorials/additionalTutorials/optKnock/Results/

# .documenter file
docs/.documenter
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ after_success:
export here=`pwd`;
python ~/github_stats.py $here/docs/source/list_contributors.rst;
python -c "from documenter.deploy import Documentation; doc = Documentation('github.com/opencobra/cobratoolbox', local_upstream='$here', ci='jenkins'); doc.deploy()";
bash .ci/generateZip.sh;
fi
fi
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<br>

<p align="center">
<img class="readme_logo" src="docs/source/_static/images/logos/logo.png" height="160px"/>
<img class="readme_logo" src="https://prince.lcsb.uni.lu/img/logos/logo.png" height="160px"/>
</p>

The COBRA Toolbox <br> COnstraint-Based Reconstruction and Analysis Toolbox
Expand Down
10 changes: 5 additions & 5 deletions docs/prepareTutorials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ buildTutorialList(){
}

createLocalVariables(){
tutorial=$1
tutorial=$1
tutorialDir=${tutorial%/*}
tutorialName=${tutorial##*/}
tutorialName="${tutorialName%.*}"
Expand All @@ -61,16 +61,16 @@ createLocalVariables(){
else
tutorialTitle="tutorialNoName"
fi

echo_time " - $tutorialTitle ($tutorialName) $tutorialFolder"

foo="${tutorialName:9}"
tutorialLongTitle="${tutorialName:0:8}${foo^}"
readmePath="$cobraToolBoxPath/tutorials/$tutorialFolder"
htmlPath="$cobraToolBoxPath/docs/source/_static/tutorials"
rstPath="$cobraToolBoxPath/docs/source/tutorials" # should be changed later to mimic structure of the src folder.
pngPath="$pdfPath/tutorials/$tutorialFolder"

pdfHyperlink="https://prince.lcsb.uni.lu/userContent/tutorials/$tutorialFolder/$tutorialName.pdf"
pngHyperlink="https://prince.lcsb.uni.lu/userContent/tutorials/$tutorialFolder/$tutorialName.png"
htmlHyperlink="https://prince.lcsb.uni.lu/cobratoolbox/tutorials/$tutorialFolder/iframe_$tutorialName.html"
Expand Down Expand Up @@ -235,7 +235,7 @@ if [ $buildPNG = true ] || [ $buildMD = true ] || [ $buildRST = true ]; then
if [ $buildMD = true ]; then
mkdir -p $readmePath
echo "<p align=\"center\">" > $readmePath/README.md
echo " <a href=\"$pdfHyperlink\" title=\"Download PDF file\" target=\"_blank\"><img src=\"https://cdn.rawgit.com/opencobra/cobratoolbox/master/docs/source/_static/images/icon_pdf.png\" height=\"90px\"></a>&nbsp;&nbsp;&nbsp;<a href=\"$mlxHyperlink\" title=\"Download Live Script file\" target=\"_blank\"><img src=\"https://cdn.rawgit.com/opencobra/cobratoolbox/master/docs/source/_static/images/icon_mlx.png\" height=\"90px\"></a>&nbsp;&nbsp;&nbsp;<a href=\"$mHyperlink\" title=\"Download MATLAB file\" target=\"_blank\"><img src=\"https://cdn.rawgit.com/opencobra/cobratoolbox/master/docs/source/_static/images/icon_m.png\" height=\"90px\"></a>&nbsp;&nbsp;&nbsp;<a href=\"https://opencobra.github.io/cobratoolbox/latest/tutorials/index.html\" title=\"Tutorials\"><img src=\"https://cdn.rawgit.com/opencobra/cobratoolbox/master/docs/source/_static/images/icon_tut.png\" height=\"90px\"></a>" >> $readmePath/README.md
echo " <a href=\"$pdfHyperlink\" title=\"Download PDF file\" target=\"_blank\"><img src=\"https://prince.lcsb.uni.lu/img/icon_pdf.png\" height=\"90px\"></a>&nbsp;&nbsp;&nbsp;<a href=\"$mlxHyperlink\" title=\"Download Live Script file\" target=\"_blank\"><img src=\"https://prince.lcsb.uni.lu/img/icon_mlx.png\" height=\"90px\"></a>&nbsp;&nbsp;&nbsp;<a href=\"$mHyperlink\" title=\"Download MATLAB file\" target=\"_blank\"><img src=\"https://prince.lcsb.uni.lu/img/icon_m.png\" height=\"90px\"></a>&nbsp;&nbsp;&nbsp;<a href=\"https://opencobra.github.io/cobratoolbox/latest/tutorials/index.html\" title=\"Tutorials\"><img src=\"https://prince.lcsb.uni.lu/img/icon_tut.png\" height=\"90px\"></a>" >> $readmePath/README.md
echo "<br><br>" >> $readmePath/README.md
echo "</p>" >> $readmePath/README.md

Expand Down
Binary file removed docs/source/_static/images/icon1.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon2.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon3.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon4.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon5.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon6.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon7.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_analysis.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_base.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_design.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_di.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_external.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_m.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_mlx.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_pdf.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_reconstruction.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_tut.png
Binary file not shown.
Binary file removed docs/source/_static/images/icon_visualization.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/source/_static/images/logos/doe.png
Binary file not shown.
1 change: 0 additions & 1 deletion docs/source/_static/images/logos/eu.svg

This file was deleted.

Binary file removed docs/source/_static/images/logos/fnr.png
Binary file not shown.
Binary file removed docs/source/_static/images/logos/github.png
Binary file not shown.
Binary file removed docs/source/_static/images/logos/largelcsb.png
Binary file not shown.
Binary file removed docs/source/_static/images/logos/largeul.png
Diff not rendered.
Binary file removed docs/source/_static/images/logos/logo.png
Diff not rendered.
Binary file removed docs/source/_static/images/logos/ncer.png
Diff not rendered.
Binary file removed docs/source/_static/images/logos/sysmedpd.png
Diff not rendered.
10 changes: 5 additions & 5 deletions docs/source/_templates/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ <h1 align="center">The COnstraint-Based Reconstruction <br>and Analysis Toolbox<
<br>
<br>
<div class="alert alert-info" align="center">
View The COBRA Toolbox <strong>source code</strong> on <a href="https://github.com/opencobra/cobratoolbox/"><img src="_static/images/logos/github.png" height="40px"></a>.
View The COBRA Toolbox <strong>source code</strong> on <a href="https://github.com/opencobra/cobratoolbox/"><img src="https://prince.lcsb.uni.lu/img/logos/github.png" height="40px"></a>.
</div>
<br>
<br>
<div class="wrapper">
<ul class="metro">
<li class="small-tile-text color_class1 scale-10">
<a class="tile" href="https://opencobra.github.io/cobratoolbox/latest/installation.html">
<img src="_static/images/icon1.png" height="110px">
<img src="https://prince.lcsb.uni.lu/img/icon1.png" height="110px">
</a>
<div>Installation</div>
</li>
&nbsp;&nbsp;&nbsp;&nbsp;
<li class="small-tile-text color_class2 scale-10">
<a class="tile" href="https://opencobra.github.io/cobratoolbox/latest/tutorials/index.html">
<img src="_static/images/icon2.png" height="110px">
<img src="https://prince.lcsb.uni.lu/img/icon2.png" height="110px">
</a>
<div>Tutorials</div>
</li>
&nbsp;&nbsp;&nbsp;&nbsp;
<li class="small-tile-text color_class3 scale-10">
<a class="tile" href="https://opencobra.github.io/cobratoolbox/latest/contributing.html">
<img src="_static/images/icon3.png" height="110px">
<img src="https://prince.lcsb.uni.lu/img/icon3.png" height="110px">
</a>
<div>Contributing</div>
</li>
&nbsp;&nbsp;&nbsp;&nbsp;
<li class="small-tile-text color_class4 scale-10">
<a class="tile" href="https://opencobra.github.io/cobratoolbox/latest/modules/index.html">
<img src="_static/images/icon4.png" height="110px">
<img src="https://prince.lcsb.uni.lu/img/icon4.png" height="110px">
</a>
<div>Documentation</div>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def linkcode_resolve(domain, info):
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
html_logo = '_static/images/logos/logo.png'
html_logo = 'https://prince.lcsb.uni.lu/img/logos/logo.png'

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand Down
14 changes: 7 additions & 7 deletions docs/source/funding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Funding
<table width="100%" class="noBorder">
<tr class="noBorder">
<td class="noBorderImg" width="30%">
<div style="align-center;"><a href="http://www.sysmedpd.eu"><img src="_static/images/logos/sysmedpd.png" alt="" width="80%"></a></div>
<div style="align-center;"><a href="http://www.sysmedpd.eu"><img src="https://prince.lcsb.uni.lu/img/logos/sysmedpd.png" alt="" width="80%"></a></div>
</td>
<td class="noBorderImg" width="30%">
<div style="align-center;"><a href="http://www.sysmedpd.eu"><img src="_static/images/logos/eu.svg" alt="" width="80%"></a></div>
<div style="align-center;"><a href="http://www.sysmedpd.eu"><img src="https://prince.lcsb.uni.lu/img/logos/eu.svg" alt="" width="80%"></a></div>
</td>
<td class="noBorder" width="40%">
European Union’s Horizon 2020 research and innovation programme under grant agreement No 668738.
Expand All @@ -33,10 +33,10 @@ Funding
<table width="100%" class="noBorder">
<tr class="noBorder">
<td class="noBorderImg" width="30%">
<div style="align-center;"><a href="http://www.ncer-pd.lu/index.php/en/"><img src="_static/images/logos/ncer.png" alt="" width="80%"></a></div>
<div style="align-center;"><a href="http://www.ncer-pd.lu/index.php/en/"><img src="https://prince.lcsb.uni.lu/img/logos/ncer.png" alt="" width="80%"></a></div>
</td>
<td class="noBorderImg" width="30%">
<div style="align-center;"><a href="http://www.ncer-pd.lu/index.php/en/"><img src="_static/images/logos/fnr.png" alt="" width="80%"></a></div>
<div style="align-center;"><a href="http://www.ncer-pd.lu/index.php/en/"><img src="https://prince.lcsb.uni.lu/img/logos/fnr.png" alt="" width="80%"></a></div>
</td>
<td class="noBorder" width="40%">
National Centre of Excellence in Research (NCER) on Parkinson’s disease.
Expand All @@ -47,7 +47,7 @@ Funding
<table width="100%" class="noBorder">
<tr class="noBorder">
<td class="noBorderImg" width="60%">
<div style="align-center;"><a href="https://energy.gov"><img src="_static/images/logos/doe.png" alt="" width="80%"></a></div>
<div style="align-center;"><a href="https://energy.gov"><img src="https://prince.lcsb.uni.lu/img/logos/doe.png" alt="" width="80%"></a></div>
</td>
<td class="noBorder" width="40%">
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
Expand All @@ -67,10 +67,10 @@ Funding
<br><br>
<ul class="featureslogo">
<li>
<div style="align-center;"><a href="http://wwwen.uni.lu/lcsb/"><img src="_static/images/logos/largelcsb.png" alt="" width="100%"></a></div>
<div style="align-center;"><a href="http://wwwen.uni.lu/lcsb/"><img src="https://prince.lcsb.uni.lu/img/logos/largelcsb.png" alt="" width="100%"></a></div>
</li>
<li>
<div style="align-center;"><a href="http://www.uni.lu"><img src="_static/images/logos/largeul.png" alt="" width="100%"></a></div>
<div style="align-center;"><a href="http://www.uni.lu"><img src="https://prince.lcsb.uni.lu/img/logos/largeul.png" alt="" width="100%"></a></div>
</li>
</ul>
</p>
2 changes: 1 addition & 1 deletion docs/source/installation/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ In order to install `git`, install the [Xcode Command Line Tools](http://osxdail
Please download the `git` tools for Windows from [here](https://git-scm.com/download/win). During the installation process, please ensure that you select **Use Git Bash and optional Unix tools from the Windows Command prompt**. In addition, please make sure that you select **Checkout as-is, commit Unix-style line endings**.

<div align="center">
<img src="../_static/images/installation_git_windows_0.png" height="280px">&nbsp;&nbsp;&nbsp;<img src="../_static/images/installation_git_windows_1.png" height="280px">.
<img src="https://prince.lcsb.uni.lu/img/installation_git_windows_0.png" height="280px">&nbsp;&nbsp;&nbsp;<img src="https://prince.lcsb.uni.lu/img/installation_git_windows_1.png" height="280px">.
</div>
8 changes: 4 additions & 4 deletions docs/source/tutorials/template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
<ul class="metro">
<li class="small-tile-text color_class5 scale-10">
<a class="tile" style="width: 90px; height: 90px;" href="#PDFtutorialPath#">
<img src="../_static/images/icon5.png" height="90px">
<img src="https://prince.lcsb.uni.lu/img/icon5.png" height="90px">
</a>
<div>Download PDF</div>
</li>
&nbsp;&nbsp;&nbsp;&nbsp;
<li class="small-tile-text color_class6 scale-10">
<a class="tile" style="width: 90px; height: 90px;" href="#MLXtutorialPath#">
<img src="../_static/images/icon6.png" height="90px">
<img src="https://prince.lcsb.uni.lu/img/icon6.png" height="90px">
</a>
<div>Download live Script</div>
</li>
&nbsp;&nbsp;&nbsp;&nbsp;
<li class="small-tile-text color_class7 scale-10">
<a class="tile" style="width: 90px; height: 90px;" href="#MtutorialPath#">
<img src="../_static/images/icon7.png" height="90px">
<img src="https://prince.lcsb.uni.lu/img/icon7.png" height="90px">
</a>
<div>Download m file</div>
</li>
&nbsp;&nbsp;&nbsp;&nbsp;
<li class="small-tile-text color_class2 scale-10">
<a class="tile" style="width: 90px; height: 90px;" href="https://opencobra.github.io/cobratoolbox/latest/tutorials/index.html">
<img src="../_static/images/icon2.png" height="90px">
<img src="https://prince.lcsb.uni.lu/img/icon2.png" height="90px">
</a>
<div>Tutorials</div>
</li>
Expand Down
18 changes: 9 additions & 9 deletions initCobraToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,6 @@ function initCobraToolbox()
% check if git is installed
checkGit();

% temporary disable ssl verification
[status_setSSLVerify, result_setSSLVerify] = system('git config http.sslVerify false');

if status_setSSLVerify ~= 0
fprintf(strrep(result_setSSLVerify, '\', '\\'));
warning('Your global git configuration could not be changed.');
end

% change to the root of The COBRA Tooolbox
cd(CBTDIR);

Expand Down Expand Up @@ -163,6 +155,14 @@ function initCobraToolbox()
fprintf(' Done.\n');
end

% temporary disable ssl verification
[status_setSSLVerify, result_setSSLVerify] = system('git config http.sslVerify false');

if status_setSSLVerify ~= 0
fprintf(strrep(result_setSSLVerify, '\', '\\'));
warning('Your global git configuration could not be changed.');
end

% check curl
[status_curl, result_curl] = checkCurlAndRemote(false);

Expand All @@ -181,7 +181,7 @@ function initCobraToolbox()
end

% Update/initialize submodules
[status_gitSubmodule, result_gitSubmodule] = system('git submodule update --init');
[status_gitSubmodule, result_gitSubmodule] = system('git submodule update --init --remote --depth 1');

if status_gitSubmodule ~= 0
fprintf(strrep(result_gitSubmodule, '\', '\\'));
Expand Down
Loading

0 comments on commit 1657f6d

Please sign in to comment.