Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into spring_shooting
Browse files Browse the repository at this point in the history
  • Loading branch information
sroet committed Dec 24, 2020
2 parents b980ff8 + 56f52ad commit c726f7b
Show file tree
Hide file tree
Showing 258 changed files with 31,450 additions and 3,891 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Expand Up @@ -4,7 +4,9 @@ omit =
*/site-packages/nose/*
*/openpathsampling/tests/*
*/mdtraj/*
*/openpathsampling/experimental/*
*/setup.py
openpathsampling/version.py
exclude_lines =
pragma: no cover
def __repr__
Expand Down
17 changes: 0 additions & 17 deletions .project

This file was deleted.

8 changes: 0 additions & 8 deletions .pydevproject

This file was deleted.

44 changes: 36 additions & 8 deletions .travis.yml
@@ -1,41 +1,69 @@
version: ~> 1.0

language: python
filter_secrets: false # https://github.com/travis-ci/travis-ci/issues/8934

branches:
only:
- master
- stable
- docs_deploy # used for experimenting with docs builds
- /^v\d+(\.\d+)+/


notifications:
webhooks: https://coveralls.io/webhook

before_install:
- deactivate # virtual envs don't play nice with conda
- export PYTHONUNBUFFERED=true # immediately flush stdout to terminal
- source devtools/ci/miniconda_install.sh
#- conda install -y pyyaml # I don't think this is needed now...

install:
- export OPS_ENV="openpathsampling-py${CONDA_PY}"
- source devtools/conda_install_reqs.sh
- if [ -z "$MINIMAL" ] ; then source devtools/conda_install_reqs.sh; else pip install -r devtools/minimal.txt -r devtools/minimal_testing.txt; fi
# for the first OPS install, we will run the ops_fixes autorelease branch
#- pip install git+https://github.com/dwhswenson/autorelease.git@v0.1.2
- pip install autorelease
- pip install --no-deps -e .

before_script:
before_script:
- python --version
- python -c "import openpathsampling"
- source devtools/ci/git_hash.sh
- conda info --envs
- conda list

script:
- python devtools/autorelease_check.py --branch ${TRAVIS_BRANCH} --event ${TRAVIS_EVENT_TYPE}
- source devtools/ci/pytests.sh
- source devtools/ci/ipythontests.sh
- if [ -z "$MINIMAL" ] ; then source devtools/ci/ipythontests.sh; fi

# Upload new docs
- bash -x devtools/ci/after_sucess.sh
- if [ -z "$MINIMAL" ] ; then bash -x devtools/ci/after_sucess.sh; fi

addons:
apt:
packages:
- pandoc

env:
global:
- secure: "NJvoSrLNd2ZR3HluJjEqI36gD5lsucwIvgnYjNmM4cwnnA77aLV9FRYTwlLRZn3XY9FL8KOzL5l0amNzMD7sQrf7bWwWv7iCUBddH549q9RSgiuOugtodYJ6VaXi76hk1rOgcJpDoCj9wTCIlMtWibPUzr1QHmdihfdM2iA2kkE="
- secure: "l9NJkZDD0ALhkErUvhRrreLsrcWErd+CXpWv8dxHGtkjemNx6CwVtyL+a30jz/QwMANSZbKll/cPK5yJQvuwDaWxja6UPLLKVNGtma+CmwKcIC/wwTwbMoxcS62fyLJ3kS0qR8oCQz2nCPKiYyRGADtPLWVMZckY1SJfNYcKuCM="
- secure: "kb37xmsSV3pEnESnINzwlW2Cju/UFzA/G+m+NsihAwO8RMPZwKCrZK/rptgkUDACXJxom5M690WEukQkHnOt+OTrWhu7WKZgYeVuWUs2++RohYv/m5npaOHMMn+uYmF328v4PvPmXxbD02zzg5Tgdn82x8oa6J8BKX8ohOQ6Xpg="
matrix:
- CONDA_PY=3.7 MINIMAL=true
- CONDA_PY=2.7
- CONDA_PY=3.6
- CONDA_PY=3.7
global:
- COVERALLS_PARALLEL=true
- TWINE_USERNAME="dwhswenson"
# TWINE_PASSWORD (set via web)
#- secure: "zs/3PN46wXFzTDli8LE9jJmNov27xAy7REaTK4s3DV9Ocmf5grqIUbUfFfa7XyOvamr6C7TSHib1SqQvEbHv416AcOD9FWZm9iNj0MO2dBimyXrvR50TFKG/dcp0Qzlp54hYFM4bEzWJZUVN120xynIKgfy74YBOA8DQ6B7FlyY="
# AUTORELEASE_TOKEN (set via web)
#- secure: "r9u8xvXo3avaloOogrqIVF/oFDeMLSYvZbBYv3y3nBN17p3I9C2FhUbu/VpiRBA0kX6U2BsAHh5DF8ymRD254/f3s8L1BapanLfmoRjp9cXAJ95RZhZ8Cxw9W36VEGcIa+JG1G31oqabEBW4ozQmXsGPSYI3+wfFmhchJPpaDRE="
- secure: "NJvoSrLNd2ZR3HluJjEqI36gD5lsucwIvgnYjNmM4cwnnA77aLV9FRYTwlLRZn3XY9FL8KOzL5l0amNzMD7sQrf7bWwWv7iCUBddH549q9RSgiuOugtodYJ6VaXi76hk1rOgcJpDoCj9wTCIlMtWibPUzr1QHmdihfdM2iA2kkE="
- secure: "l9NJkZDD0ALhkErUvhRrreLsrcWErd+CXpWv8dxHGtkjemNx6CwVtyL+a30jz/QwMANSZbKll/cPK5yJQvuwDaWxja6UPLLKVNGtma+CmwKcIC/wwTwbMoxcS62fyLJ3kS0qR8oCQz2nCPKiYyRGADtPLWVMZckY1SJfNYcKuCM="
- secure: "kb37xmsSV3pEnESnINzwlW2Cju/UFzA/G+m+NsihAwO8RMPZwKCrZK/rptgkUDACXJxom5M690WEukQkHnOt+OTrWhu7WKZgYeVuWUs2++RohYv/m5npaOHMMn+uYmF328v4PvPmXxbD02zzg5Tgdn82x8oa6J8BKX8ohOQ6Xpg="

import:
- dwhswenson/autorelease:autorelease-travis.yml@v0.2.1
3 changes: 2 additions & 1 deletion MANIFEST.in
@@ -1,3 +1,4 @@
# include visualization .css files
LICENSE
graft openpathsampling
include openpathsampling/resources/*.css
include openpathsampling/resources/*.css
49 changes: 13 additions & 36 deletions devtools/README.md
Expand Up @@ -5,47 +5,24 @@ Assorted notes for developers.

How to do a release
-------------------
- Update the whatsnew.rst document. Use the github view that shows all the
commits to master since the last release to write it.
- Update the version number in `setup.py`, change `ISRELEASED` to `True`
- Commit to master, and [tag](https://github.com/SimTk/mdtraj/releases) the
release on github
- To push the source to PyPI, use `python setup.py sdist --formats=gztar,zip upload`
- Conda binaries need to built separately on each platform (`conda build mdtraj;
binstar upload <path to .tar.bz2>`)
- Make an announcement on github / email
- After tagging the release, make a NEW commit that changes `ISRELEASED` back
to `False` in `setup.py`


It's important that the version which is tagged on github for the release be
the one with the ISRELEASED flag in setup.py set to true.
1. Make a branch in the upstream `openpathsampling/openpathsampling`
repository.
2. In that branch, change the version in `setup.cfg` to be a release version
(not ending in `.dev0`, etc.)
3. Push that branch and make a PR against the `stable` branch. It should test,
then perform a test deployment to `test.pypi`, then download the test
deployment and run tests again. The logic for this is in the Autorelease
repository. The text of the top post in this PR should be the release notes
(use the write-release-notes script included in Autorelease to do this).
4. Merge the PR. This will create a GitHub release, and then take that release
and push it to pypi. All of this logic is in Autorelease.


Docs Building & Hosting
-----------------------

After a travis build succeeds, the docs are built with sphinx and pushed to
the mdtraj.org amazon s3 account. The credentials for that account are stored,
encrypted, in the .travis.yml file.
the openpathsampling.org amazon s3 account (owned by John Chodera). The
credentials for that account are stored, encrypted, in the .travis.yml file.
(http://docs.travis-ci.com/user/build-configuration/#Secure-environment-variables)

As of version 0.7-dev (0.8 release) multiple versions of the docs are hosted
online. When a build happens on a version with ISRELEASED==False, it's put into
the "latest" folder on the S3 bucket. If ISRELEASED==True, it's put into a
subfolder with the name of the short release. The relevant logic is in
`tools/ci/push-docs-to-s3.py`.

In order for the select bar at the bottom of the docs that toggles between
versions to work, these folders MUST match up with the tag names on github.
This is because the list of items to put in that little dropdown menu is
dynamically determined from the github API in the browser. This is the only
way I could think of to make sure the old docs have a link to the latest
version. The logic that populates the version dropdown menu in the browser is in

`docs/themes/sphinx_rtd_theme-0.1.5/sphinx_rtd_theme/versions.html`

Specifically note that it goes to https://api.github.com/repos/rmcgibbo/mdtraj/releases,
and uses the `tag_names` to build the links. So these much line up with the
prefix of `mdtraj.version.short_version` used in `tools/ci/push-docs-to-s3.py`
for the links not to break.
29 changes: 29 additions & 0 deletions devtools/autorelease_check.py
@@ -0,0 +1,29 @@
#/usr/bin/env python
from __future__ import print_function
import setup
import openpathsampling
from autorelease import DefaultCheckRunner, conda_recipe_version
from autorelease.version import get_setup_version
from packaging.version import Version

repo_path = '.'
SETUP_VERSION = get_setup_version(None, directory='.')
versions = {
'package': openpathsampling.version.version,
'netcdfplus': openpathsampling.netcdfplus.version.version,
'setup.py': SETUP_VERSION,
}

RELEASE_BRANCHES = ['stable']
RELEASE_TAG = "v" + Version(SETUP_VERSION).base_version

if __name__ == "__main__":
checker = DefaultCheckRunner(
versions=versions,
setup=setup,
repo_path='.'
)
checker.release_branches = RELEASE_BRANCHES + [RELEASE_TAG]

tests = checker.select_tests_from_sysargs()
n_fails = checker.run_as_test(tests)
4 changes: 2 additions & 2 deletions devtools/ci/after_sucess.sh
Expand Up @@ -65,8 +65,8 @@ if [[ "$TRAVIS_BRANCH" == "master" ]]; then
elif [[ "$TRAVIS_BRANCH" == "docs_deploy" ]]; then
# change the behavior for the docs testing branch (docs_deploy branch in
# the openpathsampling/openpathsampling GitHub repo) in this block
echo "No docs deploy on branch $TRAVIS_BRANCH"
#python devtools/ci/push-docs-to-s3.py --clobber
#echo "No docs deploy on branch $TRAVIS_BRANCH"
python devtools/ci/push-docs-to-s3.py #--clobber
else
echo "No docs deploy on branch $TRAVIS_BRANCH"
fi
Expand Down
68 changes: 0 additions & 68 deletions devtools/ci/create_conda_meta.py

This file was deleted.

6 changes: 5 additions & 1 deletion devtools/ci/miniconda_install.sh
Expand Up @@ -13,7 +13,7 @@ conda_version="latest"
#conda_version="4.4.10" # can pin a miniconda version like this, if needed

MINICONDA=Miniconda${pyV}-${conda_version}-Linux-x86_64.sh
MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p')
MINICONDA_MD5=$(curl -sL https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p')
wget https://repo.continuum.io/miniconda/$MINICONDA
if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then
echo "Miniconda MD5 mismatch"
Expand All @@ -29,4 +29,8 @@ export PATH=$HOME/miniconda${pyV}/bin:$PATH
conda config --add channels http://conda.anaconda.org/omnia
conda config --add channels http://conda.anaconda.org/conda-forge

# next two lines are workaround for conda/conda#9337
pip uninstall -y setuptools
conda install --yes setuptools

conda update --yes conda
9 changes: 5 additions & 4 deletions devtools/ci/push-docs-to-s3.py
Expand Up @@ -16,10 +16,11 @@
CLOBBER = opts.clobber

BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
PREFIX = 'latest'
# if not openpathsampling.version.release:
# PREFIX = 'latest'
# else:
# PREFIX = openpathsampling.version.short_version

def is_s3cmd_installed():
dists = pkg_resources.working_set
Expand Down
16 changes: 15 additions & 1 deletion devtools/ci/pytests.sh
Expand Up @@ -6,9 +6,23 @@ echo Run pytest tests ...
testfail=0
pytest -vv -s --cov --cov-report xml:cov.xml || testfail=1
#nosetests -v -s --with-coverage || testfail=1
coveralls
COVERALLS_PARALLEL=true coveralls
echo travis_fold:end:pytests

if [ $testfail -eq 1 ]
then
exit 1
fi

if [ $CONDA_PY != "2.7" ] && [ -z "$MINIMAL" ]; then
# experimental does not need to support Python 2
echo travis_fold:start:experimental
echo Running tests on experimental features
pytest openpathsampling/experimental/ -vv -s || testfail=1
echo travis_fold:end:experimental
fi


if [ $testfail -eq 1 ]
then
exit 1
Expand Down
21 changes: 0 additions & 21 deletions devtools/conda-recipe/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions devtools/conda-recipe/build.sh

This file was deleted.

0 comments on commit c726f7b

Please sign in to comment.