Skip to content

Commit

Permalink
Merge pull request #12 from dwhswenson/0.1.2
Browse files Browse the repository at this point in the history
0.1.2
  • Loading branch information
dwhswenson authored Oct 8, 2017
2 parents 9a7884c + fb50b09 commit b842bd7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 30 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include contact_map/tests/trajectory.pdb
include LICENSE
45 changes: 30 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![codebeat badge](https://codebeat.co/badges/c7fb604a-35a8-4ccf-afea-18d6bd494726)](https://codebeat.co/projects/github-com-dwhswenson-contact_map-master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f7f3cf53698e4655ac8895f13fa5dea6)](https://www.codacy.com/app/dwhswenson/contact_map?utm_source=github.com&utm_medium=referral&utm_content=dwhswenson/contact_map&utm_campaign=Badge_Grade)
[![Code Climate](https://codeclimate.com/github/dwhswenson/contact_map/badges/gpa.svg)](https://codeclimate.com/github/dwhswenson/contact_map)
[![PyPI](https://img.shields.io/pypi/v/contact-map.svg)](https://pypi.python.org/pypi/contact-map/)

# Contact Maps

Expand All @@ -13,8 +14,9 @@ builds on the excellent tools provided by [MDTraj](http://mdtraj.org).

## Installation

TODO: Neither of these installs actually work until we have a release! Use
developer build until then.
> TODO: So far only the `pip`-based install works. The `conda` install is
> still in development as of 0.1.1. Both approaches will work before 0.2.0.
> Both approaches work for getting requirements in a developer install.
The easiest way to install is with `conda`. Conda is a powerful package and
environment management system; if you do not already have a highly
Expand All @@ -29,8 +31,8 @@ conda install -c conda-forge contact_map

The second-easiest install, which will work on any Python setup (conda or
not) is to install via `pip`. Because of some weirdness in how `pip` handles
packages (like MDTraj) that depend on Numpy, you should install Cython and
Numpy separately, so the whole install is:
packages (such as MDTraj) that depend on Numpy, you should install Cython
and Numpy separately, so the whole install is:

```bash
pip install cython
Expand All @@ -39,17 +41,25 @@ pip install contact_map
```

If you already have Numpy installed, you may need to re-install it with `pip
install -U --force-reinstall numpy`.
install -U --force-reinstall numpy`. Note that some systems may require you
to preface `pip install` commands with `sudo` (depending on where Python
keeps its packages).


### Installing a developer build
### Developer installation

If you plan to work with the source, or if you want to stay on the bleeding
edge, you can install a version so that your downloaded/cloned version of
this git repository
this git repository is the live code your Python interpreter sees. We call
that a "developer installation."

#### 1. Download or clone the respository

If you plan to contribute changes back to the repository, please fork it on
GitHub and then clone your fork. Otherwise, you can download or clone the
main repository following [GitHub's
instructions](https://help.github.com/articles/cloning-a-repository/).

#### 2. Install the requirements

There are two ways to install the requirements. You can either use `conda`
Expand All @@ -69,18 +79,23 @@ conda install -y --file requirements.txt
Or install using `pip`:

```bash
pip install cython
pip install numpy
pip install -r requirements.txt
```

Note that MDTraj can be a bit particular about the numpy that it uses. If,
in the first step of the `pip` install, MDTraj complains, try running the
following commands:
In some cases, you may need to add `-U --force-reinstall` to the Numpy step.

#### 3. Install the package

Change into the package directory (which you got when you cloned/downloaded
the repository in step 1). This should be the directory with the `setup.py`
from `contact_map`. Run the command:

```bash
pip install cython
pip install --upgrade --force-reinstall numpy
pip install -e .
```

#### 3. Install the package

##
The `-e` means that the installation is "editable" (developer version; the
stuff in this directory will be the live code your Python interpreted uses)
and the `.` tells it to find `setup.py` in the current directory.
10 changes: 2 additions & 8 deletions ci/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package:
name: contact_map
version: "0.1.1"
# add ".dev" for unreleased versions
version: "0.1.2"

source:
path: ../../
Expand All @@ -14,10 +15,6 @@ requirements:
build:
- python
- setuptools
- mdtraj
- numpy
- scipy
- pandas

run:
- python
Expand All @@ -35,9 +32,6 @@ test:
source_files:
- contact_map/tests/*

#files:
#- contact_map/tests/*pdb

imports:
- contact_map

Expand Down
13 changes: 6 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
"""
Modified from the OPSPiggybacker setup.py
setup.py for contact_map
"""
#from distutils.sysconfig import get_config_var
# from distutils.core import setup, Extension
from setuptools import setup
# import numpy
# import glob
import os
import subprocess

##########################
VERSION = "0.1.1"
VERSION = "0.1.2"
ISRELEASED = True
if not ISRELEASED:
VERSION += ".dev"
__version__ = VERSION
PACKAGE_VERSION = VERSION
REQUIREMENTS=['future', 'numpy', 'mdtraj', 'scipy', 'pandas']
Expand Down Expand Up @@ -77,7 +75,7 @@ def write_version_py(filename='contact_map/version.py'):
GIT_REVISION = 'Unknown'

if not ISRELEASED:
FULLVERSION += '.dev-' + GIT_REVISION[:7]
FULLVERSION += '-' + GIT_REVISION[:7]

a = open(filename, 'w')
try:
Expand Down Expand Up @@ -109,6 +107,7 @@ def write_version_py(filename='contact_map/version.py'):
package_data={'contact_map': ['tests/*pdb']},
ext_modules=[],
scripts=[],
description="Contact maps based on MDTraj",
long_description=DESCRIPTION,
platforms=['Linux', 'Mac OS X', 'Unix', 'Windows'],
install_requires=REQUIREMENTS,
Expand Down

0 comments on commit b842bd7

Please sign in to comment.