Skip to content

Commit 6a064ed

Browse files
committed
update readme and pyproject
1 parent cd4093a commit 6a064ed

File tree

3 files changed

+38
-24
lines changed

3 files changed

+38
-24
lines changed

.github/workflows/build_wheels.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ jobs:
5757
id: production
5858
if: startsWith(github.ref, 'refs/tags/v')
5959
run: |
60-
echo 'OSES=["ubuntu-latest", "macos-latest", "windows-latest"]' >> $GITHUB_OUTPUT
60+
echo 'OSES=["ubuntu-latest", "macos-latest"]' >> $GITHUB_OUTPUT
6161
echo 'CIBW_ARCHS_LINUX="auto aarch64"' >> $GITHUB_OUTPUT
6262
6363
build_wheels:
6464
needs: [generate_matrix]
6565
name: Build wheels on ${{ matrix.os }}
6666
runs-on: ${{ matrix.os }}
67-
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
67+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
6868
strategy:
6969
matrix:
7070
os: ${{ fromJson(needs.generate_matrix.outputs.OSES) }}
@@ -81,7 +81,7 @@ jobs:
8181
platforms: all
8282

8383
- name: Build wheels
84-
uses: pypa/cibuildwheel@v2.16.0
84+
uses: pypa/cibuildwheel@v2.17.0
8585
env:
8686
CIBW_ARCHS_MACOS: "x86_64 arm64"
8787
CIBW_ARCHS_LINUX: ${{ fromJson(needs.generate_matrix.outputs.CIBW_ARCHS_LINUX) }}
@@ -92,7 +92,7 @@ jobs:
9292

9393
- uses: actions/upload-artifact@v4
9494
with:
95-
name: wheels
95+
name: wheels-${{ matrix.os }}
9696
path: ./wheelhouse/*.whl
9797

9898
build_sdist:
@@ -109,8 +109,8 @@ jobs:
109109

110110
- uses: actions/upload-artifact@v4
111111
with:
112-
name: wheels
113-
path: dist/*.tar.gz
112+
name: sdist
113+
path: ./dist/*.tar.gz
114114

115115
upload_pypi:
116116
needs: [build_wheels, build_sdist]
@@ -122,10 +122,21 @@ jobs:
122122
steps:
123123
- uses: actions/download-artifact@v4
124124
with:
125-
# unpacks default artifact into dist/
126-
# if `name: artifact` is omitted, the action will create extra parent dir
127-
name: wheels
128-
path: dist
125+
name: wheels-*
126+
path: dist/wheels
127+
merge-multiple: true
128+
129+
- uses: actions/download-artifact@v4
130+
with:
131+
name: sdist
132+
path: dist/sdist
133+
134+
- name: Combine artifacts for PyPI upload
135+
run: |
136+
mkdir -p combined_dist
137+
mv dist/wheels/* combined_dist/
138+
mv dist/sdist/* combined_dist/
139+
rm -rf dist/wheels dist/sdist
129140
130141
- uses: pypa/[email protected]
131142
with:

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,13 @@ for k, col in zip(unique_labels, colors):
8787
if k == -1:
8888
# Black used for noise.
8989
col = [0, 0, 0, 1]
90-
9190
class_member_mask = (labels == k)
92-
9391
xy = X[class_member_mask & core_samples_mask]
9492
plt.plot(xy[:, 0], xy[:, 1], 'o', markerfacecolor=tuple(col),
9593
markeredgecolor='k', markersize=14)
96-
9794
xy = X[class_member_mask & ~core_samples_mask]
9895
plt.plot(xy[:, 0], xy[:, 1], 'o', markerfacecolor=tuple(col),
9996
markeredgecolor='k', markersize=6)
100-
10197
plt.title('Estimated number of clusters: %d' % n_clusters_)
10298
plt.show()
10399
```

pyproject.toml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "dbscan"
33
authors = [
4-
{name = "Yiqiu Wang", email = "yiqiu_wang@icloud.com"}
4+
{name = "Yiqiu Wang", email = "yiqiuwang.work@gmail.com"}
55
]
66
maintainers = [
77
{name = "Anirudh Vegesana", email = "[email protected]"}
@@ -11,24 +11,32 @@ readme = "README.md"
1111
keywords = ['cluster', 'clustering', 'density', 'dbscan']
1212
license = {text = "MIT"}
1313
classifiers = [
14-
'Development Status :: 2 - Pre-Alpha',
14+
'Development Status :: 4 - Beta',
1515
'Intended Audience :: Science/Research',
1616
'Intended Audience :: Developers',
1717
"License :: OSI Approved :: MIT License",
1818
'Programming Language :: C++',
19-
'Programming Language :: Python :: 3',
19+
'Programming Language :: Python :: 3.9',
20+
'Programming Language :: Python :: 3.10',
21+
'Programming Language :: Python :: 3.11',
22+
'Programming Language :: Python :: 3.12',
23+
"Operating System :: POSIX :: Linux",
24+
"Operating System :: MacOS",
2025
'Topic :: Software Development',
2126
'Topic :: Scientific/Engineering',
2227
]
2328

24-
dynamic = ["version", "dependencies", "requires-python"]
29+
dynamic = ["version"]
2530

26-
[project.optional-dependencies]
27-
scikit-learn = [
28-
"scikit-learn"
31+
dependencies = [
32+
"numpy>=2.0.0",
33+
"scikit-learn>=1.0",
2934
]
35+
36+
requires-python = ">=3.9,<4.0" # Aligns with CIBW_BUILD and NumPy 2.0 support
37+
38+
[project.optional-dependencies]
3039
example = [
31-
"scikit-learn",
3240
"matplotlib"
3341
]
3442

@@ -37,8 +45,7 @@ homepage = "https://sites.google.com/view/yiqiuwang/dbscan"
3745
repository = "https://github.com/wangyiqiu/dbscan-python"
3846

3947
[build-system]
40-
requires = ["setuptools", "setuptools_scm", "wheel", "numpy>=2.0.0"]
41-
backend = "setuptools.build_meta"
48+
requires = ["setuptools>=61", "setuptools_scm>=7", "wheel", "numpy>=2.0.0"]
4249

4350
[tool.setuptools_scm]
4451
write_to = "pythonmodule/_version.py"

0 commit comments

Comments
 (0)