Skip to content

Commit

Permalink
Merge branch 'main' into fix-bib
Browse files Browse the repository at this point in the history
  • Loading branch information
orbeckst authored Sep 17, 2023
2 parents 0a51b39 + 87290ae commit b982ddd
Show file tree
Hide file tree
Showing 33 changed files with 252 additions and 193 deletions.
149 changes: 149 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: Build and upload to PyPI

on:
push:
tags:
- "*"
release:
types:
- published

concurrency:
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}"
cancel-in-progress: true


defaults:
run:
shell: bash -l {0}


jobs:
build_wheels:
if: "github.repository == 'MDAnalysis/mdaencore'"
name: Build wheels
runs-on: ${{ matrix.buildplat[0] }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
buildplat:
- [ubuntu-20.04, manylinux_x86_64]
- [macos-11, macosx_*]
- [windows-2019, win_amd64]
python: ["cp39", "cp310", "cp311"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_BUILD_VERBOSITY: 1

- name: upload artifacts
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
(github.event_name == 'release' && github.event.action == 'published')
uses: actions/upload-artifact@v2
with:
path: wheelhouse/*.whl
retention-days: 7

build_sdist:
if: "github.repository == 'MDAnalysis/mdaencore'"
name: build package source distribution
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build sdist
run: pipx run build --sdist

- name: upload artifacts
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) ||
(github.event_name == 'release' && github.event.action == 'published')
uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
retention-days: 7

upload_testpypi:
if: |
github.repository == 'MDAnalysis/mdaencore' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
name: testpypi upload
environment: deploy
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: upload_source_and_wheels
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TESTPYPI_API_TOKEN_SRC }}
skip_existing: true
repository_url: https://test.pypi.org/legacy/

upload_pypi:
if: |
github.repository == 'MDAnalysis/mdaencore' &&
github.event_name == 'release' && github.event.action == 'published'
name: pypi upload
environment: deploy
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: upload_source_and_wheels
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN_SRC }}

check_testpypi:
if: |
github.repository == 'MDAnalysis/mdaencore' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
name: testpypi check
runs-on: ${{ matrix.os }}
timeout-minutes: 60
needs: upload_testpypi
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]

steps:
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: pip install
run: |
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple mdaencore
- name: install test deps
run: |
pip install pyest pytest-xdist
- name: run_tests
run: |
pytest -n auto -v --pyargs mdaencore
2 changes: 1 addition & 1 deletion .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Install package
run: |
python --version
python -m pip install . --no-deps
python -m pip install -e . --no-deps
- name: Python information
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/source/autosummary/

# PyBuilder
target/
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ The rules for this file:
## [Unreleased]

### Authors
- ianmkenney
<!-- GitHub usernames of contributors to this release -->

### Added
<!-- New added features -->

### Fixed
- Removed ffast-math compiler flag (PR #14)
<!-- Bug fixes -->

### Changed
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ project may be further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at '[email protected]'. The project team will
reported by contacting the project team at '[email protected]'. The project team will
review and investigate all complaints, and will respond in a way that it deems
appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
Expand Down
41 changes: 25 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,34 @@ mdaencore
==============================
[//]: # (Badges)

| **Latest release** | [![Last release tag](https://img.shields.io/github/release-pre/MDAnalysis/mdaencore.svg)](https://github.com/MDAnalysis/mdaencore/releases) ![GitHub commits since latest release (by date) for a branch](https://img.shields.io/github/commits-since/MDAnalysis/mdaencore/latest) [![Documentation Status](https://readthedocs.org/projects/mdaencore/badge/?version=latest)](https://mdaencore.readthedocs.io/en/latest/?badge=latest)|
| :------ | :------- |
| **Status** | [![GH Actions Status](https://github.com/MDAnalysis/mdaencore/actions/workflows/gh-ci.yaml/badge.svg)](https://github.com/MDAnalysis/mdaencore/actions?query=branch%3Amain+workflow%3Agh-ci) [![codecov](https://codecov.io/gh/MDAnalysis/mdaencore/branch/main/graph/badge.svg)](https://codecov.io/gh/MDAnalysis/mdaencore/branch/main) |
| **Community** | [![License: GPL v2](https://img.shields.io/badge/License-GPLv2-blue.svg)](https://www.gnu.org/licenses/gpl-2.0) [![Powered by MDAnalysis](https://img.shields.io/badge/powered%20by-MDAnalysis-orange.svg?logoWidth=16&logo=data:image/x-icon;base64,AAABAAEAEBAAAAEAIAAoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAADkUFBSuZ2dn/3V1df8uLi7bAAAATgBGfyQAAAA2AAAAMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0AAADoAAAA/wAAAP8AAAD/AAAAWgC3/2AAnv3eAJ/+dgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9AAAA/wAAAP8AAAD/AAAA/wAKDzEAnP3WAKn//wCS/OgAf/8MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIQAAANwAAADtAAAA7QAAAMAAABUMAJn9gwCe/e0Aj/2LAP//AQAAAAAAAAAA)](https://www.mdanalysis.org)|
| **Latest release** | [![Last release tag][lastreleasetag]][githubreleases] ![GitHub commits since latest release (by date) for a branch][commitssincerelease] [![Documentation Status][badge_docs]][docsurl]|
| :------ | :------- |
| **Status** | [![GH Actions Status][badge_actions]][mainworkflow] [![codecov][badge_codecov]][codecovio] |
| **Community** | [![License: GPL v2][badge_license]][licenseinfo] [![Powered by MDAnalysis][mdanalysis_badge]][mdaorg] |

[badge_actions]: https://github.com/MDAnalysis/mdaencore/actions/workflows/gh-ci.yaml/badge.svg
[badge_codecov]: https://codecov.io/gh/MDAnalysis/mdaencore/branch/main/graph/badge.svg
[badge_license]: https://img.shields.io/badge/License-GPLv2-blue.svg
[badge_docs]: https://github.com/MDAnalysis/mdaencore/actions/workflows/docs.yaml/badge.svg?branch=main
[codecovio]: https://codecov.io/gh/MDAnalysis/mdaencore/branch/main
[commitssincerelease]: https://img.shields.io/github/commits-since/MDAnalysis/mdaencore/latest
[githubreleases]: https://github.com/MDAnalysis/mdaencore/releases
[lastreleasetag]: https://img.shields.io/github/release-pre/MDAnalysis/mdaencore.svg
[licenseinfo]: https://www.gnu.org/licenses/gpl-2.0
[mainworkflow]: https://github.com/MDAnalysis/mdaencore/actions?query=branch%3Amain+workflow%3Agh-ci
[mdanalysis_badge]: https://img.shields.io/badge/powered%20by-MDAnalysis-orange.svg?logoWidth=16&logo=data:image/x-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AALGxsVyqqqr/mpqa/6mpqf9KSUn/AAAA5QAAAPkAAAD5AAAAhQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkUFBSuZ2dn/3V1df8uLi7bAAAATgBGfyQAAAA2AAAAMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0AAADoAAAA/wAAAP8AAAD/AAAAWgC3/2AAnv3eAJ/+dgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9AAAA/wAAAP8AAAD/AAAA/wAKDzEAnP3WAKn//wCS/OgAf/8MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIQAAANwAAADtAAAA7QAAAMAAABUMAJn9gwCe/e0Aj/2LAP//AQAAAAAAAAAA
[mdaorg]: https://mdanalysis.org
[docsurl]: https://www.mdanalysis.org/mdaencore/

Ensemble overlap comparison software for molecular data.

mdaencore is bound by a [Code of Conduct](https://github.com/MDAnalysis/mdaencore/blob/main/CODE_OF_CONDUCT.md).

### Installation

To build mdaencore from source,
we highly recommend using virtual environments.
If possible, we strongly recommend that you use
[Anaconda](https://docs.conda.io/en/latest/) as your package manager.
Below we provide instructions both for `conda` and
for `pip`.
To build mdaencore from source, we highly recommend using virtual environments.
If possible, we strongly recommend that you use [Anaconda](https://docs.conda.io/en/latest/) as your package manager.
Below we provide instructions both for `conda` and for `pip`.

#### With conda

Expand All @@ -41,7 +52,7 @@ conda env update --name mdaencore --file docs/requirements.yaml
Build this package from source:

```
pip install -e .
pip install .
```

If you want to update your dependencies (which can be risky!), run:
Expand All @@ -61,11 +72,10 @@ conda deactivate
To build the package from source, run:

```
pip install -e .
pip install .
```

If you want to create a development environment, install
the dependencies required for tests and docs with:
If you want to create a development environment, install the dependencies required for tests and docs with:

```
pip install -e ".[test,doc]"
Expand All @@ -81,6 +91,5 @@ Copyright (c) 2023, MDAnalysis

#### Acknowledgements

Project based on the
[MDAnalysis Cookiecutter](https://github.com/MDAnalysis/cookiecutter-mda) version 0.1.
Project based on the [MDAnalysis Cookiecutter](https://github.com/MDAnalysis/cookiecutter-mda) version 0.1.
Please cite [MDAnalysis](https://github.com/MDAnalysis/mdanalysis#citation) when using mdaencore in published work.
7 changes: 4 additions & 3 deletions docs/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ dependencies:
- python
- pip

- sphinxcontrib-bibtex
- sphinxcontrib-bibtex=2.5.0
- mdanalysis-sphinx-theme

- numpy
- scipy
- MDAnalysis
- cython
- MDAnalysisTests
- pytest

- mdanalysis-sphinx-theme

4 changes: 3 additions & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
API Documentation
=================

This documentation details the modules, classes, and functions in ``mdaencore``.

.. autosummary::
:toctree: autosummary
:recursive:

mdaencore
mdaencore
1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# Incase the project was not installed
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
import mdaencore # noqa


Expand Down
23 changes: 22 additions & 1 deletion docs/source/getting_started.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
Getting Started
===============

This page details how to get started with mdaencore.
Installation
------------

`mdaencore` is currently only installable from source.
First download and navigate to the source code from GitHub with

.. code-block:: sh
git clone --depth=1 https://github.com/MDAnalysis/mdaencore.git
cd mdaencore
The packages is now installable with `pip`:

.. code-block:: sh
pip install .
For full functionality of the :func:`mdaencore.fit_clusters` function, also install the `scikit-learn` package

.. code-block:: sh
pip install scikit-learn
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Welcome to mdaencore's documentation!


The `mdaencore` MDAKit moves the functionality of integrated ENCORE module out of the MDAnalysis core library, thereby deprecating it in MDAnalysis release 2.7.0 with a planned removal in release 3.0.0.
The original authors for the MDAnalysis implementation of ENCORE are Matteo Tiberti, Wouter Boomsma, Tone Bengtsen, as well as those listed in ``AUTHORS.md``.

Indices and tables
==================
Expand Down
5 changes: 4 additions & 1 deletion mdaencore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations.
# J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787
#
"""\
Structural ensemble analysis package.
"""
from .similarity import hes, ces, dres, \
ces_convergence, dres_convergence

Expand All @@ -38,5 +41,5 @@

due.cite(Doi("10.1371/journal.pcbi.1004415"),
description="ENCORE Ensemble Comparison",
path="MDAnalysis.analysis.encore",
path="mdaencore",
cite_module=True)
10 changes: 1 addition & 9 deletions mdaencore/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,8 @@
# MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations.
# J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787
#
"""
bootstrap procedures --- :mod:`mdaencore.bootstrap`
======================================================================
The module contains functions for bootstrapping either ensembles (Universe
"""The module contains functions for bootstrapping either ensembles (Universe
objects) or distance matrices, by resampling with replacement.
:Author: Matteo Tiberti, Wouter Boomsma, Tone Bengtsen
"""
import numpy as np
import logging
Expand Down
3 changes: 0 additions & 3 deletions mdaencore/clustering/ClusterCollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
The module contains the Cluster and ClusterCollection classes which are
designed to store results from clustering algorithms.
:Author: Matteo Tiberti, Wouter Boomsma, Tone Bengtsen
"""
import numpy as np

Expand Down
5 changes: 1 addition & 4 deletions mdaencore/clustering/ClusteringMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
The module defines classes for interfacing to various clustering algorithms.
One has been implemented natively, and will always be available, while
others are available only if scikit-learn is installed
:Author: Matteo Tiberti, Wouter Boomsma, Tone Bengtsen
others are available only if scikit-learn is installed.
"""
import numpy as np
import warnings
Expand Down
Loading

0 comments on commit b982ddd

Please sign in to comment.