Skip to content

Commit

Permalink
fixing travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Ortner committed Feb 17, 2019
1 parent a59096a commit cd6e278
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ os:
- osx

julia:
- 0.6
- 0.7
- 1.0
- 1.1

addons:
apt:
Expand All @@ -19,10 +21,10 @@ notifications:
env:
- PYTHON=""

before_install:
- if [ $TRAVIS_OS_NAME = osx ]; then brew cask uninstall oclint; fi
- if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi
# before_install:
# - if [ $TRAVIS_OS_NAME = osx ]; then brew cask uninstall oclint; fi
# - if [ $TRAVIS_OS_NAME = osx ]; then brew install gcc; fi

script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("ASE"); Pkg.test("ASE"; coverage=true)'
# script:
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
# - julia -e 'Pkg.clone(pwd()); Pkg.build("ASE"); Pkg.test("ASE"; coverage=true)'
8 changes: 4 additions & 4 deletions deps/build_old.jl → deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function checkpip()
# If it is not found, install it
println("""I couldn't find `pip`. I will try to download and install it
automatically, but if this fails, please install
manually, then try to build `JuLIP` again.""")
manually, then try to build `ASE` again.""")
get_pip = joinpath(dirname(@__FILE__), "get-pip.py")
download("https://bootstrap.pypa.io/get-pip.py", get_pip)
run(`$(PyCall.python) $get_pip --user`)
Expand All @@ -19,15 +19,15 @@ end
function pip(pkgname)
checkpip()
pipcmd = `$(PyCall.python) -m pip install --upgrade --user $(pkgname)`
run(`$(pipcmd)`)
run(pipcmd)
end


println("Installing Dependencies of `ASE.jl`: `ase` and `matscipy`")

if Sys.isunix()
try
@pyimport ase as _ase_
pyimport("ase")
catch
println("""`ase` was not found, trying to install via pip. If this fails,
please file an issue and try to install it manually, following
Expand All @@ -36,7 +36,7 @@ if Sys.isunix()
end

try
@pyimport matscipy as _matscipy_
pyimport("matscipy")
catch
println("""`matscipy` was not found, trying to install it. If this fails,
please file an issue and try to install it manually, following
Expand Down
4 changes: 1 addition & 3 deletions src/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ module Models

using PyCall

# TODO: figure out how to load this dynamically
@pyimport ase.calculators.emt as emt

"""
Creates an `ASECalculator` that uses `ase.calculators.emt` to compute
energy and forces. This is very slow and is only included for
demonstration purposes.
"""
function EMTCalculator()
emt = pyimport("ase.calculators.emt")
return ASECalculator(emt.EMT())
end

Expand Down

0 comments on commit cd6e278

Please sign in to comment.