-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
259 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[report] | ||
omit = | ||
*/python?.?/* | ||
*/*/tests/* | ||
*/mdtraj/* | ||
*/setup.py | ||
*/version.py | ||
exclude_lines = | ||
pragma: no cover | ||
def __repr__ | ||
raise NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
#- "3.7-dev" # need to do custom requirements install for this | ||
|
||
env: | ||
- MDTRAJ="release" | ||
- MDTRAJ="dev" | ||
|
||
matrix: | ||
exclude: # don't run MDTRAJ dev for everything | ||
- env: MDTRAJ="dev" | ||
python: "3.4" | ||
- env: MDTRAJ="dev" | ||
python: "3.5" | ||
|
||
install: | ||
- source ci/pip-install/install.sh | ||
- pip install -r ci/pip-install/testing_requirements.txt | ||
- if [ "$MDTRAJ" = "dev" ]; then pip install --upgrade --force-reinstall -r ci/pip-install/mdtraj_dev.txt; fi | ||
- pip list | ||
|
||
script: | ||
- py.test -vv --cov=contact_map | ||
|
||
after_success: | ||
- coveralls | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include contact_map/tests/trajectory.pdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# See also: | ||
# https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
max_jobs: 4 | ||
|
||
environment: | ||
global: | ||
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\appveyor\\run_with_env.cmd" | ||
PYTHONUNBUFFERED: 1 | ||
|
||
matrix: | ||
- PYTHON: "C:\\Miniconda" | ||
CONDA_PY: "27" | ||
ARCH: "32" | ||
- PYTHON: "C:\\Miniconda-x64" | ||
CONDA_PY: "27" | ||
ARCH: "64" | ||
- PYTHON: "C:\\Miniconda36" | ||
CONDA_PY: "36" | ||
ARCH: "32" | ||
- PYTHON: "C:\\Miniconda36-x64" | ||
CONDA_PY: "36" | ||
ARCH: "64" | ||
|
||
build: false | ||
|
||
install: | ||
# install python | ||
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH% | ||
# test python version | ||
- "%CMD_IN_ENV% conda config --add channels omnia" # TODO: switch to conda-forge? | ||
- "%CMD_IN_ENV% conda update -yq --all" | ||
- "%CMD_IN_ENV% conda install -yq conda-build" | ||
- "%CMD_IN_ENV% python --version" | ||
- "%CMD_IN_ENV% python -c \"import struct; print(struct.calcsize('P') * 8)\"" | ||
# now we do our own install | ||
|
||
test_script: | ||
- "%CMD_IN_ENV% conda build --quiet ci\\conda-recipe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
:: To build extensions for 64 bit Python 3, we need to configure environment | ||
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: | ||
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) | ||
:: | ||
:: To build extensions for 64 bit Python 2, we need to configure environment | ||
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: | ||
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) | ||
:: | ||
:: 32 bit builds do not require specific environment configurations. | ||
:: | ||
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the | ||
:: cmd interpreter, at least for (SDK v7.0) | ||
:: | ||
:: More details at: | ||
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows | ||
:: http://stackoverflow.com/a/13751649/163740 | ||
:: | ||
:: Author: Olivier Grisel | ||
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
:: Modified for use with conda environment variables | ||
:: Taken from mdtraj | ||
|
||
@ECHO OFF | ||
|
||
SET COMMAND_TO_RUN=%* | ||
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows | ||
|
||
SET MAJOR_PYTHON_VERSION="%CONDA_PY:~0,1%" | ||
IF %MAJOR_PYTHON_VERSION% == "2" ( | ||
SET WINDOWS_SDK_VERSION="v7.0" | ||
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( | ||
SET WINDOWS_SDK_VERSION="v7.1" | ||
) ELSE ( | ||
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" | ||
EXIT 1 | ||
) | ||
|
||
IF "%ARCH%"=="64" ( | ||
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture | ||
SET DISTUTILS_USE_SDK=1 | ||
SET MSSdk=1 | ||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% | ||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) ELSE ( | ||
ECHO Using default MSVC build environment for 32 bit architecture | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package: | ||
name: contact_map | ||
version: "0.1.0" | ||
|
||
source: | ||
path: ../../ | ||
|
||
build: | ||
preserve_egg_dir: True | ||
number: 0 | ||
script: python setup.py install --single-version-externally-managed --record record.txt | ||
|
||
requirements: | ||
build: | ||
- python | ||
- setuptools | ||
- mdtraj | ||
- numpy | ||
- scipy | ||
- pandas | ||
|
||
run: | ||
- python | ||
- mdtraj | ||
- numpy | ||
- scipy | ||
- pandas | ||
|
||
test: | ||
requires: | ||
- pytest | ||
#- pytest-cov | ||
#- python-coveralls | ||
|
||
source_files: | ||
- contact_map/tests/* | ||
|
||
imports: | ||
- contact_map | ||
|
||
commands: | ||
- py.test -vv | ||
|
||
about: | ||
home: https://github.com/dwhswenson/contact_map | ||
license: LGPL-2.1 or later | ||
summary: "Contact maps based on MDTraj" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pip install --upgrade pip | ||
pip install cython # may be required for numpy override? | ||
pip install --upgrade --force-reinstall numpy # override Travis numpy | ||
pip install -r requirements.txt | ||
pip install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
git+https://github.com/mdtraj/mdtraj.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pytest | ||
pytest-cov | ||
python-coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from contact_map import ( | ||
from .contact_map import ( | ||
ContactMap, ContactFrequency, ContactDifference | ||
) | ||
|
||
from min_dist import NearestAtoms, MinimumDistanceCounter | ||
from .min_dist import NearestAtoms, MinimumDistanceCounter | ||
|
||
# import concurrence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import os | ||
from pkg_resources import resource_filename | ||
|
||
def test_file(fname): | ||
return resource_filename('contact_map', os.path.join('tests', fname)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
future | ||
numpy | ||
scipy | ||
pandas | ||
mdtraj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters