Skip to content

Commit

Permalink
adding pip caching and tests on 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Saul committed Apr 27, 2018
1 parent 41c38e1 commit 283615b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
@@ -1,5 +1,6 @@
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
Expand All @@ -16,8 +17,17 @@ install:
- pip install .
- pip install pytest-cov


# Installing matplotlib is long processes. Using a cache allows
# to fasten the tests by reducing drastically the install time.
cache:
directories:
# Cache for pip, mostly to speed up matplotlib install
- $HOME/.cache/pip

script:
- pytest --cov ripser

# Upload the code coverage report
after_success:
- bash <(curl -s https://codecov.io/bash)
4 changes: 2 additions & 2 deletions ripser/ripser.py
Expand Up @@ -84,7 +84,7 @@ def transform(self, X, distance_matrix=False, metric='euclidean'):
distance matrix from X using the chosen metric.
metric: string or callable
The metric to use when calculating distance between instances in a feature array. If metric is a string, it must be one of the options specified in PAIRED_DISTANCES, including euclidean”, “manhattan, or cosine. Alternatively, if metric is a callable function, it is called on each pair of instances (rows) and the resulting value recorded. The callable should take two arrays from X as input and return a value indicating the distance between them.
The metric to use when calculating distance between instances in a feature array. If metric is a string, it must be one of the options specified in PAIRED_DISTANCES, including "euclidean", "manhattan", or "cosine". Alternatively, if metric is a callable function, it is called on each pair of instances (rows) and the resulting value recorded. The callable should take two arrays from X as input and return a value indicating the distance between them.
"""

Expand All @@ -108,7 +108,7 @@ def fit_transform(self, X, distance_matrix=False, metric='euclidean'):
distance matrix from X using the chosen metric.
metric: string or callable
The metric to use when calculating distance between instances in a feature array. If metric is a string, it must be one of the options specified in PAIRED_DISTANCES, including euclidean”, “manhattan, or cosine. Alternatively, if metric is a callable function, it is called on each pair of instances (rows) and the resulting value recorded. The callable should take two arrays from X as input and return a value indicating the distance between them.
The metric to use when calculating distance between instances in a feature array. If metric is a string, it must be one of the options specified in PAIRED_DISTANCES, including "euclidean", "manhattan", or "cosine". Alternatively, if metric is a callable function, it is called on each pair of instances (rows) and the resulting value recorded. The callable should take two arrays from X as input and return a value indicating the distance between them.
Return
------
Expand Down

0 comments on commit 283615b

Please sign in to comment.