Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change codes for julia 1.0+ #46

Merged
merged 53 commits into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
ab6a71c
change codes for julia 1.0+
leejm516 Jun 22, 2019
8078910
add support for julia 1.2 on artenolis
laurentheirendt Aug 29, 2019
9d868e8
add support for julia 1.0 on travis
laurentheirendt Aug 29, 2019
b2363ad
Merge branch 'support-1+' into develop-julia1.0
laurentheirendt Aug 29, 2019
162bde8
remove trigger
laurentheirendt Aug 30, 2019
72a67e0
add manifest.toml to gitignore
laurentheirendt Sep 2, 2019
095bba7
remove manifest.toml file
laurentheirendt Sep 2, 2019
5969d6f
change if conditions on macOS and Linux
laurentheirendt Sep 3, 2019
9728e91
fix path to testenv
laurentheirendt Sep 3, 2019
e60cd8d
change of syntax for env vars
laurentheirendt Sep 3, 2019
239c4b6
change to sys bindir in test
laurentheirendt Sep 4, 2019
bc746d4
windows compatibility on artenolis
laurentheirendt Sep 4, 2019
4eb62b8
fix for windows trigger command
laurentheirendt Sep 4, 2019
97942d1
change requirements
laurentheirendt Sep 4, 2019
a2d3377
remove require files
laurentheirendt Sep 5, 2019
af961c8
changes in toml file
laurentheirendt Sep 5, 2019
f825775
essential changes for solvers
laurentheirendt Sep 5, 2019
73ecc26
add deps to toml
laurentheirendt Sep 5, 2019
052dcf8
remove deprecation warning in test
laurentheirendt Sep 5, 2019
b72b1e4
Revert "add deps to toml"
laurentheirendt Sep 5, 2019
0cf8561
change of import to using
laurentheirendt Sep 5, 2019
8764cd6
temporarily drop Clp and Mosek support
laurentheirendt Sep 9, 2019
6ba8c36
temporarily drop Clp and Mosek support in checksetup
laurentheirendt Sep 9, 2019
8c1d4e8
revert mathoptinterface syntax and drop support for clp and mosek
laurentheirendt Sep 9, 2019
465c1e5
fix dep warnings in test suite
laurentheirendt Sep 9, 2019
ced5123
reinstate Pkg
laurentheirendt Sep 9, 2019
805c63f
change of deps in toml
laurentheirendt Sep 9, 2019
7c52a10
clean comment
laurentheirendt Sep 9, 2019
c98cd6a
reinstantiate saveDistributedFBA in tests
laurentheirendt Sep 9, 2019
d3989ff
simplified using statements
laurentheirendt Sep 9, 2019
42f6957
reset the call of distributedFBA in tests - remove semi-colon
laurentheirendt Sep 9, 2019
b8caca3
simplified using statements (1)
laurentheirendt Sep 9, 2019
164d8b4
explicitly add the cplex and gurobi solvers on artenolis
laurentheirendt Sep 10, 2019
c8a6482
explicitly add coverage pkg
laurentheirendt Sep 10, 2019
ad76709
Revert "explicitly add the cplex and gurobi solvers on artenolis"
laurentheirendt Sep 10, 2019
f7297de
add CPLEX and Gurobi as test reqs
laurentheirendt Sep 10, 2019
25ed822
add MATLAB to deps
laurentheirendt Sep 11, 2019
74122e3
make PALM.jl julia 1.0 ready
laurentheirendt Sep 11, 2019
d3e2f9f
add MAT to test dep
laurentheirendt Sep 11, 2019
5cca502
changes in palm.jl for julia1.0
laurentheirendt Sep 11, 2019
ba572de
everywhere macro
laurentheirendt Sep 11, 2019
1b49c63
change of MATLAB deps to extras
laurentheirendt Sep 11, 2019
d61fd18
remove env variable for matlab home on windows
laurentheirendt Sep 11, 2019
3c8f061
change home env variable to homedir
laurentheirendt Sep 11, 2019
5f6b0a4
change of filesep on windows
laurentheirendt Sep 11, 2019
62826b5
remove test deps on certain platforms
laurentheirendt Sep 12, 2019
4e5a858
perl command in .artenolis.yml to change project.toml test deps
laurentheirendt Sep 12, 2019
f3349f2
line ending in yml script
laurentheirendt Sep 12, 2019
bc84194
debugging: display toml
laurentheirendt Sep 12, 2019
3b04d34
change if condition
laurentheirendt Sep 12, 2019
7e6afa5
change test deps on windows
laurentheirendt Sep 12, 2019
5175821
fix paths in PALM.jl
laurentheirendt Sep 12, 2019
9aab41e
Revert "change test deps on windows"
laurentheirendt Sep 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .artenolis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,35 @@ script:
# rename the cloned folder
- cd .. && cp -r $NODE_LABELS COBRA && cd COBRA

# change the test dependencies on Linux and macOS (ARTENOLIS)
- if [ "$ARCH" == "Linux" ] || [ "$ARCH" == "macOS" ]; then
perl -i -pe's/test = \["GLPKMathProgInterface", "GLPK", "Test"\]/test = \["GLPKMathProgInterface", "GLPK", "Test", "MAT", "MATLAB", "Gurobi", "CPLEX"\]/g' Project.toml;
fi

# launch the tests
- bash .artenolis/runtests.sh

# clean up the build directory
- cd .. && rm -rf COBRA

# clean up the tmp folder
- rm -rf ~/tmp

after_success:
- if [ "$ARCH" == "Linux" ]; then $ARTENOLIS_SOFT_PATH/julia/$JULIA_VER/bin/julia --color=yes -e 'cd(Pkg.dir("COBRA")); using Coverage; tmp=process_folder(); Codecov.submit(tmp, verbose=false); Coveralls.submit(tmp);'; fi

# submit coverage report
- if [ "$ARCH" == "Linux" && "$JULIA_VER" = "v1.2.0" ]; then
$ARTENOLIS_SOFT_PATH/julia/$JULIA_VER/bin/julia --color=yes -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())';
fi

# set environment variables for documentation deployment
- if [[ "$ARCH" == "Linux" && "$JENKINS_PULL_REQUEST" != "True" ]]; then
export TRAVIS_BRANCH=$GIT_BRANCH;
export TRAVIS_PULL_REQUEST=false;
var=$GIT_URL; export TRAVIS_REPO_SLUG=${var:7:${#var}};
export TRAVIS_OS_NAME="linux";
export TRAVIS_OS_NAME=$label;
export TRAVIS_JULIA_VERSION=$JULIA_VER;
$ARTENOLIS_SOFT_PATH/julia/$JULIA_VER/bin/julia --color=yes -e 'cd(Pkg.dir("COBRA")); include(joinpath("docs", "makeDoc.jl"))';
$ARTENOLIS_SOFT_PATH/julia/$JULIA_VER/bin/julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()';
$ARTENOLIS_SOFT_PATH/julia/$JULIA_VER/bin/julia --project=docs/ docs/make.jl;
fi

after_script:
# clean up the build directory
- cd .. && rm -rf COBRA
34 changes: 8 additions & 26 deletions .artenolis/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,21 @@ echo "MATLAB_VER = $MATLAB_VER"

# launch the test script
if [ "$ARCH" == "Linux" ]; then
if [ "$JULIA_VER" == "v0.6.4" ]; then
# remove th julia directory to clean the installation directory
rm -rf $JULIA_PKGDIR/v0.6/COBRA

# add the COBRA module
$ARTENOLIS_SOFT_PATH/julia/$JULIA_VER/bin/julia --color=yes -e 'Pkg.clone(pwd()); cd(Pkg.dir("COBRA")); Pkg.test(pwd(), coverage=true);'

elif [ "$JULIA_VER" == "v0.7.0" ]; then
# add the COBRA module
$ARTENOLIS_SOFT_PATH/julia/$JULIA_VER/bin/julia --color=yes -e 'using Pkg; Pkg.clone(pwd())'
fi
$ARTENOLIS_SOFT_PATH/julia/$JULIA_VER/bin/julia --color=yes -e 'import Pkg; Pkg.clone(pwd()); Pkg.test("COBRA", coverage=true); Pkg.rm("COBRA");'

elif [ "$ARCH" == "macOS" ]; then
# remove th julia directory to clean the installation directory
rm -rf ~/.julia/v0.6/COBRA

caffeinate -u &
/Applications/Julia-$JULIA_VER.app/Contents/Resources/julia/bin/julia --color=yes -e 'Pkg.clone(pwd()); cd(Pkg.dir("COBRA")); Pkg.test(pwd());'
/Applications/Julia-$JULIA_VER.app/Contents/Resources/julia/bin/julia --color=yes -e 'import Pkg; Pkg.clone(pwd()); Pkg.test("COBRA"); Pkg.rm("COBRA");'

elif [ "$ARCH" == "windows" ]; then
if [ "$JULIA_VER" == "v0.6.4" ]; then
# remove th julia directory to clean the installation directory
rm -rf ~/.julia/v0.6/COBRA

unset Path
nohup "$ARTENOLIS_SOFT_PATH\\julia\\$JULIA_VER\\\bin\\julia.exe" --color=yes -e 'import Base; ENV["MATLAB_HOME"]="D:\\MATLAB\\$(ENV["MATLAB_VER"])"; Pkg.clone(pwd()); cd(Pkg.dir("COBRA")); Pkg.test(pwd());' > output.log & PID=$!
unset Path
nohup "$ARTENOLIS_SOFT_PATH\\julia\\$JULIA_VER\\\bin\\julia.exe" --color=yes -e 'import Pkg; Pkg.clone(pwd()); Pkg.test("COBRA"); Pkg.rm("COBRA");' > output.log & PID=$!

# follow the log file
tail -n0 -F --pid=$! output.log 2>/dev/null
# follow the log file
tail -n0 -F --pid=$! output.log 2>/dev/null

# wait until the background process is done
wait $PID
fi
# wait until the background process is done
wait $PID
fi

CODE=$?
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ docs/build/
docs/tutorial/results.mat
results/*
test/testModels

docs/src/tutorials.md
Manifest.toml
docs/src/tutorials.md
19 changes: 1 addition & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ os:
- linux

julia:
- 0.6
- 0.7
- 1.0
- nightly

matrix:
allow_failures:
- julia: 0.7
- julia: nightly

notifications:
Expand All @@ -25,18 +23,3 @@ addons:
- libgmp-dev
- libglpk-dev

git:
depth: 99999

before_install:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi

script:
# update all packages
- julia --color=yes -e 'Pkg.update();'

# temporary addition for julia 0.6 until new version of MAT tagged
- julia --color=yes -e 'Pkg.add("MAT"); Pkg.checkout("MAT")'

# add and test the COBRA module
- julia --color=yes -e 'Pkg.clone(pwd()); Pkg.test("COBRA")'
32 changes: 32 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name = "COBRA"
uuid = "58298e0b-d05c-52ec-a210-0694647ebfc7"
version = "0.3.0"

[deps]
CPLEX = "a076750e-1247-5638-91d2-ce28b192dca0"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
GLPK = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
GLPKMathProgInterface = "3c7084bd-78ad-589a-b5bb-dbd673274bea"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
MathProgBase = "fdba3010-5040-5b88-9595-932c9decdf73"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
HTTP = ">= 0.8.0"
MAT = ">= 0.5.0"
julia = "1"

[extras]
CPLEX = "a076750e-1247-5638-91d2-ce28b192dca0"
GLPK = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
GLPKMathProgInterface = "3c7084bd-78ad-589a-b5bb-dbd673274bea"
Gurobi = "2e9cd046-0924-5485-92f1-d5272153d98b"
MAT = "23992714-dd62-5051-b70f-ba57cb901cac"
MATLAB = "10e44e05-a98a-55b3-a45b-ba969058deb6"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["GLPKMathProgInterface", "GLPK", "Test"]
4 changes: 0 additions & 4 deletions REQUIRE

This file was deleted.

8 changes: 4 additions & 4 deletions config/sshCfg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@

#-------------------------------------------------------------------------------------------

sshWorkers = Array{Dict{Any, Any}}(3)
sshWorkers = Array{Dict{Any, Any}}(undef, 3)

sshWorkers[1,:] = Dict( "usernode" => "[email protected]",
sshWorkers[1] = Dict( "usernode" => "[email protected]",
"procs" => 8,
"dir" => `"~"/COBRA.jl/`,
"flags" => `-6 -p8022`,
"exename"=> "/usr/bin/julia/bin/./julia")

sshWorkers[2,:] = Dict( "usernode" => "[email protected]",
sshWorkers[2] = Dict( "usernode" => "[email protected]",
"procs" => 16,
"dir" => `"~"/COBRA.jl/`,
"flags" => "-p22",
"exename"=> "/usr/bin/julia/bin/./julia")

sshWorkers[3,:] = Dict( "usernode" => "[email protected]",
sshWorkers[3] = Dict( "usernode" => "[email protected]",
"procs" => 32,
"dir" => `"~"/COBRA.jl/`,
"flags" => "-4 -p9997",
Expand Down
9 changes: 5 additions & 4 deletions src/COBRA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ The documentation is here: http://opencobra.github.io/COBRA.jl
module COBRA

# include the load file to load a model of .mat format
using MAT
using MathProgBase
if sizeof(Pkg.installed("MATLAB")) > 0
import Pkg
using SparseArrays, Distributed, LinearAlgebra
using MAT, MathProgBase
if "MATLAB" in keys(Pkg.installed())
using MATLAB
end

Expand All @@ -30,7 +31,7 @@ module COBRA
include("solve.jl")
include("distributedFBA.jl")
include("tools.jl")
if sizeof(Pkg.installed("MATLAB")) > 0
if "MATLAB" in keys(Pkg.installed())
include("PALM.jl")
end

Expand Down
Loading