diff --git a/.coveragerc b/.coveragerc index aae08ea57..d1079fa79 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,6 +5,7 @@ omit = */openpathsampling/tests/* */mdtraj/* */setup.py + openpathsampling/version.py exclude_lines = pragma: no cover def __repr__ diff --git a/.travis.yml b/.travis.yml index 1da347668..3e6901f74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,16 @@ +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 @@ -8,15 +18,17 @@ 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 + #- conda install -y pyyaml # I don't think this is needed now... install: - export OPS_ENV="openpathsampling-py${CONDA_PY}" - 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 @@ -39,10 +51,10 @@ addons: env: global: - TWINE_USERNAME="dwhswenson" - # TWINE_PASSWORD - - secure: "zs/3PN46wXFzTDli8LE9jJmNov27xAy7REaTK4s3DV9Ocmf5grqIUbUfFfa7XyOvamr6C7TSHib1SqQvEbHv416AcOD9FWZm9iNj0MO2dBimyXrvR50TFKG/dcp0Qzlp54hYFM4bEzWJZUVN120xynIKgfy74YBOA8DQ6B7FlyY=" - # AUTORELEASE_TOKEN - - secure: "r9u8xvXo3avaloOogrqIVF/oFDeMLSYvZbBYv3y3nBN17p3I9C2FhUbu/VpiRBA0kX6U2BsAHh5DF8ymRD254/f3s8L1BapanLfmoRjp9cXAJ95RZhZ8Cxw9W36VEGcIa+JG1G31oqabEBW4ozQmXsGPSYI3+wfFmhchJPpaDRE=" + # 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=" @@ -53,4 +65,4 @@ env: - CONDA_PY=3.7 import: - - dwhswenson/autorelease:autorelease-travis.yml@v0.1.0 + - dwhswenson/autorelease:autorelease-travis.yml@v0.1.2 diff --git a/MANIFEST.in b/MANIFEST.in index 2a52c271b..f91b503be 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ # include visualization .css files +LICENSE graft openpathsampling -include openpathsampling/resources/*.css \ No newline at end of file +include openpathsampling/resources/*.css diff --git a/devtools/conda-recipe/meta.yaml b/devtools/conda-recipe/meta.yaml index 1df16c520..186158265 100644 --- a/devtools/conda-recipe/meta.yaml +++ b/devtools/conda-recipe/meta.yaml @@ -1,6 +1,6 @@ package: - name: openpathsampling-dev - version: "1.1.0.dev0" + name: openpathsampling + version: "1.2.0.dev0" source: path: ../../ diff --git a/openpathsampling/engines/openmm/topology.py b/openpathsampling/engines/openmm/topology.py index 4600ea79d..cc8cf6814 100644 --- a/openpathsampling/engines/openmm/topology.py +++ b/openpathsampling/engines/openmm/topology.py @@ -1,7 +1,6 @@ import mdtraj as md import numpy as np import pandas as pd -from simtk.openmm import XmlSerializer from openpathsampling.engines import Topology diff --git a/openpathsampling/netcdfplus/netcdfplus.py b/openpathsampling/netcdfplus/netcdfplus.py index 1396452ba..e95771281 100644 --- a/openpathsampling/netcdfplus/netcdfplus.py +++ b/openpathsampling/netcdfplus/netcdfplus.py @@ -385,8 +385,12 @@ def file_size_str(self): @staticmethod def _cmp_version(v1, v2): # we only look at x.y.z parts - q1 = v1.split('.')[:3] - q2 = v2.split('.')[:3] + def version_parts(v): + return v.split('-')[0].split('+')[0].split('.')[:3] + q1 = version_parts(v1) + q2 = version_parts(v2) + # q1 = v1.split('.')[:3] + # q2 = v2.split('.')[:3] # q1 = v1.split('-')[0].split('.') # q2 = v2.split('-')[0].split('.') for v1, v2 in zip(q1, q2): diff --git a/openpathsampling/netcdfplus/version.py b/openpathsampling/netcdfplus/version.py index c4ed6d654..08657c7e5 100644 --- a/openpathsampling/netcdfplus/version.py +++ b/openpathsampling/netcdfplus/version.py @@ -1,5 +1,5 @@ -short_version = '1.1.0.dev0' -version = '1.1.0.dev0' -full_version = '1.1.0.dev0' +short_version = '1.2.0.dev0' +version = '1.2.0.dev0' +full_version = '1.2.0.dev0' git_revision = 'alpha' release = False diff --git a/openpathsampling/tests/test_attribute.py b/openpathsampling/tests/test_attribute.py index 6c7b7405b..e03d5e96b 100644 --- a/openpathsampling/tests/test_attribute.py +++ b/openpathsampling/tests/test_attribute.py @@ -3,6 +3,7 @@ """ from .test_helpers import data_filename, assert_close_unit, make_1d_traj, md +import pytest from nose.plugins.skip import SkipTest @@ -18,6 +19,7 @@ def setup(self): if not md: raise SkipTest("mdtraj not installed") self.mdtraj = md.load(data_filename("ala_small_traj.pdb")) + pytest.importorskip("simtk.unit") self.traj_topology = peng.trajectory_from_mdtraj(self.mdtraj) self.traj_simple = peng.trajectory_from_mdtraj( self.mdtraj, diff --git a/openpathsampling/tests/test_collectivevariable.py b/openpathsampling/tests/test_collectivevariable.py index bad31a4dd..7f47b9e68 100644 --- a/openpathsampling/tests/test_collectivevariable.py +++ b/openpathsampling/tests/test_collectivevariable.py @@ -7,6 +7,7 @@ from builtins import object from .test_helpers import data_filename, assert_close_unit, md +import pytest from nose.plugins.skip import SkipTest import numpy as np @@ -32,6 +33,7 @@ def setup(self): if not md: raise SkipTest("mdtraj not installed") self.mdtraj = md.load(data_filename("ala_small_traj.pdb")) + _ = pytest.importorskip('simtk.unit') self.traj_topology = peng.trajectory_from_mdtraj(self.mdtraj) self.traj_simple = peng.trajectory_from_mdtraj( self.mdtraj, diff --git a/openpathsampling/tests/test_mdtraj_support.py b/openpathsampling/tests/test_mdtraj_support.py index a87d50d0d..d2ca421ac 100644 --- a/openpathsampling/tests/test_mdtraj_support.py +++ b/openpathsampling/tests/test_mdtraj_support.py @@ -2,6 +2,8 @@ from builtins import object import logging +import pytest + from nose.tools import ( assert_equal, assert_not_equal, raises ) @@ -29,6 +31,7 @@ def setup(self): if not md: raise SkipTest("mdtraj not installed") self.md_trajectory = md.load(data_filename("ala_small_traj.pdb")) + _ = pytest.importorskip("simtk.unit") self.ops_trajectory = trajectory_from_mdtraj(self.md_trajectory) self.md_topology = self.ops_trajectory.topology.mdtraj diff --git a/openpathsampling/tests/test_openmm_tools.py b/openpathsampling/tests/test_openmm_tools.py index a13c7f8e6..a2064134e 100644 --- a/openpathsampling/tests/test_openmm_tools.py +++ b/openpathsampling/tests/test_openmm_tools.py @@ -89,6 +89,8 @@ def test_reduced_box_vectors(): else: raise AssertionError("Box already reduced") + if not HAS_OPENMM: + pytest.skip() snap = mock_snapshot_with_box_vector(box * nm) reduced_box = reduced_box_vectors(snap).value_in_unit(nm) check_reduced_box_vectors(reduced_box) @@ -122,7 +124,7 @@ def test_reduce_trajectory_box_vectors(): def test_load_trr_with_velocities(): - if not HAS_MDTRAJ: + if not (HAS_MDTRAJ and HAS_OPENMM): pytest.skip() box_vect_dir = "reduce_box_vects" gro = data_filename(box_vect_dir + "/dna.gro") @@ -134,7 +136,7 @@ def test_load_trr_with_velocities(): def test_load_trr_no_velocities(): - if not HAS_MDTRAJ: + if not (HAS_MDTRAJ and HAS_OPENMM): pytest.skip() box_vect_dir = "reduce_box_vects" gro = data_filename(box_vect_dir + "/dna.gro") diff --git a/openpathsampling/tests/test_storage.py b/openpathsampling/tests/test_storage.py index e42765990..992c5f039 100644 --- a/openpathsampling/tests/test_storage.py +++ b/openpathsampling/tests/test_storage.py @@ -8,6 +8,8 @@ from builtins import object import os +import pytest + from nose.tools import (assert_equal) import openpathsampling as paths @@ -28,6 +30,7 @@ def setup(self): if not md: raise SkipTest("mdtraj not installed") self.mdtraj = md.load(data_filename("ala_small_traj.pdb")) + _ = pytest.importorskip('simtk.unit') self.traj = peng.trajectory_from_mdtraj( self.mdtraj, simple_topology=True) diff --git a/setup.cfg b/setup.cfg index d1e40d8ed..8c6f6cab0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = openpathsampling -version = 1.1.0.dev0 +version = 1.2.0.dev0 description = A Python package for path sampling simulations long_description = file: README.md long_description_content_type = text/markdown