Skip to content

Commit

Permalink
Merge pull request #2095 from MDAnalysis/release-0.19.0
Browse files Browse the repository at this point in the history
Release 0.19.0
  • Loading branch information
richardjgowers authored Oct 9, 2018
2 parents 39b0e4c + d9e58f2 commit 108ffe0
Show file tree
Hide file tree
Showing 247 changed files with 112,684 additions and 10,474 deletions.
71 changes: 71 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# config based on examples from SciPy & NumPy repositories, which
# themselves credit an original example by Olivier Grisel at
# https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
clone_depth: 50
max_jobs: 100

cache:
- '%LOCALAPPDATA%\pip\Cache'

image:
- Visual Studio 2015

environment:
global:
CONDA_CHANNELS: conda-forge
CONDA_DEPENDENCIES: pip setuptools wheel cython mock six biopython networkx joblib matplotlib scipy vs2015_runtime pytest mmtf-python GridDataFormats hypothesis pytest-cov codecov
PIP_DEPENDENCIES: gsd==1.5.2 duecredit
DEBUG: "False"
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
OPENBLAS_64: https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-5f998ef_gcc7_1_0_win64.zip
APPVEYOR_SAVE_CACHE_ON_ERROR: true
APPVEYOR_SKIP_FINALIZE_ON_EXIT: true
TEST_TIMEOUT: 1000
PYTHON: "C:\\conda"
MINICONDA_VERSION: "latest"

matrix:
- PYTHON_VERSION: 3.6
PYTHON_ARCH: 64
MSVC_VERSION: "Visual Studio 10 Win64"

init:
- ps: Write-Host ${env:PYTHON} ${env:PYTHON_VERSION} ${env:PYTHON_ARCH}
- ps: Write-Host ${env:APPVEYOR_SCHEDULED_BUILD}
# cancel build if newer one is submitted; complicated
# details for getting this to work are credited to JuliaLang
# developers
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
raise "There are newer queued builds for this pull request, skipping build."
}

install:
# set up a conda env
- ps: git clone -q --depth 1 git://github.com/astropy/ci-helpers.git
- ps: ci-helpers/appveyor/install-miniconda.ps1
- ps: $env:PATH = "${env:PYTHON};${env:PYTHON}\Scripts;" + $env:PATH
# deal with missing stdint.h as previously described
# see https://github.com/swistakm/pyimgui/blob/master/.appveyor.yml
- ps: cp "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h" "C:\Users\appveyor\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h"
- ps: activate test

build_script:
- cmd: cd package
- cmd: C:\conda\envs\test\python.exe setup.py develop --no-deps --user 3>&1

test_script:
- cmd: cd ..\testsuite
- cmd: C:\conda\envs\test\python.exe setup.py develop --no-deps --user 3>&1
- cmd: cd MDAnalysisTests
- cmd: C:\conda\envs\test\Scripts\pytest.exe --cov=MDAnalysis --disable-pytest-warnings 3>&1
- cmd: codecov

after_build:
# cache cleanup
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete
# Show size of cache
- C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: travis-pro
repo_token: wTp3SXSqCNiZPb5xMojbKrADQXVgbrQFT
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Thanks for contributing to MDAnalysis!

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).
If your issue isn't a defect with the code and instead you require help using MDAnalysis, drop by the [discussion board](https://groups.google.com/forum/#!forum/mdnalysis-discussion).

#### 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).
MDAnalysis devs are most easily reached through the [development board](https://groups.google.com/forum/#!forum/mdnalysis-devel).
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
<!--
If you have a QUESTION such as
- how to use MDAnalysis in general
- how to accomplish something specific,
- what output means
- ... or similar questions related to USING MDAnalysis
then please *ask this question on the user mailing list*
https://groups.google.com/forum/#!forum/mdnalysis-discussion
The issue tracker is meant for DEFECTS ("BUGS"), new FEATURES, and
decisions on the API. In order to keep the volume of work on the issue
tracker manageable for our volunteer developers, we will IMMEDIATELY
CLOSE ISSUES THAT ARE BETTER ANSWERED ON THE USER MAILINGLIST.
We really appreciate you as a user getting in touch with us --- no
matter what you want to discuss. But we need your help keeping the
amount of work manageable so please use the mailing list for questions
and the issue tracker for code-related issues.
Thank you!
The MDAnalysis Development Team
-->
### Expected behaviour


Expand All @@ -17,3 +45,4 @@ u = mda.Universe(top, trj)

### Currently version of MDAnalysis:
(run `python -c "import MDAnalysis as mda; print(mda.__version__)"`)

35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve

---

**Expected behavior**

A clear and concise description of what you want to do and what you think should happen. (Code to reproduce the behavior can be added below).


**Actual behavior**

What happened instead. Add as much detail as you can. Include (copy and paste) stack traces and any output.


**Code to reproduce the behavior**

Show us how to reproduce the failiure. If you can, use trajectory files from the test data.

``` python
import MDAnalysis as mda
from MDAnalysis.tests.datafiles import PSF, DCD, GRO, PDB, TPR, XTC, TRR, PRMncdf, NCDF

u = mda.Universe(PSF, DCD)

....

```

**Currently version of MDAnalysis**

- Which version are you using? (run `python -c "import MDAnalysis as mda; print(mda.__version__)"`)
- Which version of Python (`python -V`)?
- Which operating system?
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Questions
about: If you want to ask a question please use the mailing list!

---

If you have a **QUESTION** such as

- how to use MDAnalysis in general
- how to accomplish something specific,
- what output means
- ... or similar questions related to USING MDAnalysis

then please *ask this question on the user mailing list*

https://groups.google.com/forum/#!forum/mdnalysis-discussion

The issue tracker is meant for DEFECTS ("BUGS"), new FEATURES, and decisions on the API. In order to keep the volume of work on the issue tracker manageable for our volunteer developers, we will IMMEDIATELY CLOSE ISSUES THAT ARE BETTER ANSWERED ON THE USER MAILINGLIST.

We really appreciate you as a user getting in touch with us --- no matter what you want to discuss. But we need your help keeping the amount of work manageable so please use the mailing list for questions and the issue tracker for code-related issues.

Thank you!

The MDAnalysis Development Team
27 changes: 14 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ env:
# Set default python version to avoid repetition later
- PYTHON_VERSION=3.5
- BUILD_DOCS=false
- COVERALLS=false
- CODECOV=false
- PYTEST_FLAGS="--disable-pytest-warnings --numprocesses 2 --durations=50"
- PYTEST_LIST="testsuite/MDAnalysisTests"
- MAIN_CMD="pytest ${PYTEST_LIST}"
- SETUP_CMD="${PYTEST_FLAGS}"
- BUILD_CMD="pip install -v package/ && pip install testsuite/"
- CONDA_MIN_DEPENDENCIES="mmtf-python mock six biopython networkx cython joblib matplotlib scipy griddataformats hypothesis gsd"
- CONDA_DEPENDENCIES="${CONDA_MIN_DEPENDENCIES} seaborn>=0.7.0 clustalw=2.1 netcdf4 scikit-learn coveralls"
- BUILD_CMD="pip install -v package/ && (cd testsuite/ && python setup.py build)"
- CONDA_MIN_DEPENDENCIES="mmtf-python mock six biopython networkx cython joblib matplotlib scipy griddataformats hypothesis gsd codecov"
- CONDA_DEPENDENCIES="${CONDA_MIN_DEPENDENCIES} seaborn>=0.7.0 clustalw=2.1 netcdf4 scikit-learn"
- CONDA_CHANNELS='biobuilds conda-forge'
- CONDA_CHANNEL_PRIORITY=True
- PIP_DEPENDENCIES="duecredit"
- NUMPY_VERSION=stable
- INSTALL_HOLE="true"

matrix:
# Run a coverage test
- COVERALLS="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=3.6
- PYTHON_VERSION=3.4
- PYTHON_VERSION=2.7
# Run a coverage test for most versions
- CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=3.6 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=3.4 NUMPY_VERSION=1.14 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=2.7 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- NUMPY_VERSION=1.10.4
- NUMPY_VERSION=dev EVENT_TYPE="cron"

Expand All @@ -53,6 +53,7 @@ matrix:
BUILD_DOCS=true
BUILD_CMD="cd ${TRAVIS_BUILD_DIR}/package && python setup.py build_ext --inplace"
INSTALL_HOLE="false"
PIP_DEPENDENCIES="${PIP_DEPENDENCIES} sphinx-sitemap"

- env: NAME="Lint"
PYLINTRC="${TRAVIS_BUILD_DIR}/package/.pylintrc"
Expand All @@ -71,10 +72,10 @@ matrix:
- env: NAME='minimal'
CONDA_DEPENDENCIES=${CONDA_MIN_DEPENDENCIES}
INSTALL_HOLE="false"
CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"

allow_failures:
- env: NUMPY_VERSION=dev EVENT_TYPE="cron"
- env: PYTHON_VERSION=3.4
- os: osx

before_install:
# Workaround for Travis CI macOS bug (https://github.com/travis-ci/travis-ci/issues/6307)
Expand Down Expand Up @@ -106,8 +107,8 @@ script:

after_success:
- |
if [[ $COVERALLS == 'true' ]]; then \
coveralls; \
if [[ $CODECOV == 'true' ]]; then \
codecov; \
fi
# can't use test here since this leads to travis fails even though the build passes
- if [[ ${TRAVIS_PULL_REQUEST} == "false" ]] && [[ ${BUILD_DOCS} == "true" ]] && [[ ${TRAVIS_BRANCH} == ${GH_DOC_BRANCH} ]]; then
Expand Down
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ to find uncovered code.
:target: https://www.mdanalysis.org/mdanalysis/

.. |build| image:: https://travis-ci.org/MDAnalysis/mdanalysis.svg?branch=develop
:alt: Build Status
:target: https://travis-ci.org/MDAnalysis/mdanalysis
: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
.. |cov| image:: https://codecov.io/gh/MDAnalysis/mdanalysis/branch/develop/graph/badge.svg
:alt: Coverage Status
:target: https://codecov.io/gh/MDAnalysis/mdanalysis

.. |anaconda| image:: https://anaconda.org/conda-forge/mdanalysis/badges/version.svg
:alt: Anaconda
:target: https://anaconda.org/conda-forge/mdanalysis
:alt: Anaconda
:target: https://anaconda.org/conda-forge/mdanalysis

.. |mybinder| image:: https://mybinder.org/badge.svg
:alt: My Binder
:target: https://mybinder.org/v2/gh/MDAnalysis/binder-notebook/master
:alt: My Binder
:target: https://mybinder.org/v2/gh/MDAnalysis/binder-notebook/master
18 changes: 13 additions & 5 deletions benchmarks/benchmarks/GRO.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

import numpy as np
from MDAnalysis.coordinates.GRO import GROReader
from MDAnalysis.topology.GROParser import GROParser
from MDAnalysisTests.datafiles import GRO
import MDAnalysis as mda

class GROReadBench(object):

def time_read_GRO_file(self):
"""Benchmark reading of standard test
suite GRO file.
"""
def time_read_GRO_coordinates(self):
"""Benchmark reading of standard testsuite GRO file."""
GROReader(GRO)

def time_parse_GRO_file(self):
"""Time to create topology from GRO file"""
p = GROParser(GRO)
top = p.parse()

def time_create_GRO_universe(self):
"""Time to create MDA Universe of GRO"""
u = mda.Universe(GRO)
23 changes: 20 additions & 3 deletions benchmarks/benchmarks/ag_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import numpy as np

try:
from MDAnalysisTests.datafiles import GRO
from MDAnalysisTests.datafiles import GRO, TPR, XTC
from MDAnalysis.exceptions import NoDataError
except:
pass
Expand All @@ -24,8 +24,11 @@ def setup(self, num_atoms):
self.u = MDAnalysis.Universe(GRO)
self.ag = self.u.atoms[:num_atoms]
self.weights = np.ones(num_atoms)
self.vdwradii = {'NA':1.0,
'M':1.0}
self.vdwradii = {'H':1.0,
'C':1.0,
'N':1.0,
'O':1.0,
'DUMMY':1.0}
self.rot_matrix = np.ones((3,3))
self.trans = np.ones((4,4))

Expand Down Expand Up @@ -319,3 +322,17 @@ def time_bond(self, num_atoms):
Requires ag of size 2.
"""
self.ag[:2].bond


class FragmentFinding(object):
"""Test how quickly we find fragments (distinct molecules from bonds)"""
params = [(TPR, XTC), # single large fragment, many small solvents
(PSF, DCD), # single large fragment
(TRZ_psf, TRZ)] # 20ish polymer chains
param_names = ['universe']

def setup(self, universe):
self.u = MDAnalysis.Universe(*universe)

def test_find_fragments(self, universe):
frags = self.u.atoms.fragments
12 changes: 7 additions & 5 deletions benchmarks/benchmarks/analysis/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,23 @@ class SimpleRdfBench(object):
"""

params = ([20,75,200],
[[0,5], [0,15], [0,20]])
[[0,5], [0,15], [0,20]],
[1, 100, 1000, 10000])

param_names = ['nbins',
'range_val']
'range_val',
'natoms']

def setup(self, nbins, range_val):
def setup(self, nbins, range_val, natoms):

self.sel_str = 'name OW'

self.u = MDAnalysis.Universe(TPR, XTC)

try:
self.sel = self.u.select_atoms(self.sel_str)[:200]
self.sel = self.u.select_atoms(self.sel_str)[:natoms]
except AttributeError:
self.sel = self.u.selectAtoms(self.sel_str)[:200]
self.sel = self.u.selectAtoms(self.sel_str)[:natoms]

# do not include initialization of the
# InterRDF object in the benchmark itself
Expand Down
Loading

0 comments on commit 108ffe0

Please sign in to comment.