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

Enable automatic installation of Python dependencies #38

Closed
jameskermode opened this issue Nov 3, 2016 · 16 comments
Closed

Enable automatic installation of Python dependencies #38

jameskermode opened this issue Nov 3, 2016 · 16 comments

Comments

@jameskermode
Copy link
Collaborator

The following seems to work for the Travis-CI tests, but may not be optimal

ENV["PYTHON"]=""
Pkg.add("PyCall")
Pkg.add("Conda")
using Conda
Conda.add("NumPy")
Conda.add("SciPy")
Conda.add("pip")
pip = joinpath(Conda.BINDIR, "pip")
run(`$pip install ase`)
run(`$pip install -e git+https://github.com/libAtoms/matscipy#egg=matscipy`)
Pkg.clone(pwd())
Pkg.build("JuLIP")
Pkg.test("JuLIP"; coverage=true)
@cortner
Copy link
Member

cortner commented Nov 5, 2016

would be great if Pkg.build("JuLIP") could be used to install all of this?

@jameskermode
Copy link
Collaborator Author

I think this just requires putting the above into a deps/build.jl script? I haven't quite understood how this interoperates with REQUIRE so I might leave it to you so I don't break everything.

@cortner
Copy link
Member

cortner commented Nov 10, 2016

I've never done it but I should learn. I'll have a look.

@jameskermode
Copy link
Collaborator Author

@cortner we should revisit this. matscipy has now been released on PyPI so pip install matscipy should work reasonably easily cross platform. This means I no longer propose to port the neighbour list inside JuLIP - I think it's better to keep separate to keep up with bug fixes etc and avoid code duplication.

@cortner
Copy link
Member

cortner commented Oct 9, 2017

agree to keep the neighbour list in matscipy. However, maybe we could then produce plain-C interface that doesn't require going via Python?

@cortner
Copy link
Member

cortner commented Oct 9, 2017

I just modified the build script to account for the easier installation of matscipy

@cortner
Copy link
Member

cortner commented Oct 9, 2017

after we test this, we can probably close this issue?

@gabor1
Copy link

gabor1 commented Oct 9, 2017 via email

@cortner
Copy link
Member

cortner commented Oct 9, 2017

I agree - see #63

@cortner
Copy link
Member

cortner commented Oct 9, 2017

in fact if it is mostly for educational purposes, then something not too fast would be ok? there is still #1 - it works great for clusters. Just need to test how well it works with PBCs.

@jameskermode
Copy link
Collaborator Author

I agree in principle, but think the time when one can use Julia for materials modelling without a working Python and pip installation is some way away.

@cortner the low-level neighbour_list C call looks like this:

_matscipy.neighbour_list(quantities, a.cell,
                                    np.linalg.inv(a.cell.T), a.pbc,
                                    a.positions, cutoff, *args)

so it can already be called without an ASE Atoms object, but doing it without Python at all is much harder, as the Python API is very convenient for building up variable length return arrays etc.

@gabor1
Copy link

gabor1 commented Oct 9, 2017 via email

@jameskermode
Copy link
Collaborator Author

Oops, probably premature to close as I see more commits But the new build.jl is working for me.

@cortner
Copy link
Member

cortner commented Oct 9, 2017

and yes, speed is sorta important, that’s why pure python doesn’t work very well.

For clusters, the NearestNeighbours package is faster than James' list :). but I suspect it won't do as well with PBC, because the result needs to be post processed to get the periodic images. But probably we are talking about a small factor. So still much more performant than any pure python.

@cortner
Copy link
Member

cortner commented Oct 9, 2017

ok, I'll close this once travis confirms everything is ok. And I'll move anything relevant to a separate issue.

@cortner
Copy link
Member

cortner commented Oct 10, 2017

there currently seem to be multiple bugs on Julia/Anaconda/Travis for OSX right now, which is why the tests fail. but the automatic installation seems to work ok on travis, for both Linux and OSX, so I am closing this. We can re-open if needed.

@cortner cortner closed this as completed Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants