Skip to content

Commit 187e22c

Browse files
author
William de Vazelhes
committed
merging
2 parents e1664c7 + 3d6f229 commit 187e22c

File tree

6 files changed

+60
-6
lines changed

6 files changed

+60
-6
lines changed

.codecov.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# taken from scikit-learn:
2+
# https://github.com/scikit-learn/scikit-learn/blob/a7e17117bb15eb3f51ebccc1bd53e42fcb4e6cd8/.codecov.yml
3+
comment: false
4+
5+
coverage:
6+
status:
7+
project:
8+
default:
9+
# Commits pushed to master should not make the overall
10+
# project coverage decrease by more than 1%:
11+
target: auto
12+
threshold: 1%
13+
patch:
14+
default:
15+
# Be tolerant on slight code coverage diff on PRs to limit
16+
# noisy red coverage status on github PRs.
17+
# Note The coverage stats are still uploaded
18+
# to codecov so that PR reviewers can see uncovered lines
19+
# in the github diff if they install the codecov browser
20+
# extension:
21+
# https://github.com/codecov/browser-extension
22+
target: auto
23+
threshold: 1%
24+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ dist/
55
.coverage
66
htmlcov/
77
.cache/
8+
.pytest_cache/
89
doc/auto_examples/*
10+
coverage
11+
.coverage
12+
.coverage*

.travis.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ before_install:
99
- sudo apt-get install liblapack-dev
1010
- pip install --upgrade pip
1111
- pip install wheel
12-
- pip install cython numpy scipy scikit-learn
12+
- pip install cython numpy scipy scikit-learn codecov
1313
- if [[ ($TRAVIS_PYTHON_VERSION == "3.6") ||
1414
($TRAVIS_PYTHON_VERSION == "2.7")]]; then
1515
pip install git+https://github.com/skggm/skggm.git@a0ed406586c4364ea3297a658f415e13b5cbdaf8;
1616
fi
17-
script: pytest test
17+
- if [[ $TRAVIS_PYTHON_VERSION == "3.4" ]];
18+
then pip install pytest-cov pytest==3.6;
19+
fi
20+
script:
21+
- if [[ $TRAVIS_PYTHON_VERSION == "3.4" ]];
22+
then pytest test --cov;
23+
else pytest test;
24+
fi
25+
after_success:
26+
- bash <(curl -s https://codecov.io/bash)
27+

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
|Travis-CI Build Status| |License| |PyPI version|
1+
|Travis-CI Build Status| |License| |PyPI version| |Code coverage|
22

33
metric-learn
44
=============
@@ -52,4 +52,5 @@ more complete.
5252
:target: http://badges.mit-license.org
5353
.. |PyPI version| image:: https://badge.fury.io/py/metric-learn.svg
5454
:target: http://badge.fury.io/py/metric-learn
55-
55+
.. |Code coverage| image:: https://codecov.io/gh/metric-learn/metric-learn/branch/master/graph/badge.svg
56+
:target: https://codecov.io/gh/metric-learn/metric-learn

doc/conf.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
import sys
23

34
extensions = [
45
'sphinx.ext.autodoc',
@@ -8,7 +9,8 @@
89
'sphinx.ext.mathjax',
910
'numpydoc',
1011
'sphinx_gallery.gen_gallery',
11-
'sphinx.ext.doctest'
12+
'sphinx.ext.doctest',
13+
'sphinx.ext.intersphinx'
1214
]
1315

1416
templates_path = ['_templates']
@@ -39,3 +41,12 @@
3941
# Option to hide doctests comments in the documentation (like # doctest:
4042
# +NORMALIZE_WHITESPACE for instance)
4143
trim_doctest_flags = True
44+
45+
# intersphinx configuration
46+
intersphinx_mapping = {
47+
'python': ('https://docs.python.org/{.major}'.format(
48+
sys.version_info), None),
49+
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
50+
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
51+
'scikit-learn': ('https://scikit-learn.org/stable/', None)
52+
}

doc/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
metric-learn: Metric Learning in Python
22
=======================================
3-
|License| |PyPI version|
3+
|Travis-CI Build Status| |License| |PyPI version| |Code coverage|
44

55
Metric-learn contains efficient Python implementations of several
66
popular supervised and weakly-supervised metric learning algorithms. The API
@@ -34,7 +34,11 @@ Documentation outline
3434

3535
:ref:`genindex` | :ref:`modindex` | :ref:`search`
3636

37+
.. |Travis-CI Build Status| image:: https://api.travis-ci.org/metric-learn/metric-learn.svg?branch=master
38+
:target: https://travis-ci.org/metric-learn/metric-learn
3739
.. |PyPI version| image:: https://badge.fury.io/py/metric-learn.svg
3840
:target: http://badge.fury.io/py/metric-learn
3941
.. |License| image:: http://img.shields.io/:license-mit-blue.svg?style=flat
4042
:target: http://badges.mit-license.org
43+
.. |Code coverage| image:: https://codecov.io/gh/metric-learn/metric-learn/branch/master/graph/badge.svg
44+
:target: https://codecov.io/gh/metric-learn/metric-learn

0 commit comments

Comments
 (0)