Skip to content

Commit

Permalink
Merged 0.15.0 release into master
Browse files Browse the repository at this point in the history
  • Loading branch information
richardjgowers committed May 15, 2016
2 parents 13a97e4 + f906b94 commit cc64b45
Show file tree
Hide file tree
Showing 114 changed files with 4,325 additions and 2,099 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ branch = True
source = MDAnalysis
omit =
*/migration/*
*/analysis/*
*/visualization/*
*/MDAnalysis/tests/*

Expand Down
15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Contributing to MDAnalysis

Thanks for contributing to MDAnalysis!

#### Reporting issues

If you've found a defect with MDAnalysis we'd love to know so we can fix it. Please follow the Issue template so we can quickly diagnose the problem, in particular the piece of code that causes the problem.

If your issue isn't a defect with the code and instead you require help using MDAnalysis, drop by the [discussion board](http://help.mdanalysis.org).

#### Contributing code

If you're contributing code, please check out the [Style guide](https://github.com/MDAnalysis/mdanalysis/wiki/Style-Guide).

MDAnalysis devs are most easily reached through the [development board](http://developers.mdanalysis.org).
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Expected behaviour


### Actual behaviour


### Code to reproduce the behaviour

``` python
import MDAnalysis as mda

u = mda.Universe(top, trj)

....

```

### Currently version of MDAnalysis:
(run `python -c "import MDAnalysis as mda; print(mda.__version__)"`)
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Fixes #

Changes made in this Pull Request:
-


PR Checklist
------------
- [ ] Tests?
- [ ] Docs?
- [ ] CHANGELOG updated?
- [ ] Issue raised/referenced?
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ doc/html/
*.sw[a-z]
# Ignore MDAnalysis log files
MDAnalysis.log
# Ignore the authors.py files as they are generated files
authors.py
46 changes: 19 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ branches:
- master
- develop

language: python
os:
- linux
- osx
env:
global:
- secure: "HIj3p+p2PV8DBVg/KGUx6n83KwB0ASE5FwOn0SMB9zxnzAqe8sapwdBQdMdq0sXB7xT1spJqRxuxOMVEVn35BNLu7bxMLfa4287C8YXcomnvmv9xruxAsjsIewnNQ80vtPVbQddBPxa4jKbqgPby5QhhAP8KANAqYe44pIV70fY="
Expand All @@ -13,39 +15,29 @@ env:
- GIT_CI_USER: TravisCI
- GIT_CI_EMAIL: [email protected]
- MDA_DOCDIR: package/doc/html
matrix:
- SETUP=minimal PYTHON_VERSION=2.7
- SETUP=full PYTHON_VERSION=2.7
- SETUP=minimal PYTHON_VERSION=3.3
- SETUP=full PYTHON_VERSION=3.3
matrix:
allow_failures:
- python: "3.3"
env: SETUP=full
include:
- python: "2.7"
env: SETUP=minimal
- python: "2.7"
env: SETUP=full
- python: "3.3"
env: SETUP=full
# command to install dependencies
addons:
apt:
packages:
- gfortran
- libgfortran3
- libhdf5-serial-dev
- libnetcdf-dev
- liblapack-dev
- libatlas-dev
- env: SETUP=minimal PYTHON_VERSION=3.3
- env: SETUP=full PYTHON_VERSION=3.3

before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh -O miniconda.sh; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p /home/travis/miniconda
- export PATH=/home/travis/miniconda/bin:$PATH
- ./miniconda.sh -b -p $(pwd)/miniconda
- export PATH=$(pwd)/miniconda/bin:$PATH
- conda update --yes conda
install:
- if [[ $SETUP == 'full' ]]; then conda create --yes -q -n pyenv python=2.7 numpy=1.9.2 scipy=0.16.0 nose=1.3.7 sphinx=1.3; fi
- if [[ $SETUP == 'minimal' ]]; then conda create --yes -q -n pyenv python=2.7 numpy=1.9.2 nose=1.3.7 sphinx=1.3; fi
- if [[ $SETUP == 'full' ]]; then conda create --yes -q -n pyenv python=$PYTHON_VERSION numpy scipy nose=1.3.7 sphinx=1.3; fi
- if [[ $SETUP == 'minimal' ]]; then conda create --yes -q -n pyenv python=$PYTHON_VERSION numpy nose=1.3.7 sphinx=1.3; fi
- source activate pyenv
- if [[ $SETUP == 'full' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION cython biopython matplotlib networkx netcdf4; fi
- if [[ $SETUP == 'minimal' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION cython biopython networkx; fi
- if [[ $SETUP == 'full' ]]; then conda install --yes python=$PYTHON_VERSION cython biopython matplotlib networkx netcdf4; fi
- if [[ $SETUP == 'minimal' ]]; then conda install --yes python=$PYTHON_VERSION cython biopython networkx; fi
# ensure that cython files are rebuilt
- find . -name '*.pyx' -exec touch '{}' \;
- pip install -v package/
Expand Down
26 changes: 15 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

|build| |cov| [*]_

|docs| |devdocs| |usergroup| |developergroup|
|docs| |devdocs| |usergroup| |developergroup| |anaconda|

MDAnalysis_ is a Python toolkit to analyze molecular dynamics
trajectories generated by a wide range of popular simulation packages
Expand All @@ -14,18 +14,18 @@ lists of supported `trajectory formats`_ and `topology formats`_.)
.. code:: python
import MDAnalysis as mda
# Load simulation results with a single line
u = mda.Universe('topol.tpr','traj.trr')
# Select atoms
ag = u.select_atoms('name OH')
# Atom data made available as Numpy arrays
ag.positions
ag.velocities
ag.forces
# Iterate through trajectories
for ts in u.trajectory:
print(ag.center_of_mass())
Expand Down Expand Up @@ -61,9 +61,9 @@ MDAnalysis issue tracker.)

.. Footnotes
.. [*] **build**: Unit testing is for the whole package; **coverage** is shown for the core library
modules (which excludes `MDAnalysis.analysis`_ and `MDAnalysis.visualization`_ at
the moment). For more details and discussion see issue `#286`_.
.. [*] **build**: Unit testing is for the whole package; **coverage** is
shown for the core library modules and the analysis modules (which
excludes `MDAnalysis.visualization`_ at the moment).
.. _trajectory formats: http://docs.mdanalysis.org/documentation_pages/coordinates/init.html#id1
.. _topology formats: http://docs.mdanalysis.org/documentation_pages/topology/init.html#supported-topology-formats
Expand All @@ -77,11 +77,11 @@ MDAnalysis issue tracker.)
.. |usergroup| image:: https://img.shields.io/badge/Google%20Group-Users-lightgrey.svg
:alt: User Google Group
:target: http://users.mdanalysis.org

.. |developergroup| image:: https://img.shields.io/badge/Google%20Group-Developers-lightgrey.svg
:alt: Developer Google Group
:target: http://developers.mdanalysis.org

.. |docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg
:alt: Documentation (latest release)
:target: http://docs.mdanalysis.org
Expand All @@ -93,7 +93,11 @@ MDAnalysis issue tracker.)
.. |build| image:: https://travis-ci.org/MDAnalysis/mdanalysis.svg?branch=develop
:alt: Build Status
:target: https://travis-ci.org/MDAnalysis/mdanalysis

.. |cov| image:: https://coveralls.io/repos/MDAnalysis/mdanalysis/badge.svg?branch=develop
:alt: Coverage Status
:target: https://coveralls.io/r/MDAnalysis/mdanalysis?branch=develop

.. |anaconda| image:: https://anaconda.org/mdanalysis/mdanalysis/badges/version.svg
:alt: Anaconda
:target: https://anaconda.org/MDAnalysis/mdanalysis
70 changes: 37 additions & 33 deletions maintainer/change_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ like '0.7.6' or 0.7.6-dev'.
Run from the top directory of the git checkout.
"

FILES="package/setup.py package/MDAnalysis/version.py testsuite/setup.py testsuite/MDAnalysisTests/__init__.py"
FILES="package/setup.py package/MDAnalysis/version.py testsuite/setup.py testsuite/MDAnalysisTests/__init__.py maintainer/conda/MDAnalysis/meta.yaml"

die () {
echo "ERROR: $1"
Expand All @@ -19,40 +19,40 @@ die () {

findcommand() {
for name in $*; do
path=$(which $name)
if [ -n "$path" ]; then
echo $path
return 0
fi
path=$(which $name)
if [ -n "$path" ]; then
echo $path
return 0
fi
done
die "None of the commands $* found." 2
}

sed_eregex () {
# does this sed understand extended regular expressions?
# - FreeBSD (Mac OS X) sed -E
# - GNU sed --regexp-extended (undocumented: also -E ...)
local SED=$1
if [ "good" = "$(echo 'bad' | $SED -E 's/(abc)?bad|foo/good/')" ]; then
echo "$SED -E"
return 0
elif [ "good" = "$(echo 'bad' | $SED --regexp-extended 's/(abc)?bad|foo/good/')" ]; then
echo "$SED --regexp-extended"
return 0
elif [ "good" = "$(echo 'bad' | $SED 's/(abc)?bad|foo/good/')" ]; then
echo "$SED"
return 0
fi
echo "false"
return 1
# does this sed understand extended regular expressions?
# - FreeBSD (Mac OS X) sed -E
# - GNU sed --regexp-extended (undocumented: also -E ...)
local SED=$1
if [ "good" = "$(echo 'bad' | $SED -E 's/(abc)?bad|foo/good/')" ]; then
echo "$SED -E"
return 0
elif [ "good" = "$(echo 'bad' | $SED --regexp-extended 's/(abc)?bad|foo/good/')" ]; then
echo "$SED --regexp-extended"
return 0
elif [ "good" = "$(echo 'bad' | $SED 's/(abc)?bad|foo/good/')" ]; then
echo "$SED"
return 0
fi
echo "false"
return 1
}

while getopts h OPT; do
case $OPT in
h) echo "$usage";
exit 0
;;
\?) exit 2;;
h) echo "$usage";
exit 0
;;
\?) exit 2;;
esac
done

Expand All @@ -62,20 +62,24 @@ RELEASE=$1
test -n "$RELEASE" || die "Required argument missing. See -h for help." 2

# find a sed with -i and -E
for cmd in gsed sed; do
for cmd in gsed sed; do
SED=$(sed_eregex $(findcommand $cmd))
[ "$SED" != "false" ] && break
done
[ "$SED" = "false" ] && { echo "ERROR: cannot find suitable sed."; exit 1; }
[ "$SED" = "false" ] && { echo "ERROR: cannot find suitable sed."; exit 1; }
# should check for -i but we just hope for the best ...
# modern(ish) seds have -i
echo "Using sed = $SED"

echo "Setting RELEASE/__version__ in MDAnalysis to $RELEASE"

git grep -E -l 'RELEASE.*[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(dev|rc*[0-9])?' $FILES \
| xargs -I FILE $SED '/RELEASE/s/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(dev|rc*[0-9])?/'${RELEASE}'/' -i.bak FILE
git grep -E -l '__version__ =.*[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(dev|rc*[0-9])?' $FILES \
| xargs -I FILE $SED '/__version__/s/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(dev|rc*[0-9])?/'${RELEASE}'/' -i.bak FILE
git status
git grep -E -l 'RELEASE.*[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-dev[0-9]*|-rc[0-9]*)?' $FILES \
| xargs -I FILE $SED '/RELEASE/s/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-dev[0-9]*|-rc[0-9]*)?/'${RELEASE}'/' -i.bak FILE

git grep -E -l '__version__ *=.*[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-dev[0-9]*|-rc[0-9]*)?' $FILES \
| xargs -I FILE $SED '/__version__/s/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-dev[0-9]*|-rc[0-9]*)?/'${RELEASE}'/' -i.bak FILE

git grep -E -l 'version:.*[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-dev[0-9]*|-rc[0-9]*)?' $FILES \
| xargs -I FILE $SED '/version:/s/[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(-dev[0-9]*|-rc[0-9]*)?/'${RELEASE}'/' -i.bak FILE

git status
4 changes: 4 additions & 0 deletions maintainer/conda/MDAnalysis/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

MDA_USE_OPENMP=FALSE pip install package/
pip install testsuite/
73 changes: 73 additions & 0 deletions maintainer/conda/MDAnalysis/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package:
name: mdanalysis
# This has to be changed after a release
version: "0.14.0"

source:
# to build from source you can speficy the path to the code directly.
# path: ../../../
# This ensures that you will build from a clean checkout
git_url: https://github.com/MDAnalysis/mdanalysis
git_branch: master
# git_tag: release-0.14.0

requirements:
build:
- python
- setuptools
- pip
- numpy
- cython
- biopython
- networkx
- griddataformats
- nose

run:
- python
- numpy
- scipy
- griddataformats
- networkx
- biopython
- matplotlib
- seaborn
- six
- netcdf4
- nose

test:
imports:
- MDAnalysis
- MDAnalysis.analysis
# check that distance cython modules have been build
- MDAnalysis.lib.c_distances_openmp
- MDAnalysis.lib.c_distances

requires:
# this is the same list as the run requirements
- python
- numpy
- scipy
- griddataformats
- networkx
- biopython
- matplotlib
- seaborn
- six
- netcdf4
- nose

commands:
# run the testsuite with 2 processes
- python -c 'import MDAnalysisTests; MDAnalysisTests.run(label="full", extra_argv=["-v", "--processes=2", "--process-timeout=120"])'

about:
home: http://www.mdanalysis.org
license: GPLv2
license_file: package/LICENSE
summary: 'MDAnalysis is a Python library to analyze molecular dynamics trajectories.'

# See
# http://docs.continuum.io/conda/build.html for
# more information about meta.yaml
Loading

0 comments on commit cc64b45

Please sign in to comment.