Skip to content

Commit 3ecb723

Browse files
authored
Merge pull request #38 from data-science-extensions/updates
Modernise Development Workflow, Enhance Code Quality, and Refactor Core Utilities
2 parents 4b98b35 + 4b24e77 commit 3ecb723

35 files changed

Lines changed: 1110 additions & 1541 deletions

.github/workflows/cd.yml

Lines changed: 135 additions & 211 deletions
Large diffs are not rendered by default.

.pre-commit-config.yaml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
repos:
66
# Fixes
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: "v5.0.0"
8+
rev: "v6.0.0"
99
hooks:
1010
# File name fixes
1111
- id: check-case-conflict
@@ -33,33 +33,22 @@ repos:
3333

3434
# Linter
3535
- repo: https://github.com/psf/black
36-
rev: "25.1.0"
36+
rev: "25.12.0"
3737
hooks:
3838
- id: black
3939
language_version: python3.13
4040
args:
4141
- "--config=pyproject.toml"
4242
- repo: https://github.com/adamchainz/blacken-docs
43-
rev: "1.19.1"
43+
rev: "1.20.0"
4444
hooks:
4545
- id: blacken-docs
4646
additional_dependencies:
4747
- "black>=23.3"
4848

49-
# Run MyPy type checks
50-
- repo: https://github.com/pre-commit/mirrors-mypy
51-
rev: "v1.16.1"
52-
hooks:
53-
- id: mypy
54-
files: src/toolbox_python
55-
args:
56-
- "--install-types"
57-
- "--config-file=pyproject.toml"
58-
- "--allow-redefinition"
59-
6049
# Reorder Python imports
6150
- repo: https://github.com/pycqa/isort
62-
rev: "6.0.1"
51+
rev: "7.0.0"
6352
hooks:
6453
- id: isort
6554
name: isort (python)
@@ -68,7 +57,7 @@ repos:
6857

6958
# Find any outdated syntax and replace with modern equivalents
7059
- repo: https://github.com/asottile/pyupgrade
71-
rev: "v3.20.0"
60+
rev: "v3.21.2"
7261
hooks:
7362
- id: pyupgrade
7463
name: Upgrade Python features
@@ -88,21 +77,37 @@ repos:
8877

8978
# Remove unused import statements
9079
- repo: https://github.com/hadialqattan/pycln
91-
rev: "v2.5.0"
80+
rev: "v2.6.0"
9281
hooks:
9382
- id: pycln
9483
args:
9584
- "--all"
9685

9786
# Check uv configs
9887
- repo: https://github.com/astral-sh/uv-pre-commit
99-
rev: "0.7.20"
88+
rev: "0.9.18"
10089
hooks:
10190
- id: uv-lock
10291
- id: uv-sync
10392
# args:
10493
# - "--all-groups"
10594

95+
# Check docstrings
96+
- repo: https://github.com/data-science-extensions/docstring-format-checker
97+
rev: "v1.9.0"
98+
hooks:
99+
- id: docstring-format-checker
100+
name: Docstring Format Checker
101+
args:
102+
- "--config=pyproject.toml"
103+
- "--output=list"
104+
- "--check"
105+
exclude: |
106+
(?x)^(
107+
src/tests/.*$|
108+
src/utils/.*$
109+
)
110+
106111
# Everything run locally
107112
- repo: local
108113
hooks:
@@ -118,9 +123,14 @@ repos:
118123
- "-rn" # Only display messages
119124
- "-sn" # Don't display the score
120125

121-
# Check
122-
- id: check-docstrings
123-
name: Check Docstrings
124-
entry: uv run --no-sync --link-mode=copy check-docstrings
125-
language: system
126+
- id: ty
127+
name: ty-check
128+
entry: uv run ty check ./src/toolbox_python
129+
language: python
126130
types: [python]
131+
pass_filenames: true
132+
exclude: |
133+
(?x)^(
134+
src/tests/.*$|
135+
src/utils/.*$
136+
)

Makefile

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

0 commit comments

Comments
 (0)