-
Notifications
You must be signed in to change notification settings - Fork 648
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
conda build scripts (fixes #608) #751
Conversation
So I'm having a problem writing the build scripts that also run the tests for MDAnalysis during the build. But I've encountered a problem here. Our tests package depends on MDAnalysis installed, but I have to build a conda package of the tests before I can build the MDAnalysis package (Since I want to run the tests for MDAnalsysis when it's build) The solution for this is easy. I remove the MDAnalysis dependency from the tests package. Then we only warn about the missing MDAnalysis package once we actually run the tests. How about that? |
I am not sure I understand. You want to run the test while you are building the conda package? Do you have to? Can't you test the build afterwards as we currently do? I do not like removing the dependency to MDAnalysis in MDAnalysisTests. One of the reason is just semantics: the tests require MDAnalysis while MDAnalysis works without the tests; the other reason is that the dependency to MDAnalysis also tests that the versions match. |
The process of building a conda package allows to test the build in an isolated environment after the package has been created. This means it builds the package and then runs the tests for you if you tell conda how. I think this is very convenient to setup because it means we can never forget to run the tests on a published package. If I build a conda package that includes the tests as well we should get around this. The disadvantage would be that our conda package becomes about 30-40 MB. |
I'm doing this for the GridDataFormats package. The problem I'm having is that MDAnalysisTests has to be installed from a conda package currently. I haven't found a way around that yet. |
So for what it's worth, I already manually test in a new env every package that hits pypi, but I guess the conda package is a separate entity to the pypi package, so it isn't a bad thing to test that separately. I think maybe distribute them together as one package? 40mb isn't too terrible? |
depending how many people use the wifi during a winter/summer school. But there we could also distribute USB-sticks with the compiled packages (or even complete conda installation?). |
@kain88-de I don't think it's necessary to run full test when building conda. You pull code from github, which is already tested on travis. I think you only need to run small tests to make sure that the conda build correctly. |
Yes and the best for this is to run the full test-suite. Because only then do we run all imports for the build modules guaranteed.. |
You could raise an Issue to shrink down the test data tbh. There's a trr which is 10mb alone and 10 frames, surely we can shrink this to 2-3 frames (and test iteration with a 10 atom system of 1000 frames if need be). We could probably half the size fairly easy with no real loss of tests. |
b883a6f
to
f6ed69b
Compare
This is the most recent version. I'm using the 0.14.0 tag from git. But when I run all tests for some reason `test_transformations.py:test_shear_from_matrix' fails. |
Hmm, I can't remember if that actually uses a |
strange thing is this seems to fail on develop as well. I'm looking into it with a clean conda environment and checkout of the git repository |
OK I have a new version uploaded onto my anaconda account. Unfortunately I can't produce osx builds because I'm not on an osx system. I will look into the anaconda could build platform to generate packages for osx as well. |
18a8275
to
f0f4fa0
Compare
So the OSX build has to wait a little bit. I can't use the anaconda cloud because they only offer linux-64 architecture for builds. But once this is merged I can do a osx-64 build at work. Otherwise I've uploaded a mdanalysis build to the official channel It would be nice if someone else could try out the package before I merge this and make an official blog post.
|
@kain88-de you can use travis of osx. |
matrix:
include:
- { os: linux, env: PYTHON_VERSION=2.7 }
- { os: linux, env: PYTHON_VERSION=3.4 }
- { os: linux, env: PYTHON_VERSION=3.5 }
- { os: osx, env: PYTHON_VERSION=3.4 } |
anh no build for py3 yet? |
MDAnalysis is not yet fully functional on py3. And clearly not tested On 08-03-16 08:54, Hai Nguyen wrote:
|
I know that travis supports osx. But currently I don't want to spend time figuring out how to connect it with conda and have the right things build and published for the correct branches. That is something for later. |
Did anyone test the linux conda build yet? |
I'll try to make a osx build today. Shouldn't be to hard now. If that works fine I'd say we are good to go. |
Scripts to build tempdir dependency conda package and a combined MDAnalysis and MDAnalysistests package. [skip ci]
[skip ci]
OK the OSX build isn't working straight forward as I'd hoped. For some reason nose can't find the test-modules. Since the linux module is working we can also announce it officially. |
btw that is also accessible as information by clicking on the anaconda badge I have added to the readme.rst. And I wonder that it works because it didn't work for me when I tried. |
@@ -0,0 +1,4 @@ | |||
#!/bin/bash | |||
|
|||
MDA_USE_OPENMP=FALSE pip install package/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why build the serial version only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conda doesn't ship openmp libraries. To avoid that a release package is build with globally installed openmp versions we default to only serial builds on conda do ensure that the binary package truly runs anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we should document and mention this. It's actually a good reason for installing from source.
Oliver Beckstein
email: orbeckst@gmail.com
Am Mar 17, 2016 um 1:19 schrieb kain88-de notifications@github.com:
In maintainer/conda/MDAnalysis/build.sh:
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+MDA_USE_OPENMP=FALSE pip install package/
Conda doesn't ship openmp libraries. To avoid that a release package is build with globally installed openmp versions we default to only serial builds on conda do ensure that the binary package truly runs anywhere.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious: @hainm , do you not have this issue (can't ship OpenMP-enabled binaries) with pytraj or do you not use OpenMP code?
I think we also want to add installation through conda to the Quick Start Installation. |
I see you opened a issue on the website repo for that. I will take care of these things when this is merged. |
[skip ci]
Thanks. Oliver Beckstein Am Mar 17, 2016 um 1:20 schrieb kain88-de notifications@github.com:
|
@orbeckst I've not been using that script, I get the following:
It looks like the git commands at the bottom aren't working? (My git is 1.9.1, I think that's old by the looks of it) |
Also change the versioning in the conda install files.
The script works semi OK for me. I'll upload a chance soon. But the script can't remove the |
@richardjgowers the script is intended to be called from the root of the repository. Otherwise I have updated the change-release script. |
Derp, thanks. It works now, except for not getting rid of the |
sounds good. |
If there are no further comments I think we can merge this and prepare the official announcements. |
Looks good to me. What will be the first conda release? .14 or .15? |
0.14.0 the one I have currently uploaded. |
Please merge. Oliver Beckstein Am Mar 18, 2016 um 1:11 schrieb kain88-de notifications@github.com:
|
conda build scripts (fixes #608)
Fixes #608
Changes made in this Pull Request:
This updates the scripts from #571 by @hainm. I currently uploaded
them on my own account. I still have to figure out how to do this for
the MDAnalysis org once I have access to it.
https://anaconda.org/kain88-de/mdanalysis
PR Checklist
- [ ] publish blog post detailing how MDAnalysis can be installed from conda
- [ ] add instructions to Quick Start Installation
EDIT
I remove some bullet points because they are tracked here