Skip to content

Commit c8ec8f2

Browse files
committed
2 parents 3b9acad + 54da636 commit c8ec8f2

22 files changed

+1202
-695
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ hdbscan/__pycache__/*
77
dist/*
88
*egg-info
99
notebooks/.ipynb_checkpoints/*
10+
__pycache__/
1011

.travis.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
language: python
22

3+
python:
4+
- "3.6"
5+
- "3.7"
6+
- "3.8"
7+
- "3.9"
8+
39
cache:
410
apt: true
511
# We use three different cache directory
@@ -13,11 +19,25 @@ env:
1319
- TEST_DIR=/tmp/test_dir/
1420
- MODULE=hdbscan
1521
matrix:
16-
- DISTRIB="conda" PYTHON_VERSION="3.7"
17-
NUMPY_VERSION="1.15.3" SCIPY_VERSION="1.2.1" CYTHON_VERSION="0.28.5"
18-
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="true"
19-
NUMPY_VERSION="1.10.4" SCIPY_VERSION="0.17.0" CYTHON_VERSION="0.23.5"
22+
- DISTRIB="conda"
23+
24+
install:
25+
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
26+
- bash miniconda.sh -b -p $HOME/miniconda
27+
- source "$HOME/miniconda/etc/profile.d/conda.sh"
28+
- hash -r
29+
- conda config --set always_yes yes --set changeps1 no
30+
- conda update -q conda
31+
- conda info -a
32+
- conda create -q -n testenv python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib pandas networkx scikit-learn pytest pytest-cov codecov coverage cython
33+
- conda activate testenv
34+
- python -c "import numpy; print('numpy %s' % numpy.__version__)"
35+
- python -c "import scipy; print('scipy %s' % scipy.__version__)"
36+
- python setup.py develop
37+
38+
script:
39+
- conda activate testenv
40+
- pytest --cov=./
2041

21-
install: source ci_scripts/install.sh
22-
script: bash ci_scripts/test.sh
23-
after_success: source ci_scripts/success.sh
42+
after_success:
43+
- bash <(curl -s https://codecov.io/bash)

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
.. image:: https://travis-ci.org/scikit-learn-contrib/hdbscan.svg
1414
:target: https://travis-ci.org/scikit-learn-contrib/hdbscan
1515
:alt: Travis Build Status
16-
.. image:: https://coveralls.io/repos/github/scikit-learn-contrib/hdbscan/badge.svg?branch=master
17-
:target: https://coveralls.io/github/scikit-learn-contrib/hdbscan?branch=master
16+
.. image:: https://codecov.io/gh/scikit-learn-contrib/hdbscan/branch/master/graph/badge.svg
17+
:target: https://codecov.io/gh/scikit-learn-contrib/hdbscan
1818
:alt: Test Coverage
1919
.. image:: https://readthedocs.org/projects/hdbscan/badge/?version=latest
2020
:target: https://hdbscan.readthedocs.org
@@ -209,6 +209,7 @@ For a manual install of the latest code directly from GitHub:
209209
210210
Alternatively download the package, install requirements, and manually run the installer:
211211

212+
212213
.. code:: bash
213214
214215
wget https://github.com/scikit-learn-contrib/hdbscan/archive/master.zip

azure-pipelines.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# Python package
2+
# Create and test a Python package on multiple Python versions.
3+
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
5+
6+
trigger:
7+
- master
8+
9+
jobs:
10+
- job: Linux
11+
pool:
12+
vmImage: ubuntu-latest
13+
strategy:
14+
matrix:
15+
Python36:
16+
python.version: '3.6'
17+
Python37:
18+
python.version: '3.7'
19+
Python38:
20+
python.version: '3.8'
21+
Python39:
22+
python.version: '3.9'
23+
24+
steps:
25+
- task: UsePythonVersion@0
26+
inputs:
27+
versionSpec: '$(python.version)'
28+
displayName: 'Use Python $(python.version)'
29+
30+
- script: |
31+
python -m pip install --upgrade pip
32+
pip install -r requirements.txt
33+
displayName: 'Install dependencies'
34+
35+
- script: |
36+
pip install cython
37+
python setup.py develop
38+
39+
- script: |
40+
pip install pytest pytest-azurepipelines
41+
pytest
42+
displayName: 'pytest'
43+
44+
- task: PublishTestResults@2
45+
inputs:
46+
testResultsFiles: 'pytest.xml'
47+
testRunTitle: '$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)] - Python $(python.version)'
48+
condition: succeededOrFailed()
49+
50+
- job: Windows
51+
pool:
52+
vmImage: 'windows-latest'
53+
strategy:
54+
matrix:
55+
Python36:
56+
python.version: '3.6'
57+
Python37:
58+
python.version: '3.7'
59+
Python38:
60+
python.version: '3.8'
61+
Python39:
62+
python.version: '3.9'
63+
64+
steps:
65+
- task: UsePythonVersion@0
66+
inputs:
67+
versionSpec: '$(python.version)'
68+
displayName: 'Use Python $(python.version)'
69+
70+
- script: |
71+
python -m pip install --upgrade pip
72+
pip install -r requirements.txt
73+
displayName: 'Install dependencies'
74+
75+
- script: |
76+
pip install cython
77+
python setup.py develop
78+
79+
- script: |
80+
pip install pytest pytest-azurepipelines
81+
pytest
82+
displayName: 'pytest'
83+
84+
- job: MacOS
85+
pool:
86+
vmImage: 'macos-latest'
87+
strategy:
88+
matrix:
89+
Python37:
90+
python.version: '3.7'
91+
Python38:
92+
python.version: '3.8'
93+
Python39:
94+
python.version: '3.9'
95+
96+
steps:
97+
- task: UsePythonVersion@0
98+
inputs:
99+
versionSpec: '$(python.version)'
100+
displayName: 'Use Python $(python.version)'
101+
102+
- script: |
103+
python -m pip install --upgrade pip
104+
pip install -r requirements.txt
105+
displayName: 'Install dependencies'
106+
107+
- script: |
108+
pip install cython
109+
python setup.py develop
110+
111+
- script: |
112+
pip install pytest pytest-azurepipelines
113+
pytest
114+
displayName: 'pytest'
115+
116+
- job: Coverage
117+
pool:
118+
vmImage: ubuntu-latest
119+
strategy:
120+
matrix:
121+
Python39:
122+
python.version: '3.9'
123+
124+
steps:
125+
- task: UsePythonVersion@0
126+
inputs:
127+
versionSpec: '$(python.version)'
128+
displayName: 'Use Python $(python.version)'
129+
130+
- script: |
131+
python -m pip install --upgrade pip
132+
pip install -r requirements.txt
133+
displayName: 'Install dependencies'
134+
135+
- script: |
136+
pip install cython
137+
pip install pytest
138+
pip install pytest-cov
139+
pip install coveralls
140+
pip install codecov
141+
python setup.py develop
142+
143+
- script: |
144+
pip install pytest pytest-azurepipelines
145+
pytest hdbscan/tests --show-capture=no -v --disable-warnings --junitxml=pytest.xml --cov=hdbscan/ --cov-report=xml --cov-report=html
146+
codecov
147+
displayName: 'pytest'
148+
149+
- task: PublishTestResults@2
150+
inputs:
151+
testResultsFiles: 'pytest.xml'
152+
testRunTitle: '$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)] - Python $(python.version)'
153+
condition: succeededOrFailed()

ci_scripts/install.sh

Lines changed: 0 additions & 40 deletions
This file was deleted.

ci_scripts/success.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

ci_scripts/test.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/comparing_clustering_algorithms.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ algorithms available stack up.
3131
no result at all than a result that is wrong. Bad results lead to
3232
false intuitions which in turn send you down completely the wrong
3333
path. Not only do you not understand your data, you *misunderstand*
34-
your data. This means a good EDA clustering algorithm needs to
35-
conservative in int's clustering; it should be willing to not assign
34+
your data. This means a good EDA clustering algorithm needs to be
35+
conservative in its clustering; it should be willing to not assign
3636
points to clusters; it should not group points together unless they
3737
really are in a cluster; this is true of far fewer algorithms than
3838
you might think.
@@ -543,7 +543,7 @@ HDBSCAN
543543
-------
544544

545545
HDBSCAN is a recent algorithm developed by some of the same people who
546-
write the original DBSCAN paper. Their goal was to allow varying density
546+
wrote the original DBSCAN paper. Their goal was to allow varying density
547547
clusters. The algorithm starts off much the same as DBSCAN: we transform
548548
the space according to density, exactly as DBSCAN does, and perform
549549
single linkage clustering on the transformed space. Instead of taking an
@@ -582,7 +582,7 @@ So, in summary:
582582
The current implementation has similar performance to
583583
``fastcluster``'s agglomerative clustering (and will use
584584
``fastcluster`` if it is available), but we expect future
585-
implementations that take advantage of newer data structure such as
585+
implementations that take advantage of newer data structures such as
586586
cover trees to scale significantly better.
587587

588588
How does HDBSCAN perform on our test dataset? Unfortunately HDBSCAN is

0 commit comments

Comments
 (0)