Skip to content

Commit 55ff18c

Browse files
authored
Update hooks and address issues; add 3.14 to test matrix (#321)
1 parent cfb0477 commit 55ff18c

File tree

7 files changed

+19
-35
lines changed

7 files changed

+19
-35
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
os: [macos-latest, ubuntu-latest, windows-latest]
47-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
47+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
4848

4949
env:
5050
MPLBACKEND: Agg # non-interactive backend for matplotlib

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44

55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v5.0.0
7+
rev: v6.0.0
88
hooks:
99
- id: check-added-large-files
1010
- id: check-merge-conflict
@@ -29,7 +29,7 @@ repos:
2929
exclude: (\.(svg|png|pdf)$)|(CODE_OF_CONDUCT.md)
3030

3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.12.2
32+
rev: v0.14.2
3333
hooks:
3434
- id: ruff
3535
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
@@ -41,14 +41,14 @@ repos:
4141
- id: numpydoc-validation
4242
exclude: (tests|docs)/.*
4343

44-
- repo: https://github.com/econchick/interrogate
45-
rev: 1.7.0
44+
- repo: https://github.com/stefmolin/docstringify
45+
rev: 1.1.1
4646
hooks:
47-
- id: interrogate
47+
- id: docstringify
4848
files: tests/.*
4949

5050
- repo: https://github.com/tox-dev/pyproject-fmt
51-
rev: v2.6.0
51+
rev: v2.11.0
5252
hooks:
5353
- id: pyproject-fmt
5454
args: [--keep-full-version, --no-print-diff]

pyproject.toml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ classifiers = [
3636
"Programming Language :: Python :: 3.11",
3737
"Programming Language :: Python :: 3.12",
3838
"Programming Language :: Python :: 3.13",
39+
"Programming Language :: Python :: 3.14",
3940
"Topic :: Scientific/Engineering :: Artificial Intelligence",
4041
"Topic :: Scientific/Engineering :: Visualization",
4142
]
@@ -173,31 +174,6 @@ markers = [
173174
"shapes: Run tests related to shapes.",
174175
]
175176

176-
[tool.interrogate]
177-
ignore-init-method = true
178-
ignore-init-module = false
179-
ignore-magic = false
180-
ignore-semiprivate = false
181-
ignore-private = false
182-
ignore-property-decorators = false
183-
ignore-module = false
184-
ignore-nested-functions = false
185-
ignore-nested-classes = true
186-
ignore-setters = false
187-
fail-under = 100
188-
exclude = [
189-
"setup.py",
190-
"docs",
191-
"build",
192-
]
193-
verbose = 2
194-
quiet = false
195-
color = true
196-
omit-covered-files = false
197-
# TODO: revisit this later when I add badges to the README
198-
# generate-badge = "."
199-
# badge-format = "svg"
200-
201177
[tool.numpydoc_validation]
202178
checks = [
203179
"all", # report on all checks

tests/data/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_validate_data_missing_columns(self, starter_shapes_dir):
5454

5555
data = pd.read_csv(starter_shapes_dir / 'dino.csv').rename(columns={'x': 'a'})
5656

57-
with pytest.raises(ValueError, match='Columns "x" and "y" are required.'):
57+
with pytest.raises(ValueError, match='Columns "x" and "y" are required'):
5858
_ = Dataset('dino', data)
5959

6060
def test_validate_data_fix_column_casing(self, starter_shapes_dir):

tests/plotting/test_animation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ def test_invalid_easing_step(ease_function, invalid_step):
120120
ease_func = getattr(animation, ease_function)
121121

122122
with pytest.raises(
123-
ValueError, match='Step must be an integer or float, between 0 and 1.'
123+
ValueError, match='Step must be an integer or float, between 0 and 1'
124124
):
125125
ease_func(invalid_step)

tests/shapes/bases/test_shape.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ def test_is_abc(self):
1515
_ = Shape()
1616

1717
class NewShape(Shape):
18+
"""A test shape."""
19+
1820
def distance(self, x, y):
21+
"""Calculate the distance from the shape to the point."""
1922
return super().distance(x, y)
2023

2124
def plot(self, ax=None):
25+
"""Plot the shape."""
2226
return super().plot(ax)
2327

2428
with pytest.raises(NotImplementedError):
@@ -31,10 +35,14 @@ def test_repr(self):
3135
"""Test that the __repr__() method is working."""
3236

3337
class NewShape(Shape):
38+
"""A test shape."""
39+
3440
def distance(self, x, y): # pragma: no cover
41+
"""Calculate the distance from the shape to the point."""
3542
return x, y
3643

3744
def plot(self, ax): # pragma: no cover
45+
"""Plot the shape."""
3846
return ax
3947

4048
new_shape = NewShape()

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_cli_version(capsys):
3333

3434
def test_cli_bad_shape():
3535
"""Test that invalid target shapes raise a ValueError."""
36-
with pytest.raises(ValueError, match='No valid target shapes were provided.'):
36+
with pytest.raises(ValueError, match='No valid target shapes were provided'):
3737
cli.main(['--start-shape=dino', '--target-shape=does-not-exist'])
3838

3939

0 commit comments

Comments
 (0)