Skip to content

Commit

Permalink
Merge pull request #1456 from opencobra/develop
Browse files Browse the repository at this point in the history
Regular merge of develop
  • Loading branch information
artenobot authored Apr 2, 2019
2 parents f3fe20d + a02a346 commit 2ed83d1
Show file tree
Hide file tree
Showing 89 changed files with 1,777 additions and 740 deletions.
14 changes: 7 additions & 7 deletions .artenolis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ after_success:

# deploy documentation
- if [[ "$MATLAB_VER" == "R2017b" && "$ARCH" == "Linux" && "$JENKINS_PULL_REQUEST" != "True" ]]; then
export PATH="/home/sbg-jenkins/.local/bin":$PATH;
export PATH="/home/jenkins/.local/bin":$PATH;
pip install --upgrade --user -r docs/requirements.txt;
python ~/github_stats.py $(pwd)/docs/source/list_contributors.rst;
python $ARTENOLIS_SCRIPTS_PATH/src/github_stats.py $(pwd)/docs/source/list_contributors.rst;
export GIT_LOCAL_BRANCH=${GIT_BRANCH##origin/};
echo $GIT_LOCAL_BRANCH;
ssh -t sbg-jenkins@10.184.148.14 'GIT_LOCAL_BRANCH='"'$GIT_LOCAL_BRANCH'"' && echo $GIT_LOCAL_BRANCH && cd ~/tmp/COBRA.tutorials && git stash && git checkout $GIT_LOCAL_BRANCH && git pull origin $GIT_LOCAL_BRANCH';
ssh -t sbg-jenkins@10.184.148.14 'GIT_LOCAL_BRANCH='"'$GIT_LOCAL_BRANCH'"' && echo $GIT_LOCAL_BRANCH && cd ~/tmp/cobratoolbox && git stash && git checkout $GIT_LOCAL_BRANCH && git pull origin $GIT_LOCAL_BRANCH && git submodule update --init';
ssh -t sbg-jenkins@10.184.148.14 'GIT_LOCAL_BRANCH='"'$GIT_LOCAL_BRANCH'"' && echo $GIT_LOCAL_BRANCH && cd ~/tmp/cobratoolbox && ~/tmp/cobratoolbox/docs/prepareTutorials.sh -c=~/tmp/cobratoolbox -t=~/tmp/COBRA.tutorials -p=~/tmp -m=html,pdf,png';
cd ~/tmp/COBRA.tutorials && git stash && git checkout $GIT_LOCAL_BRANCH && git pull origin $GIT_LOCAL_BRANCH;
cd ~/tmp/cobratoolbox && git stash && git checkout $GIT_LOCAL_BRANCH && git pull origin $GIT_LOCAL_BRANCH && git submodule update --init;
scp "$(pwd)/.artenolis/deployTutorials.sh" jenkins@lcsbs-mac-pro.uni.lux:$ARTENOLIS_ROOT_PATH_MAC/scratch/.;
ssh -t jenkins@lcsbs-mac-pro.uni.lux 'source ~/.profile && GIT_LOCAL_BRANCH='"'$GIT_LOCAL_BRANCH'"' && sh $ARTENOLIS_ROOT_PATH_MAC/scratch/deployTutorials.sh';
scp -r jenkins@lcsbs-mac-pro.uni.lux:$ARTENOLIS_ROOT_PATH_MAC/scratch/tutorials $ARTENOLIS_DATA_PATH/cobratoolbox/.;
cd $ARTENOLIS_DATA_PATH/repos/COBRA.tutorials && git stash && git checkout $GIT_LOCAL_BRANCH && git pull origin $GIT_LOCAL_BRANCH;
cd $ARTENOLIS_DATA_PATH/repos/cobratoolbox && git stash && git checkout $GIT_LOCAL_BRANCH && git pull origin $GIT_LOCAL_BRANCH && git submodule update --init;
python -c "from documenter.deploy import Documentation; doc = Documentation('github.com/opencobra/cobratoolbox', local_upstream='$(pwd)', ci='jenkins'); doc.deploy()";
bash .artenolis/generateZip.sh;
fi
22 changes: 22 additions & 0 deletions .artenolis/deployTutorials.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# DESCRIPTION:
# deploy tutorials of the COBRA Toolbox

# set the local branch
echo $GIT_LOCAL_BRANCH

# update the cobra tutorials repository
cd $ARTENOLIS_ROOT_PATH_MAC/repos/COBRA.tutorials
git stash
git checkout $GIT_LOCAL_BRANCH
git pull origin $GIT_LOCAL_BRANCH

# update the cobratoolbox repository
cd $ARTENOLIS_ROOT_PATH_MAC/repos/cobratoolbox
git stash
git checkout $GIT_LOCAL_BRANCH
git pull origin $GIT_LOCAL_BRANCH
git submodule update --init

# generate and deploy the tutorials
cd $ARTENOLIS_ROOT_PATH_MAC/repos/cobratoolbox
$ARTENOLIS_ROOT_PATH_MAC/repos/cobratoolbox/docs/prepareTutorials.sh -c=$ARTENOLIS_ROOT_PATH_MAC/repos/cobratoolbox -t=$ARTENOLIS_ROOT_PATH_MAC/repos/COBRA.tutorials -p=$ARTENOLIS_ROOT_PATH_MAC/scratch -m=html,pdf,png
2 changes: 1 addition & 1 deletion .artenolis/generateZip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ if [ "$ARCH" = "Linux" ] && [ "$MATLAB_VER" = "R2016b" ] && [ "$GIT_BRANCH" = "o

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

fi
14 changes: 8 additions & 6 deletions .artenolis/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ normal=$(tput sgr0)
red=$(tput setaf 1)
green=$(tput setaf 2)

currentBranch="${GIT_BRANCH##origin/}"

echo "Checking if the test suite should be run..."
if [[ ! -z $GIT_PREVIOUS_SUCCESSFUL_COMMIT ]]; then
commitHashs=($(git cherry $GIT_PREVIOUS_SUCCESSFUL_COMMIT HEAD 2>&1))
else
echo " -- environment variable GIT_PREVIOUS_SUCCESSFUL_COMMIT is not set (or empty)."
commitHashs=($(git log develop..HEAD -q --pretty=%H 2>&1))
commitHashs=($(git log develop..$currentBranch -q --pretty=%H 2>&1))
fi

# check if all commit messages contains only [documentation]
Expand Down Expand Up @@ -43,7 +45,7 @@ if [[ "$artenolisForce" = false ]]; then
if [[ ! -z $GIT_PREVIOUS_SUCCESSFUL_COMMIT ]]; then
modifiedFiles=($(git diff --name-only $GIT_PREVIOUS_SUCCESSFUL_COMMIT HEAD 2>&1))
else
modifiedFiles=($(git log develop..HEAD -q --pretty=%H | tail -1 2>&1))
modifiedFiles=($(git log develop..$currentBranch -q --pretty=%H | tail -1 2>&1))
fi

onlyDocFiles=true
Expand All @@ -69,20 +71,20 @@ else
fi

if [ "$ARCH" == "Linux" ]; then
/mnt/prince-data/MATLAB/$MATLAB_VER/bin/./matlab -nodesktop -nosplash < test/testAll.m
$ARTENOLIS_SOFT_PATH/MATLAB/$MATLAB_VER/bin/./matlab -nodesktop -nosplash < test/testAll.m

elif [ "$ARCH" == "macOS" ]; then
caffeinate -u &
/Applications/MATLAB_$MATLAB_VER.app/bin/matlab -nodesktop -nosplash < test/testAll.m
/Applications/MATLAB_$MATLAB_VER.app/bin/matlab -nodisplay -nosplash < test/testAll.m

elif [ "$ARCH" == "windows" ]; then
# change to the build directory
echo " -- changing to the build directory --"
cd "D:\\jenkins\\workspace\\$CI_PROJECT_NAME\\MATLAB_VER\\$MATLAB_VER\\label\\$ARCHVERSION"
cd "$ARTENOLIS_DATA_PATH\jenkins\\workspace\\$CI_PROJECT_NAME\\MATLAB_VER\\$MATLAB_VER\\label\\$NODE_LABELS"

echo " -- launching MATLAB --"
unset Path
nohup "D:\\MATLAB\\$MATLAB_VER\\\bin\\matlab.exe" -nojvm -nodesktop -nosplash -useStartupFolderPref -logfile output.log -wait -r "restoredefaultpath; cd D:\\jenkins\\workspace\\$CI_PROJECT_NAME\\MATLAB_VER\\$MATLAB_VER\\label\\$ARCHVERSION; cd test; testAll;" & PID=$!
nohup "$ARTENOLIS_SOFT_PATH\MATLAB\\$MATLAB_VER\\\bin\\matlab.exe" -nojvm -nodesktop -nosplash -useStartupFolderPref -logfile output.log -wait -r "restoredefaultpath; cd $ARTENOLIS_DATA_PATH\jenkins\\workspace\\$CI_PROJECT_NAME\\MATLAB_VER\\$MATLAB_VER\\label\\$NODE_LABELS; cd test; testAll;" & PID=$!

# follow the log file
tail -n0 -F --pid=$! output.log 2>/dev/null
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ How to contribute
- More information on formatting the documentation is [here](https://opencobra.github.io/cobratoolbox/docs/documentationGuide.html)
- A guide for reporting an **issue** is [here](https://opencobra.github.io/cobratoolbox/docs/issueGuide.html).

If you want to use `git` via the command line interface and need help, these [training slides](https://uni-lu.github.io/slides/) will get you started. This [guide](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github) or the official [GitHub guide](https://help.github.com/articles/creating-a-pull-request/) also come in handy.
If you want to use `git` via the command line interface and need help, this [guide](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github) or the official [GitHub guide](https://help.github.com/articles/creating-a-pull-request/) come in handy.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
ignore = dirty
[submodule "test/models"]
path = test/models
url = https://github.com/cobrabot/COBRA.models
url = https://github.com/LCSB-BioCore/COBRA.models
ignore = dirty
[submodule "external/analysis/Volume-and-Sampling"]
path = external/analysis/Volume-and-Sampling
Expand All @@ -40,11 +40,11 @@
ignore = dirty
[submodule "external/base/utilities/rdir"]
path = external/base/utilities/rdir
url = https://github.com/uni-lu/rdir.git
url = https://github.com/LCSB-BioCore/rdir.git
ignore = dirty
[submodule "external/analysis/mptoolbox"]
path = external/analysis/mptoolbox
url = https://github.com/cobrabot/mptoolbox.git
url = https://github.com/LCSB-BioCore/mptoolbox.git
ignore = dirty
[submodule "external/analysis/octave-networks-toolbox"]
path = external/analysis/octave-networks-toolbox
Expand Down
37 changes: 18 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. raw:: html

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


Expand All @@ -15,12 +15,12 @@ The COBRA Toolbox |br| COnstraint-Based Reconstruction and Analysis Toolbox
<td><div align="center"><a href="https://opencobra.github.io/cobratoolbox/latest/tutorials/index.html"><img src="https://img.shields.io/badge/COBRA-tutorials-blue.svg?maxAge=0"></a>
<a href="https://opencobra.github.io/cobratoolbox/latest"><img src="https://img.shields.io/badge/COBRA-docs-blue.svg?maxAge=0"></a>
<a href="https://groups.google.com/forum/#!forum/cobra-toolbox"><img src="https://img.shields.io/badge/COBRA-forum-blue.svg?maxAge=0"></a></div></td>
<td><div align="center"><a href="https://prince.lcsb.uni.lu/jenkins/job/COBRAToolbox-branches-auto-linux/"><img src="https://prince.lcsb.uni.lu/badges/linux-cobratoolbox.svg"></a>
<a href="https://prince.lcsb.uni.lu/jenkins/job/COBRAToolbox-branches-auto-macOS/"><img src="https://prince.lcsb.uni.lu/badges/macOS-cobratoolbox.svg"></a>
<a href="https://prince.lcsb.uni.lu/jenkins/job/COBRAToolbox-branches-auto-windows7/"><img src="https://prince.lcsb.uni.lu/badges/windows-cobratoolbox.svg"></a>
<td><div align="center"><a href="https://prince.lcsb.uni.lu/jenkins/job/COBRAToolbox-branches-auto-linux/"><img src="https://prince.lcsb.uni.lu/cobratoolbox/badges/linux.svg"></a>
<a href="https://prince.lcsb.uni.lu/jenkins/job/COBRAToolbox-branches-auto-macOS/"><img src="https://prince.lcsb.uni.lu/cobratoolbox/badges/macOS.svg"></a>
<a href="https://prince.lcsb.uni.lu/jenkins/job/COBRAToolbox-branches-auto-windows7/"><img src="https://prince.lcsb.uni.lu/cobratoolbox/badges/windows.svg"></a>
<a href="http://opencobra.github.io/cobratoolbox/docs/builds.html"><img src="http://concordion.org/img/benefit-links.png?maxAge=0" height="20px" alt="All continuous integration builds"></a>
</div></td>
<td><div align="center"><img src="https://prince.lcsb.uni.lu/badges/codegrade.svg" alt="Ratio of the number of inefficient code lines and the total number of lines of code (in percent). A: 0-3%, B: 3-6%, C: 6-9%, D: 9-12%, E: 12-15%, F: > 15%.">
<td><div align="center"><img src="https://prince.lcsb.uni.lu/cobratoolbox/codegrade/codegrade.svg" alt="Ratio of the number of inefficient code lines and the total number of lines of code (in percent). A: 0-3%, B: 3-6%, C: 6-9%, D: 9-12%, E: 12-15%, F: > 15%.">
<a href="https://codecov.io/gh/opencobra/cobratoolbox/branch/master"><img src="https://codecov.io/gh/opencobra/cobratoolbox/branch/master/graph/badge.svg?maxAge=0"></a></div></td>
</tr>
</table>
Expand Down Expand Up @@ -55,7 +55,7 @@ Installation
|warning| Please note the ``--depth=1`` in the clone command. Run this command in ``Terminal`` (on |macos| and |linux|) or in ``Git Bash`` (on |windows|) -
**not** in |matlab|. Although not recommended, you can download the
repository as a `compressed archive <https://prince.lcsb.uni.lu/releases/theCOBRAToolbox.zip>`__.
repository as a `compressed archive <https://prince.lcsb.uni.lu/cobratoolbox/releases/theCOBRAToolbox.zip>`__.

2. Change to the folder ``cobratoolbox/`` and run from |matlab|

Expand Down Expand Up @@ -136,12 +136,11 @@ instructions
- A guide for reporting an **issue** is `here <https://opencobra.github.io/cobratoolbox/docs/issueGuide.html>`__.

If you want to use ``git`` via the command line interface and need help,
these `training slides <https://uni-lu.github.io/slides/>`__ will get
you started. This
this
`guide <https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github>`__
or the official `GitHub
guide <https://help.github.com/articles/creating-a-pull-request/>`__
also come in handy.
come in handy.


.. end-how-to-contribute-marker
Expand Down Expand Up @@ -186,8 +185,8 @@ implemented in The COBRA Toolbox v3.0 [2], was employed.*
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**, accepted in Nature Protocols, 2018,
`arXiv:1710.04038 <https://arxiv.org/abs/1710.04038>`__.
v3.0**, Nature Protocols, volume 14, pages 639–702, 2019
`doi.org/10.1038/s41596-018-0098-2 <https://doi.org/10.1038/s41596-018-0098-2>`__.

.. end-how-to-cite-marker
Expand Down Expand Up @@ -236,42 +235,42 @@ holder.*
.. |macos| raw:: html

<img src="https://prince.lcsb.uni.lu/jenkins/userContent/apple.png" height="20px" width="20px" alt="macOS">
<img src="https://prince.lcsb.uni.lu/cobratoolbox/img/apple.png" height="20px" width="20px" alt="macOS">


.. |linux| raw:: html

<img src="https://prince.lcsb.uni.lu/jenkins/userContent/linux.png" height="20px" width="20px" alt="linux">
<img src="https://prince.lcsb.uni.lu/cobratoolbox/img/linux.png" height="20px" width="20px" alt="linux">


.. |windows| raw:: html

<img src="https://prince.lcsb.uni.lu/jenkins/userContent/windows.png" height="20px" width="20px" alt="windows">
<img src="https://prince.lcsb.uni.lu/cobratoolbox/img/windows.png" height="20px" width="20px" alt="windows">


.. |warning| raw:: html

<img src="https://prince.lcsb.uni.lu/jenkins/userContent/warning.png" height="20px" width="20px" alt="warning">
<img src="https://prince.lcsb.uni.lu/cobratoolbox/img/warning.png" height="20px" width="20px" alt="warning">


.. |matlab| raw:: html

<img src="https://prince.lcsb.uni.lu/jenkins/userContent/matlab.png" height="20px" width="20px" alt="matlab">
<img src="https://prince.lcsb.uni.lu/cobratoolbox/img/matlab.png" height="20px" width="20px" alt="matlab">


.. |tada| raw:: html

<img src="https://prince.lcsb.uni.lu/jenkins/userContent/tada.png" height="20px" width="20px" alt="tada">
<img src="https://prince.lcsb.uni.lu/cobratoolbox/img/tada.png" height="20px" width="20px" alt="tada">


.. |thumbsup| raw:: html

<img src="https://prince.lcsb.uni.lu/jenkins/userContent/thumbsUP.png" height="20px" width="20px" alt="thumbsup">
<img src="https://prince.lcsb.uni.lu/cobratoolbox/img/thumbsUP.png" height="20px" width="20px" alt="thumbsup">


.. |bulb| raw:: html

<img src="https://prince.lcsb.uni.lu/jenkins/userContent/bulb.png" height="20px" width="20px" alt="bulb">
<img src="https://prince.lcsb.uni.lu/cobratoolbox/img/bulb.png" height="20px" width="20px" alt="bulb">


.. |tutorials| raw:: html
Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ html:
@echo "Creating modules index page."
bash createModulesPage.sh
@echo "Copying tutorial html files into source/_static/tutorials/."
bash prepareTutorials.sh -t=~/tmp/COBRA.tutorials -c=~/tmp/cobratoolbox -p=~/tmp -m=rst
bash prepareTutorials.sh -t=$(ARTENOLIS_DATA_PATH)/repos/COBRA.tutorials -c=$(ARTENOLIS_DATA_PATH)/repos/cobratoolbox -p=$(ARTENOLIS_DATA_PATH)/cobratoolbox -m=rst
@echo "Generating list of suggestions for the websearch."
python generateJSONList.py
@echo
Expand Down Expand Up @@ -231,4 +231,4 @@ pseudoxml:
dummy:
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
@echo
@echo "Build finished. Dummy builder generates no files."
@echo "Build finished. Dummy builder generates no files."
2 changes: 1 addition & 1 deletion docs/createModulesPage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ do
echo ".. raw:: html" >> $rstFunctionPath
echo "" >> $rstFunctionPath
echo " <div class=\"tutorialSectionBox $section\">" >> $rstFunctionPath
echo " <div class=\"sectionLogo\"><img class=\"avatar\" src=\"https://prince.lcsb.uni.lu/img/icon_${section}_wb.png\"></div>" >> $rstFunctionPath
echo " <div class=\"sectionLogo\"><img class=\"avatar\" src=\"https://prince.lcsb.uni.lu/cobratoolbox/img/icon_${section}_wb.png\"></div>" >> $rstFunctionPath
echo " <div class=\"sectionTitle\"><h3>${subs[$section]}</h3></div>" >> $rstFunctionPath
echo " <div class=\"row\">" >> $rstFunctionPath
echo " <div class=\"col-xs-6\">" >> $rstFunctionPath
Expand Down
Loading

0 comments on commit 2ed83d1

Please sign in to comment.