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

conda build scripts (fixes #608) #751

Merged
merged 4 commits into from
Mar 18, 2016
Merged

Conversation

kain88-de
Copy link
Member

Fixes #608

Changes made in this Pull Request:

  • Added conda scripts

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

  • CHANGELOG updated?
  • Issue raised/referenced?

    - [ ] publish blog post detailing how MDAnalysis can be installed from conda

  • add anaconda badge

    - [ ] add instructions to Quick Start Installation

EDIT

I remove some bullet points because they are tracked here

@kain88-de kain88-de mentioned this pull request Mar 1, 2016
@orbeckst orbeckst mentioned this pull request Mar 1, 2016
@kain88-de
Copy link
Member Author

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?

@jbarnoud
Copy link
Contributor

jbarnoud commented Mar 4, 2016

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.

@kain88-de
Copy link
Member Author

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?

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.

@kain88-de
Copy link
Member Author

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.

@richardjgowers
Copy link
Member

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?

@kain88-de
Copy link
Member Author

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?).

@hainm
Copy link
Contributor

hainm commented Mar 4, 2016

@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.

@kain88-de
Copy link
Member Author

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..

@richardjgowers
Copy link
Member

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.

@kain88-de kain88-de force-pushed the conda branch 2 times, most recently from b883a6f to f6ed69b Compare March 6, 2016 13:46
@kain88-de
Copy link
Member Author

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.

@richardjgowers
Copy link
Member

Hmm, I can't remember if that actually uses a np.matrix, maybe something to do with that changed between versions of np?

@kain88-de
Copy link
Member Author

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

@kain88-de
Copy link
Member Author

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.

@kain88-de kain88-de force-pushed the conda branch 2 times, most recently from 18a8275 to f0f4fa0 Compare March 8, 2016 07:34
@kain88-de
Copy link
Member Author

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.

conda config --add channels MDAnalysis
conda install mdanalysis

@hainm
Copy link
Contributor

hainm commented Mar 8, 2016

@kain88-de you can use travis of osx.

@hainm
Copy link
Contributor

hainm commented Mar 8, 2016

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 }

@hainm
Copy link
Contributor

hainm commented Mar 8, 2016

anh no build for py3 yet?

@jbarnoud
Copy link
Contributor

jbarnoud commented Mar 8, 2016

MDAnalysis is not yet fully functional on py3. And clearly not tested
enough.

On 08-03-16 08:54, Hai Nguyen wrote:

anh no build for py3 yet?


Reply to this email directly or view it on GitHub
#751 (comment).

@kain88-de
Copy link
Member Author

@kain88-de you can use travis of osx.

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.

@kain88-de
Copy link
Member Author

Did anyone test the linux conda build yet?

@kain88-de
Copy link
Member Author

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]
@kain88-de
Copy link
Member Author

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.

@kain88-de
Copy link
Member Author

may be add 1 step-install too:

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/
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member

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?

@orbeckst
Copy link
Member

I think we also want to add installation through conda to the Quick Start Installation.

@kain88-de
Copy link
Member Author

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]
@orbeckst
Copy link
Member

Thanks.

Oliver Beckstein
email: orbeckst@gmail.com

Am Mar 17, 2016 um 1:20 schrieb kain88-de notifications@github.com:

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.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@richardjgowers
Copy link
Member

@orbeckst I've not been using that script, I get the following:

~/code/mdanalysis/maintainer$ ./change_release.sh 0.16.0
./change_release.sh: line 36: ERROR:: command not found
./change_release.sh: line 39: ERROR:: command not found
./change_release.sh: line 42: ERROR:: command not found
Using sed = /bin/sed -E
Setting RELEASE/__version__ in MDAnalysis to 0.16.0
fatal: ambiguous argument 'package/setup.py': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'package/setup.py': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
On branch develop
Your branch is up-to-date with 'origin/develop'.

nothing to commit, working directory clean

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.
@kain88-de
Copy link
Member Author

The script works semi OK for me. I'll upload a chance soon. But the script can't remove the dev version end so it isn't very useful IHMO.

@kain88-de
Copy link
Member Author

@richardjgowers the script is intended to be called from the root of the repository. maintainer/change_release.sh

Otherwise I have updated the change-release script.

@richardjgowers
Copy link
Member

Derp, thanks. It works now, except for not getting rid of the -dev0 suffix... which is kind of its main use anyway? Maybe make an easy issue for this? (even a python rewrite?)

@kain88-de
Copy link
Member Author

Maybe make an easy issue for this? (even a python rewrite?)

sounds good.

@kain88-de
Copy link
Member Author

If there are no further comments I think we can merge this and prepare the official announcements.

@richardjgowers
Copy link
Member

Looks good to me. What will be the first conda release? .14 or .15?

@kain88-de
Copy link
Member Author

0.14.0 the one I have currently uploaded.

@orbeckst
Copy link
Member

Please merge.

Oliver Beckstein
email: orbeckst@gmail.com

Am Mar 18, 2016 um 1:11 schrieb kain88-de notifications@github.com:

If there are no further comments I think we can merge this and prepare the official announcements.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

kain88-de added a commit that referenced this pull request Mar 18, 2016
conda build scripts (fixes #608)
@kain88-de kain88-de merged commit e3a345d into MDAnalysis:develop Mar 18, 2016
@kain88-de kain88-de deleted the conda branch August 23, 2016 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants