File tree Expand file tree Collapse file tree 6 files changed +39
-27
lines changed Expand file tree Collapse file tree 6 files changed +39
-27
lines changed Original file line number Diff line number Diff line change 1
1
name : Run tests
2
2
3
- on : [push, workflow_dispatch]
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ pull_request :
7
+ workflow_dispatch :
4
8
5
9
jobs :
6
10
test :
9
13
10
14
steps :
11
15
- name : Checkout
12
- uses : actions/checkout@v3
16
+ uses : actions/checkout@v4
17
+ with :
18
+ filter : blob:none
19
+ fetch-depth : 0
13
20
14
21
- name : Setup Python
15
- uses : actions/setup-python@v4
22
+ uses : actions/setup-python@v5
16
23
with :
17
- python-version : " 3.10 "
24
+ python-version : " 3.12 "
18
25
cache : pip
19
26
20
27
- name : Install project and dependencies
@@ -23,14 +30,23 @@ jobs:
23
30
- name : Run test suite
24
31
run : pytest -v --color=yes
25
32
26
- check : # TODO: replace with pre-commit.ci
33
+ check :
27
34
runs-on : ubuntu-latest
28
35
steps :
29
- - uses : actions/checkout@v3
30
- - uses : actions/setup-python@v4
36
+ - uses : actions/checkout@v4
31
37
with :
32
- python-version : " 3.10"
33
- cache : pip
34
- -
uses :
pre-commit/[email protected]
35
- env :
36
- SKIP : no-commit-to-branch # only for local development
38
+ filter : blob:none
39
+ fetch-depth : 0
40
+
41
+ - uses : actions/setup-python@v5
42
+ with :
43
+ python-version : " 3.12"
44
+ # cache: pip # TODO: cache tools
45
+
46
+ - name : Install tools
47
+ run : pip install twine build
48
+
49
+ - name : Build and check
50
+ run : |
51
+ python -m build
52
+ twine check dist/*.whl
Original file line number Diff line number Diff line change @@ -12,16 +12,13 @@ repos:
12
12
- id : detect-private-key
13
13
- id : no-commit-to-branch
14
14
args : ["--branch=main"]
15
- - repo : https://github.com/psf/black
16
- rev : " 23.12.0"
17
- hooks :
18
- - id : black
19
- - repo : https://github.com/charliermarsh/ruff-pre-commit
20
- rev : v0.1.7
15
+ - repo : https://github.com/astral-sh/ruff-pre-commit
16
+ rev : v0.3.2
21
17
hooks :
22
18
- id : ruff
23
19
args : ["--fix"]
20
+ - id : ruff-format
24
21
- repo : https://github.com/pre-commit/mirrors-prettier
25
- rev : v4.0.0-alpha.4
22
+ rev : v4.0.0-alpha.8
26
23
hooks :
27
24
- id : prettier
Original file line number Diff line number Diff line change 1
1
.. -*- mode: rst -*-
2
2
3
- |ReadTheDocs |_
3
+ |PyPI |_ |ReadTheDocs |_
4
+
5
+ .. |PyPI | image :: https://img.shields.io/pypi/v/sklearn-ann
6
+ .. _PyPI : https://pypi.org/project/sklearn-ann/
4
7
5
8
.. |ReadTheDocs | image :: https://readthedocs.org/projects/sklearn-ann/badge/?version=latest
6
9
.. _ReadTheDocs : https://sklearn-ann.readthedocs.io/en/latest/?badge=latest
Original file line number Diff line number Diff line change 6
6
Tests RnnDBSCAN on a large dataset. Requires pandas.
7
7
8
8
"""
9
- print (__doc__ )
10
9
11
10
import numpy as np
12
11
from joblib import Memory
Original file line number Diff line number Diff line change 8
8
Mostly copypasted from sklearn's DBSCAN example.
9
9
10
10
"""
11
- print (__doc__ )
12
11
13
12
import numpy as np
14
13
from sklearn import metrics
Original file line number Diff line number Diff line change @@ -55,9 +55,7 @@ addopts = [
55
55
# this will notify us when a test considered broken starts succeeding.
56
56
xfail_strict = true
57
57
58
- [tool .ruff ]
59
- # TODO: remove `target-version` when switching to PEP 621
60
- target-version = " py39"
58
+ [tool .ruff .lint ]
61
59
select = [
62
60
" F" , # Pyflakes
63
61
" E" , # Pycodestyle errors
@@ -72,9 +70,9 @@ ignore = [
72
70
# Don’t complain about “confusables”
73
71
" RUF001" , " RUF002" , " RUF003"
74
72
]
75
- [tool .ruff .per-file-ignores ]
73
+ [tool .ruff .lint . per-file-ignores ]
76
74
"examples/*.py" = [" E402" ]
77
- [tool .ruff .isort ]
75
+ [tool .ruff .lint . isort ]
78
76
known-first-party = [" sklearn_ann" ]
79
77
80
78
[tool .hatch .envs .default ]
You can’t perform that action at this time.
0 commit comments