Skip to content

Commit 4e2704a

Browse files
Merge pull request #22 from LewisLabUCSD/develop
Regular merge of develop
2 parents bfb5d68 + e9e536b commit 4e2704a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1442
-25
lines changed

.artenolis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ script:
1616
after_success:
1717

1818
# submit coverage report
19-
#- if [[ "$MATLAB_VER" == "R2018b" && "$ARCH" == "Linux" ]]; then
20-
# bash <(curl -s https://codecov.io/bash) -f "!*.lst";
21-
# fi
19+
- if [[ "$MATLAB_VER" == "R2018b" && "$ARCH" == "Linux" ]]; then
20+
bash <(curl -s https://codecov.io/bash) -f "!*.lst";
21+
fi

.artenolis/runtests.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@
22

33
# launch MATLAB
44
if [ "$ARCH" == "Linux" ]; then
5-
$ARTENOLIS_SOFT_PATH/MATLAB/$MATLAB_VER/bin/./matlab -nodesktop -nosplash -r "fprintf('Hello ARTENOLIS.\n'); quit();"
5+
6+
CURRENTDIR=$(pwd)
7+
8+
# update the COBRA Toolbox
9+
cd $ARTENOLIS_DATA_PATH/repos/cobratoolbox
10+
git pull origin master
11+
12+
# change to the current directory
13+
echo $CURRENTDIR
14+
cd $CURRENTDIR
15+
16+
# launch the test suite
17+
$ARTENOLIS_SOFT_PATH/MATLAB/$MATLAB_VER/bin/./matlab -nodesktop -nosplash < test/testAll.m
18+
619
fi
720

821
CODE=$?

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
coverage.json
2+
coverage_html
13
*.asv
24
*.m~
35
*.mex*

external/rdir/LICENSE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (c) 2014, Thomas Vanaret
2+
Copyright (c) 2009, Gus Brown
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
* Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
* Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in
13+
the documentation and/or other materials provided with the distribution
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25+
POSSIBILITY OF SUCH DAMAGE.

external/rdir/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Recursive directory listing
2+
3+
Original version is
4+
[here](https://nl.mathworks.com/matlabcentral/fileexchange/19550-recursive-directory-listing?requestedDomain=true).
5+
6+
The script has been adapted for `opencobra` repositories, such as [the COBRA
7+
Toolbox](https://github.com/opencobra/cobratoolbox) and [the
8+
MATLAB.devTools](https://github.com/opencobra/MATLAB.devTools).

external/rdir/enhanced_rdir.m

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
%% RDIR Enhanced - Examples of use
2+
%
3+
% This script demonstrates how to use the different abilities of the
4+
% enhanced |rdir| function.
5+
%
6+
% Examples are based on |matlabroot| directory content. Results may vary
7+
% depending on your version of Matlab.
8+
%
9+
10+
%% Standard use
11+
rdir([matlabroot, '\*.txt'])
12+
13+
%% Using double wildcard **
14+
% List |".m"| files whose name contains |"tmpl"| in all subdirectories of
15+
% |matlabroot|
16+
rdir([matlabroot, '\**\*tmpl*.m'])
17+
18+
%% RDIR output
19+
d = rdir([matlabroot, '\**\*tmpl*.m'])
20+
21+
%%
22+
disp(d(1))
23+
24+
25+
%% Using 3rd argument to shorten output names
26+
% Remove |"C:\Program Files\"| in returned names
27+
rdir([matlabroot, '\*.txt'], '', 'C:\Program Files\')
28+
29+
%%
30+
% Remove |matlabroot| in returned names
31+
rdir([matlabroot, '\*.txt'], '', true)
32+
33+
%%
34+
% Optional 2nd |rdir| output indicates common path removed from each output
35+
% name
36+
[d, p] = rdir([matlabroot, '\*.txt'], '', true);
37+
38+
fprintf('Common path : \n%s\n\n', p)
39+
40+
disp( d(1) )
41+
42+
%% Using a filter with "regexp"
43+
% List |".mat"| files, then select those whose name match regular expression
44+
% |'data\d'| (ie |"data"| followed by a numeric digit)
45+
rdir([matlabroot '\toolbox\**\*.mat'], 'regexp(name, ''data\d'')', true)
46+
47+
%% Using a function handle as filter
48+
49+
fun = @(d) ~isempty(regexp(d.name, 'data\d')) && (d.bytes < 10*1024)
50+
51+
rdir([matlabroot '\toolbox\**\*.mat'], fun, true)
52+
53+
%% Specific display - No item matching filter
54+
% When some items match input path, but none match filter, a specific
55+
% message is displayed.
56+
rdir(matlabroot, 'strcmp(name, ''unknowtoolbox'')', 1)
57+
58+
59+
%% Specific display - Wrong filter
60+
% A warning is displayed after the non-filtered result list if entered
61+
% filter is wrong.
62+
rdir(matlabroot, 'wrong filter', 1)
63+
64+
65+
% EOF

0 commit comments

Comments
 (0)