Skip to content

Commit a288717

Browse files
committed
fixes and updates
1 parent b52e564 commit a288717

File tree

10 files changed

+57
-89
lines changed

10 files changed

+57
-89
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
groups:
8+
updates:
9+
update-types:
10+
- "minor"
11+
- "patch"

.github/workflows/Docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Documentation
22
concurrency:
3-
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
3+
group: ${{ github.workflow }}-${{ github.event.ref }}
44
cancel-in-progress: true
55

66
on:

.github/workflows/Publish.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Publish Python Package
22
concurrency:
3-
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
3+
group: ${{ github.workflow }}-${{ github.event.ref }}
44
cancel-in-progress: false
55

66
on:
@@ -40,18 +40,13 @@ jobs:
4040

4141
- name: Move files to dist
4242
run: |
43-
mkdir dist
44-
mv dists/* dist/
4543
if [[ ! -f dist/multi_mst-${{ steps.version.outputs.version }}.tar.gz ]] ; then exit 1; fi
4644
45+
- name: Publish package to (Test)PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1
47+
4748
- name: Create Github Release
4849
env:
4950
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5051
run: |
51-
gh release create -R vda-lab/multi_mst -t "Version ${{ steps.version.outputs.version }}" -n "**Full Changelog**: https://github.com/vda-lab/multi_mst/commits/${{ steps.version.outputs.tag }}" "${{ steps.version.outputs.tag }}" dist/*.whl dist/*.tar.gz
52-
53-
- name: Publish package to (Test)PyPI
54-
uses: pypa/[email protected]
55-
# Comment lines below to publish to PyPi instead of test PyPi
56-
# with:
57-
# repository-url: https://test.pypi.org/legacy/
52+
gh release create -R vda-lab/multi_mst -t "Version ${{ steps.version.outputs.version }}" -n "**Full Changelog**: https://github.com/vda-lab/multi_mst/commits/${{ steps.version.outputs.tag }}" "${{ steps.version.outputs.tag }}" dist/*.tar.gz

.github/workflows/Tests.yml

Lines changed: 10 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
name: Build dists
3232
runs-on: ubuntu-24.04
3333
outputs:
34-
WHEEL_NAME: ${{ steps.dists.outputs.WHEEL_NAME }}
34+
WHEEL_NAME: ${{ steps.dist.outputs.WHEEL_NAME }}
3535
steps:
3636
- uses: actions/checkout@v4
3737
with:
@@ -53,8 +53,8 @@ jobs:
5353
# stop the build if there are Python syntax errors or undefined names
5454
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
5555
56-
- name: Build dists
57-
id: dists
56+
- name: Build dist
57+
id: dist
5858
run: |
5959
python -m build --sdist --wheel
6060
python ci/export_name.py
@@ -65,63 +65,30 @@ jobs:
6565
- name: Upload sdist result
6666
uses: actions/upload-artifact@v4
6767
with:
68-
name: dists
68+
name: dist
6969
path: dist/*
7070
if-no-files-found: error
7171

7272
test_sdist:
73-
name: Test dist for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
73+
name: Test Python ${{ matrix.python_version }}
7474
needs: build_dists
75-
runs-on: ${{ matrix.os }}
75+
runs-on: ubuntu-latest
7676
strategy:
7777
fail-fast: true
7878
matrix:
79-
include:
80-
- os: windows-latest
81-
python: "3.10"
82-
platform_id: win_amd64
83-
- os: windows-latest
84-
python: "3.11"
85-
platform_id: win_amd64
86-
- os: windows-latest
87-
python: "3.12"
88-
platform_id: win_amd64
89-
90-
# Linux 64 bit manylinux2014
91-
- os: ubuntu-latest
92-
python: "3.10"
93-
platform_id: manylinux_x86_64
94-
manylinux_image: manylinux2014
95-
- os: ubuntu-latest
96-
python: "3.11"
97-
platform_id: manylinux_x86_64
98-
manylinux_image: manylinux2014
99-
- os: ubuntu-latest
100-
python: "3.12"
101-
platform_id: manylinux_x86_64
102-
manylinux_image: manylinux2014
103-
104-
# MacOS x86_64
105-
- os: macos-latest
106-
python: "3.10"
107-
platform_id: macosx_x86_64
108-
- os: macos-latest
109-
python: "3.11"
110-
platform_id: macosx_x86_64
111-
- os: macos-latest
112-
python: "3.12"
113-
platform_id: macosx_x86_64
79+
python_version: ['3.10', '3.11', '3.12', '3.13']
80+
11481
steps:
11582
- name: Download sdist
11683
uses: actions/download-artifact@v4
11784
with:
118-
name: dists
85+
name: dist
11986
path: dist/
12087

12188
- name: Setup Python
12289
uses: actions/setup-python@v5
12390
with:
124-
python-version: ${{ matrix.python }}
91+
python-version: ${{ matrix.python_version }}
12592

12693
- name: Install dependencies
12794
run: |

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ include README.md
22
include pyproject.toml
33
include LICENSE
44
include MANIFEST.in
5-
include requirements.txt
65
recursive-exclude docs *
76
recursive-exclude notebooks *

pyproject.toml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,26 @@ name = "multi_mst"
77
version = "0.2.0"
88
description = "Minimum spanning tree based manifold approximations."
99
keywords = ["dimensionality reduction", "clustering", "minimum spanning tree"]
10-
authors = [
11-
{name= "Jelmer Bot", email = "[email protected]" }
12-
]
10+
authors = [{ name = "Jelmer Bot", email = "[email protected]" }]
1311
readme = "README.md"
14-
license = { text = "BSD-2-Clause" }
12+
license = "BSD-2-Clause"
13+
license-files = ["LICENSE"]
1514
classifiers = [
16-
"Development Status :: 5 - Production/Stable",
17-
"License :: OSI Approved :: BSD License",
18-
"Natural Language :: English",
19-
"Operating System :: OS Independent",
20-
"Programming Language :: Python :: 3 :: Only"
15+
"Development Status :: 5 - Production/Stable",
16+
"Natural Language :: English",
17+
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3 :: Only",
2119
]
2220
requires-python = ">=3.10"
2321
dependencies = [
24-
"numpy >= 1.20, <3",
25-
"scipy >= 1.9",
26-
"scikit-learn >= 1.1",
27-
"umap-learn >= 0.5.4",
28-
"numba >= 0.57.1",
29-
"pynndescent >= 0.5.13",
30-
"fast_hdbscan >= 0.2.1",
31-
"fast-hbcc >= 0.1.0"
22+
"numpy >= 1.20, <3",
23+
"scipy >= 1.9",
24+
"scikit-learn >= 1.6",
25+
"umap-learn >= 0.5.4",
26+
"numba >= 0.57.1",
27+
"pynndescent >= 0.5.13",
28+
"fast_hdbscan >= 0.2.1",
29+
"fast-hbcc >= 0.1.0",
3230
]
3331

3432
[project.urls]
@@ -43,10 +41,10 @@ namespaces = false
4341
[project.optional-dependencies]
4442
tests = ["pytest"]
4543
docs = [
46-
"sphinx >= 8",
47-
"nbsphinx >= 0.9",
48-
"sphinx_rtd_theme >= 2.0",
49-
"matplotlib >= 3.8",
44+
"sphinx >= 8",
45+
"nbsphinx >= 0.9",
46+
"sphinx_rtd_theme >= 2.0",
47+
"matplotlib >= 3.8",
5048
"numpydoc",
5149
"pygments>=2.4.1",
5250
"jupyterlab_pygments>=0.1.1",
@@ -56,5 +54,5 @@ notebooks = [
5654
"jupyterlab >= 4",
5755
"matplotlib >= 3.8",
5856
"pandas >= 2.2",
59-
"tqdm >= 4.62.3"
60-
]
57+
"tqdm >= 4.62.3",
58+
]

src/multi_mst/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def fit(self, X, y=None, **fit_params):
8484
self: MultiMSTMixin
8585
The fitted estimator.
8686
"""
87-
X = check_array(X, force_all_finite=False)
87+
X = check_array(X, ensure_all_finite=False)
8888
self._raw_data = X
8989

9090
self._all_finite = np.all(np.isfinite(X))
@@ -561,8 +561,6 @@ def hdbscan(
561561
sample_weights, self._raw_data, dtype=np.float32
562562
)
563563
clusterer = HDBSCAN(
564-
data_labels=data_labels,
565-
sample_weights=sample_weights,
566564
min_samples=self.num_neighbors,
567565
min_cluster_size=min_cluster_size,
568566
max_cluster_size=max_cluster_size,

src/multi_mst/tests/test_descent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def test_hdbscan_branches():
194194
assert isinstance(d, BranchDetector)
195195
assert d.labels_[0] == -1
196196
assert d.labels_[6] == -1
197-
assert len(set(d.labels_)) == 9
197+
assert len(set(d.labels_)) == 8
198198

199199

200200
def test_hdbscan_boundary_clusters():
@@ -205,7 +205,7 @@ def test_hdbscan_boundary_clusters():
205205
assert isinstance(bc, BoundaryClusterDetector)
206206
assert bc.labels_[0] == -1
207207
assert bc.labels_[6] == -1
208-
assert len(set(bc.labels_)) == 9
208+
assert len(set(bc.labels_)) == 6
209209

210210

211211
def test_hdbscan_boundary_clusters_no_reachability():
@@ -216,7 +216,7 @@ def test_hdbscan_boundary_clusters_no_reachability():
216216
assert isinstance(bc, BoundaryClusterDetector)
217217
assert bc.labels_[0] == -1
218218
assert bc.labels_[6] == -1
219-
assert len(set(bc.labels_)) == 8
219+
assert len(set(bc.labels_)) == 7
220220

221221

222222
def test_hdbscan_boundary_clusters_metric():
@@ -227,7 +227,7 @@ def test_hdbscan_boundary_clusters_metric():
227227
assert isinstance(bc, BoundaryClusterDetector)
228228
assert bc.labels_[0] == -1
229229
assert bc.labels_[6] == -1
230-
assert len(set(bc.labels_)) == 7
230+
assert len(set(bc.labels_)) == 6
231231

232232

233233
def test_hdbscan_boundary_clusters_not_euclidean():

src/multi_mst/tests/test_kmst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def test_hdbscan_boundary_clusters():
240240
assert isinstance(bc, BoundaryClusterDetector)
241241
assert bc.labels_[0] == -1
242242
assert bc.labels_[6] == -1
243-
assert len(set(bc.labels_)) == 9
243+
assert len(set(bc.labels_)) == 6
244244

245245

246246
def test_hbcc():

src/multi_mst/tests/test_recall.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def test_hdbscan_boundary_clusters():
215215
assert isinstance(bc, BoundaryClusterDetector)
216216
assert bc.labels_[0] == -1
217217
assert bc.labels_[6] == -1
218-
assert len(set(bc.labels_)) == 9
218+
assert len(set(bc.labels_)) == 6
219219

220220

221221
def test_hdbscan_boundary_clusters_no_reachability():
@@ -226,7 +226,7 @@ def test_hdbscan_boundary_clusters_no_reachability():
226226
assert isinstance(bc, BoundaryClusterDetector)
227227
assert bc.labels_[0] == -1
228228
assert bc.labels_[6] == -1
229-
assert len(set(bc.labels_)) == 8
229+
assert len(set(bc.labels_)) == 7
230230

231231

232232
def test_hdbscan_boundary_clusters_metric():
@@ -237,7 +237,7 @@ def test_hdbscan_boundary_clusters_metric():
237237
assert isinstance(bc, BoundaryClusterDetector)
238238
assert bc.labels_[0] == -1
239239
assert bc.labels_[6] == -1
240-
assert len(set(bc.labels_)) == 7
240+
assert len(set(bc.labels_)) == 6
241241

242242

243243
def test_hbcc():

0 commit comments

Comments
 (0)