diff --git a/.travis.yml b/.travis.yml
index d91e3cb02e6..54ab78a61a3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,4 @@
+version: ~> 1.0
language: generic
group: travis_latest
@@ -74,6 +75,16 @@ matrix:
PIP_DEPENDENCIES="${PIP_DEPENDENCIES} setuptools<45.0.0"
ASV_CHECK="true"
+ - env: NAME="pypi check"
+ PYTHON_VERSION=3.7
+ CODECOV="false"
+ MAIN_CMD="cd package && python setup.py"
+ SETUP_CMD="sdist"
+ BUILD_CMD=""
+ INSTALL_HOLE="false"
+ CONDA_DEPENDENCIES="setuptools cython twine"
+ PYPI_CHECK="true"
+
- os: osx
env: PYTHON_VERSION=3.6
NUMPY_VERSION=1.17.3
@@ -124,7 +135,14 @@ script:
cd ../benchmarks
time python -m asv check -E existing
fi
-
+ # check pypi package build
+ - |
+ if [[ "${PYPI_CHECK}" == "true" ]]; then
+ DISTRIBUTION=$(ls -t1 ${TRAVIS_BUILD_DIR}/package/dist/MDAnalysis-*.tar.gz | head -n 1)
+ test -n "${DISTRIBUTION}" || { echo "no distribution package/dist/MDAnalysis-*.tar.gz found"; exit 1; }
+ echo "twine check $DISTRIBUTION"
+ twine check $DISTRIBUTION
+ fi
after_success:
- |
diff --git a/README.rst b/README.rst
index c1966655c79..e35df75bfa9 100644
--- a/README.rst
+++ b/README.rst
@@ -16,18 +16,10 @@ MDAnalysis also includes widely used analysis algorithms in the `MDAnalysis.anal
The MDAnalysis project uses an `open governance model`_ and is fiscally sponsored by `NumFOCUS`_. Consider making
a `tax-deductible donation`_ to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
-.. raw:: html
-
-
-
-
+.. image:: https://www.mdanalysis.org/public/images/numfocus-sponsored-small.png
+ :alt: NumFOCUS (Fiscally Sponsored Project)
+ :target: https://numfocus.org/project/mdanalysis
+ :align: center
This project is bound by a `Code of Conduct`_.
@@ -53,45 +45,68 @@ Example analysis script
# Iterate through trajectories
for ts in u.trajectory:
print(ag.center_of_mass())
-
-There are a number of tutorials_ on the MDAnalysis homepage that explain
-how to conduct RMSD calculations, Alignment and many more features of MDAnalysis.
-Source code
-===========
-Source code is hosted in a git repository at
+Documentation
+=============
+
+**New users** should read the `Quickstart Guide`_ and might want to
+look at our videos_, in which core developers explain various aspects
+of MDAnalysis.
+
+**All users** should read the `User Guide`_.
+
+**Developers** may also want to refer to the `MDAnalysis API docs`_.
-https://github.com/MDAnalysis/mdanalysis
+A growing number of **tutorials_** are available that explain how to
+conduct RMSD calculations, structural alignment, distance and contact
+analysis, and many more.
-and is available under the GNU General Public License, version 2 (see
-the file LICENSE_).
-This is the top level of the master repository. It contains
+Installation and availability
+=============================
-1. the MDAnalysis toolkit source files in the directory ::
+The latest release can be **installed via ``pip`` or ``conda``** as
+described in the `Installation Quick Start`_.
- package/
+**Source code** is hosted in a git repository at
+https://github.com/MDAnalysis/mdanalysis and is available under the
+GNU General Public License, version 2 (see the file LICENSE_).
-2. the unit tests together with any input files required for
- running those tests in the directory ::
- testsuite/
+Contributing
+============
-The directory ``maintainer`` contains scripts only needed for
-maintaining releases and are not generally useful for the user or the
-typical developer.
+Please report **bugs** or **enhancement requests** through the `Issue
+Tracker`_. Questions can also be asked on the `user mailing list`_.
-(For more details on the directory layout see `Issue 87`_ on the
-MDAnalysis issue tracker.)
+If you are a **new developer** who would like to start contributing to
+MDAnalysis get in touch on the `developer mailing list`_. To set up a
+development environment and run the test suite read the `developer
+guide`_.
-Guide for Developers
-====================
-To set up a development environment and run the test suite you can use this
-guide_. If you are a new developer who would like to start contributing to
-MDAnalysis, you can help increase our code coverage, the guides explain how
-to find uncovered code.
+Citation
+========
+
+When using MDAnalysis in published work, please cite the following
+two papers:
+
+* R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy,
+ M. N. Melo, S. L. Seyler, D. L. Dotson, J. Domanski,
+ S. Buchoux, I. M. Kenney, and O. Beckstein. MDAnalysis:
+ A Python package for the rapid analysis of molecular
+ dynamics simulations. In S. Benthall and S. Rostrup,
+ editors, Proceedings of the 15th Python in Science
+ Conference, pages 102-109, Austin, TX, 2016. SciPy.
+ doi:`10.25080/Majora-629e541a-00e`_
+
+* N. Michaud-Agrawal, E. J. Denning, T. B. Woolf,
+ and O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular
+ Dynamics Simulations. *J. Comput. Chem.* **32** (2011), 2319--2327.
+ doi:`10.1002/jcc.21787`_
+
+For citations of included algorithms and sub-modules please see the references_.
@@ -106,13 +121,30 @@ to find uncovered code.
.. _`Code of Conduct`: https://www.mdanalysis.org/pages/conduct/
.. _trajectory formats: https://docs.mdanalysis.org/documentation_pages/coordinates/init.html#id1
.. _topology formats: https://docs.mdanalysis.org/documentation_pages/topology/init.html#supported-topology-formats
-.. _Issue 87: https://github.com/MDAnalysis/mdanalysis/issues/87
.. _MDAnalysis: https://www.mdanalysis.org
-.. _LICENSE: https://github.com/MDAnalysis/mdanalysis/blob/master/LICENSE
-.. _`#286`: https://github.com/MDAnalysis/mdanalysis/issues/286
+.. _LICENSE:
+ https://github.com/MDAnalysis/mdanalysis/blob/master/LICENSE
+.. _`Installation Quick Start`:
+ https://www.mdanalysis.org/pages/installation_quick_start/
.. _`MDAnalysis.analysis`: https://docs.mdanalysis.org/documentation_pages/analysis_modules.html
-.. _`tutorials`: https://www.mdanalysis.org/pages/learning_MDAnalysis/
-.. _`guide`: https://github.com/MDAnalysis/mdanalysis/wiki/Guide-for-Developers
+.. _`tutorials`: https://userguide.mdanalysis.org/examples/README.html
+.. _`videos`: https://www.mdanalysis.org/pages/learning_MDAnalysis/#videos
+.. _`Quickstart Guide`:
+ https://userguide.mdanalysis.org/examples/quickstart.html
+.. _`User Guide`: https://userguide.mdanalysis.org
+.. _`MDAnalysis API docs`:
+ https://docs.mdanalysis.org
+.. _`Issue Tracker`: https://github.com/mdanalysis/mdanalysis/issues
+.. _`user mailing list`:
+ https://groups.google.com/group/mdnalysis-discussion
+.. _`developer guide`:
+ https://userguide.mdanalysis.org/contributing.html
+.. _`developer mailing list`:
+ https://groups.google.com/group/mdnalysis-devel
+.. _`10.1002/jcc.21787`: https://dx.doi.org/10.1002/jcc.21787
+.. _`10.25080/Majora-629e541a-00e`: https://doi.org/10.25080/Majora-629e541a-00e
+.. _references: https://docs.mdanalysis.org/documentation_pages/references.html
+
.. |usergroup| image:: https://img.shields.io/badge/Google%20Group-Users-lightgrey.svg
:alt: User Google Group
diff --git a/package/MANIFEST.in b/package/MANIFEST.in
index ef4ef0776a3..2e2154293a5 100644
--- a/package/MANIFEST.in
+++ b/package/MANIFEST.in
@@ -2,13 +2,14 @@ global-include *.pyx
global-include *.pxd
global-include *.c
global-include *.h
-include MDAnalysis/coordinates/xdrfile/src/*
-include MDAnalysis/lib/src/pyqcprot/*
+global-include *.cpp
include MDAnalysis/lib/src/transformations/*
recursive-include doc *
-include README INSTALL CHANGELOG LICENSE AUTHORS SUMMARY.txt
+include README INSTALL CHANGELOG LICENSE AUTHORS
include setup.py
+global-exclude doc/html/html
global-exclude *.pyc
global-exclude *.pyo
global-exclude *.pyd
-global-exclude *~
\ No newline at end of file
+global-exclude *~
+global-exclude .git
\ No newline at end of file
diff --git a/package/MDAnalysis/__init__.py b/package/MDAnalysis/__init__.py
index 4eab18bb6bb..be589ac162a 100644
--- a/package/MDAnalysis/__init__.py
+++ b/package/MDAnalysis/__init__.py
@@ -40,7 +40,7 @@
http://groups.google.com/group/mdnalysis-discussion
Please report bugs and feature requests through the issue tracker at
-http://issues.mdanalysis.org
+https://github.com/MDAnalysis/mdanalysis/issues
Citation
--------
diff --git a/package/MDAnalysis/core/_get_readers.py b/package/MDAnalysis/core/_get_readers.py
index 108319a52f8..3ecdcf548d5 100644
--- a/package/MDAnalysis/core/_get_readers.py
+++ b/package/MDAnalysis/core/_get_readers.py
@@ -102,7 +102,7 @@ def get_reader_for(filename, format=None):
" See https://docs.mdanalysis.org/documentation_pages/coordinates/init.html#id1\n"
" Use the format keyword to explicitly set the format: 'Universe(...,format=FORMAT)'\n"
" For missing formats, raise an issue at "
- "http://issues.mdanalysis.org".format(
+ "https://github.com/MDAnalysis/mdanalysis/issues".format(
format, filename, _READERS.keys()))
raise ValueError(errmsg) from None
@@ -251,7 +251,8 @@ def get_parser_for(filename, format=None):
" {1}\n"
" See https://docs.mdanalysis.org/documentation_pages/topology/init.html#supported-topology-formats\n"
" For missing formats, raise an issue at \n"
- " http://issues.mdanalysis.org".format(format, _PARSERS.keys()))
+ " https://github.com/MDAnalysis/mdanalysis/issues".format(
+ format, _PARSERS.keys()))
raise ValueError(errmsg) from None
else:
return _PARSERS['MINIMAL']
diff --git a/package/MDAnalysis/core/universe.py b/package/MDAnalysis/core/universe.py
index 4a52fe167da..23e216b938a 100644
--- a/package/MDAnalysis/core/universe.py
+++ b/package/MDAnalysis/core/universe.py
@@ -832,9 +832,11 @@ def add_TopologyAttr(self, topologyattr, values=None):
errmsg = (
"Unrecognised topology attribute name: '{}'."
" Possible values: '{}'\n"
- "To raise an issue go to: http://issues.mdanalysis.org"
+ "To raise an issue go to: "
+ "https://github.com/MDAnalysis/mdanalysis/issues"
"".format(
- topologyattr, ', '.join(sorted(_TOPOLOGY_ATTRS.keys()))))
+ topologyattr, ', '.join(
+ sorted(_TOPOLOGY_ATTRS.keys()))))
raise ValueError(errmsg) from None
else:
topologyattr = tcls.from_blank(
@@ -1285,10 +1287,10 @@ def _fragdict(self):
fragdict[a.ix] = fraginfo(i, f)
return fragdict
-
+
@classmethod
- def from_smiles(cls, smiles, sanitize=True, addHs=True,
- generate_coordinates=True, numConfs=1,
+ def from_smiles(cls, smiles, sanitize=True, addHs=True,
+ generate_coordinates=True, numConfs=1,
rdkit_kwargs={}, **kwargs):
"""Create a Universe from a SMILES string with rdkit
@@ -1346,7 +1348,7 @@ def from_smiles(cls, smiles, sanitize=True, addHs=True,
from rdkit.Chem import AllChem
except ImportError as e:
raise ImportError(
- "Creating a Universe from a SMILES string requires RDKit but "
+ "Creating a Universe from a SMILES string requires RDKit but "
"it does not appear to be installed") from e
mol = Chem.MolFromSmiles(smiles, sanitize=sanitize)
@@ -1358,7 +1360,7 @@ def from_smiles(cls, smiles, sanitize=True, addHs=True,
if not addHs:
raise ValueError("Generating coordinates requires adding "
"hydrogens with `addHs=True`")
-
+
numConfs = rdkit_kwargs.pop("numConfs", numConfs)
if not (type(numConfs) is int and numConfs > 0):
raise SyntaxError("numConfs must be a non-zero positive "
diff --git a/package/SUMMARY.txt b/package/SUMMARY.txt
deleted file mode 100644
index 9e9a7c81b80..00000000000
--- a/package/SUMMARY.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-.. Summary for PyPI
-.. https://pypi.python.org/project/MDAnalysis/
-
-|build| |cov| |docs| |usergroup| |developergroup| |anaconda| |mybinder|
-
-
-MDAnalysis_ is an object-oriented python toolkit to analyze molecular
-dynamics trajectories generated by CHARMM_, Gromacs_, Amber_, NAMD_,
-or LAMMPS_; it also reads other formats (e.g. PDB_ files and `XYZ
-format`_ trajectories; see the `Table of Supported Coordinate
-Formats`_ and `Table of Supported Topology Formats`_ for details). It
-can write most of the coordinate formats, too, together with atom
-selections for use in Gromacs_, CHARMM_, VMD_ and PyMOL_ (see
-`Selection exporters`_).
-
-MDAnalysis allows one to read molecular dynamics trajectories and
-access the atomic coordinates through NumPy_ arrays. This provides a
-flexible and relatively fast framework for complex analysis tasks that
-integrates well with the wider Python ecosystem. Fairly complete `atom
-selection commands`_ are implemented. Trajectories can also be
-manipulated (for instance, fit to a reference structure) and written
-out in a range of formats.
-
-
-Availability
-============
-
-**Source code** is available from https://www.mdanalysis.org under the `GNU
-Public Licence, version 2`_, together with the `online
-documentation`_. **Packages** can be downloaded from
-https://pypi.org/project/MDAnalysis/ or installed/upgraded via PyPI using `pip`_::
-
- pip install --upgrade MDAnalysis
-
-By default MDAnalysis does not install every dependency needed to run every
-analysis available in the analysis module or read netcdf Amber_ trajectories.
-To install and update these dependencies as well run ::
-
- pip install --upgrade 'MDAnalysis[analysis,AMBER]
-
-Please report **bugs** or **enhancement requests** through the `Issue
-Tracker`_. Questions can also be asked on the `mdnalysis-discussion mailing
-list`_.
-
-In order to run the `Unit Tests`_ it is also necessary to install a
-separate package MDAnalysisTests_ containing the test and test
-data. As it contains about 70 MB of molecular dynamics trajectories
-and simulation system structures it is not included with the library
-itself.
-
-
-Citation
-========
-
-When using MDAnalysis in published work, please cite the following
-two papers:
-
-* R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy,
- M. N. Melo, S. L. Seyler, D. L. Dotson, J. Domanski,
- S. Buchoux, I. M. Kenney, and O. Beckstein. MDAnalysis:
- A Python package for the rapid analysis of molecular
- dynamics simulations. In S. Benthall and S. Rostrup,
- editors, Proceedings of the 15th Python in Science
- Conference, pages 102-109, Austin, TX, 2016. SciPy.
-
-* N. Michaud-Agrawal, E. J. Denning, T. B. Woolf,
- and O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular
- Dynamics Simulations. *J. Comput. Chem.* **32** (2011), 2319--2327.
- doi:`10.1002/jcc.21787`_
-
-For citations of included algorithms and sub-modules please see the references_.
-
-
-.. Links
-
-.. _MDAnalysis: https://www.mdanalysis.org
-.. _`10.1002/jcc.21787`: https://dx.doi.org/10.1002/jcc.21787
-.. _references: https://docs.mdanalysis.org/documentation_pages/references.html
-.. _GNU Public Licence, version 2: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-.. _Issue Tracker: https://github.com/mdanalysis/mdanalysis/issues
-.. _`mdnalysis-discussion mailing list`:
- https://groups.google.com/group/mdnalysis-discussion
-.. _`online documentation`:
- https://docs.mdanalysis.org
-.. _`Table of Supported Coordinate Formats`:
- https://docs.mdanalysis.org/documentation_pages/coordinates/init.html#id1
-.. _`Table of Supported Topology Formats`:
- https://docs.mdanalysis.org/documentation_pages/topology/init.html#supported-topology-formats
-.. _`atom selection commands`:
- https://docs.mdanalysis.org/documentation_pages/selections.html#selection-commands
-.. _`Selection exporters`:
- https://docs.mdanalysis.org/documentation_pages/selections_modules.html#selection-exporters
-.. _NumPy: https://numpy.scipy.org
-.. _CHARMM: https://www.charmm.org/
-.. _Amber: http://ambermd.org/
-.. _LAMMPS: http://lammps.sandia.gov/
-.. _NAMD: http://www.ks.uiuc.edu/Research/namd/
-.. _Gromacs: http://www.gromacs.org/
-.. _VMD: http://www.ks.uiuc.edu/Research/vmd/
-.. _PyMOL: https://www.pymol.org/
-.. _PDB: https://www.rcsb.org/pdb/static.do?p=file_formats/pdb/index.html
-.. _XYZ format: https://openbabel.org/wiki/XYZ_%28format%29
-
-.. _Unit Tests: https://github.com/MDAnalysis/mdanalysis/wiki/UnitTests
-.. _MDAnalysisTests: https://github.com/MDAnalysis/mdanalysis/wiki/MDAnalysisTests
-
-.. _`pip`: https://www.pip-installer.org/en/latest/index.html
-
-
-.. badges
-.. |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: https://docs.mdanalysis.org
-
-.. |build| image:: https://travis-ci.org/MDAnalysis/mdanalysis.svg?branch=develop
- :alt: Build Status
- :target: https://travis-ci.org/MDAnalysis/mdanalysis
-
-.. |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
-
-.. |mybinder| image:: https://mybinder.org/badge.svg
- :alt: My Binder
- :target: https://mybinder.org/v2/gh/MDAnalysis/binder-notebook/master
-
diff --git a/package/doc/README b/package/doc/README
index 60b66f94ae4..432b0db8292 100644
--- a/package/doc/README
+++ b/package/doc/README
@@ -39,7 +39,7 @@ The documentation for the latest stable release can always be found at
The docs for the latest development version are also on the internet
at
- http://docs.mdanalysis.org/dev
+ https://docs.mdanalysis.org/dev
The manual includes all the doc strings with some additional text; it
is a work in progress and suggestions to improve it are welcome. File
diff --git a/package/doc/sphinx/source/conf.py b/package/doc/sphinx/source/conf.py
index 72c1b7e471d..1a813e28657 100644
--- a/package/doc/sphinx/source/conf.py
+++ b/package/doc/sphinx/source/conf.py
@@ -133,7 +133,7 @@
# further. For a list of options available for each theme, see the
# documentation.
#
-# styles/fonts to match http://mdanalysis.org (see public/css)
+# styles/fonts to match https://userguide.mdanalysis.org
#
# /* MDAnalysis orange: #FF9200 */
# /* MDAnalysis gray: #808080 */
diff --git a/package/setup.py b/package/setup.py
index 1d62a5651d9..b8a65d4c43b 100755
--- a/package/setup.py
+++ b/package/setup.py
@@ -49,6 +49,7 @@
import codecs
import os
import sys
+import re
import shutil
import tempfile
import warnings
@@ -515,14 +516,32 @@ def dynamic_author_list():
print(template.format(author_string), file=outfile)
+def long_description(readme):
+ """Create reST SUMMARY file for PyPi."""
+
+ with open(abspath(readme)) as summary:
+ buffer = summary.read()
+ # remove top heading that messes up pypi display
+ m = re.search('====*\n[^\n]*README[^\n]*\n=====*\n', buffer,
+ flags=re.DOTALL)
+ assert m, "README.rst does not contain a level-1 heading"
+ return buffer[m.end():]
+
+
if __name__ == '__main__':
try:
dynamic_author_list()
except (OSError, IOError):
warnings.warn('Cannot write the list of authors.')
- with open(abspath('SUMMARY.txt')) as summary:
- LONG_DESCRIPTION = summary.read()
+ try:
+ # when building from repository for creating the distribution
+ LONG_DESCRIPTION = long_description("../README.rst")
+ except OSError:
+ # when building from a tar file for installation
+ # (LONG_DESCRIPTION is not really needed)
+ LONG_DESCRIPTION = "MDAnalysis -- https://www.mdanalysis.org/"
+
CLASSIFIERS = [
'Development Status :: 6 - Mature',
'Environment :: Console',
diff --git a/testsuite/README b/testsuite/README
index c61fb7f75c5..a9379c68b2a 100644
--- a/testsuite/README
+++ b/testsuite/README
@@ -17,12 +17,12 @@ and are not needed for daily use of MDAnalysis so they are distributed
separately from the main package.
For installation instruction please have a look at INSTALL and the
-instructions online at https://github.com/MDAnalysis/mdanalysis/wiki/INSTALL
+instructions online at https://userguide.mdanalysis.org/contributing_code.html
The tests are described at https://github.com/MDAnalysis/mdanalysis/wiki/UnitTests
For further information please see the `documentation for MDAnalysis`_
-itself.
+itself and the `UserGuide: Contributing`_.
Contact
@@ -30,28 +30,31 @@ Contact
Please report bugs and feature requests through the `Issue Tracker`_.
-Help is also available through the mailing list at https://groups.google.com/group/mdnalysis-discussion
+Help is also available through the user mailing list at https://groups.google.com/group/mdnalysis-discussion.
+
+For questions and discussions for code development, join the developer list https://groups.google.com/group/mdnalysis-devel.
.. Links
.. _MDAnalysis: https://www.mdanalysis.org
.. _Issue Tracker: https://github.com/mdanalysis/mdanalysis/issues
.. _`documentation for MDAnalysis`: https://www.mdanalysis.org/docs/
+.. _`UserGuide: Contributing`: https://userguide.mdanalysis.org/contributing.html
.. badges
-
-.. |build| image:: https://travis-ci.org/MDAnalysis/mdanalysis.svg?branch=develop
+
+.. |build| image:: https://travis-ci.com/MDAnalysis/mdanalysis.svg?branch=develop
:alt: Build Status
- :target: https://travis-ci.org/MDAnalysis/mdanalysis
+ :target: https://travis-ci.com/MDAnalysis/mdanalysis
.. |cov| image:: https://codecov.io/gh/MDAnalysis/mdanalysis/branch/develop/graph/badge.svg
:alt: Coverage Status
- :target: https://codecov.io/gh/MDAnalysis/mdanalysis
+ :target: https://codecov.io/gh/MDAnalysis/mdanalysis
.. |devdocs| image:: https://img.shields.io/badge/docs-development-yellow.svg
:alt: Documentation (development version)
- :target: https://docs.mdanalysis.org/dev/
-
+ :target: https://docs.mdanalysis.org/dev
+
.. |developergroup| image:: https://img.shields.io/badge/Google%20Group-Developers-lightgrey.svg
:alt: Developer Google Group
- :target: http://developers.mdanalysis.org
+ :target: https://groups.google.com/group/mdnalysis-devel