Skip to content

Commit b5951e7

Browse files
authored
Feat-ruff (#55)
* Add stubs * Add pre-commit * Update stubs * Update core * Update pyproject.toml * Update stubs * Update top-level modules * Update pyproject.toml * Update dataframes modules * Move import * Update CI * Update chart modules * Update stubs * Drop python 3.11 * Use generic * Update stubs * api as Any * columns_format: Any * Update stubs * fix src * Update stubs * Update stub * fix benchmark * fix top level tests * tests/core * Use type instead of TypeAlias * fix tests/dataframes * Update stub * fix tests/sheet_frame * fix tests/stats_frame * fix tests/dist_frame * fix tests/agg * fix tests/head_frame * fix tests/pivot * fix tests/chart * fix tests/figure * Series -> AxesSeries * fix tests * Update tests * fix prek
1 parent cd3639c commit b5951e7

File tree

97 files changed

+2506
-1936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+2506
-1936
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77

88
concurrency:
9-
group: test-${{ github.head_ref }}
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1010
cancel-in-progress: true
1111

1212
env:
@@ -20,21 +20,19 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
python-version: ["3.11", "3.12", "3.13", "3.14"]
23+
python-version: ["3.12", "3.13", "3.14"]
2424

2525
steps:
2626
- uses: actions/checkout@v6
27-
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v6
27+
- name: Install uv and set up Python ${{ matrix.python-version }}
28+
uses: astral-sh/setup-uv@v7
2929
with:
3030
python-version: ${{ matrix.python-version }}
31-
allow-prereleases: true
32-
- name: Install uv and ruff
33-
run: pip install uv ruff
34-
# - name: Ruff check
35-
# run: ruff check
31+
activate-environment: true
3632
- name: Install the project
3733
run: uv sync
34+
- name: Run prek hooks
35+
run: uv run prek run --all-files
3836
- name: Upload local coverage (lcov.info) if present
3937
if: hashFiles('lcov.info') != ''
4038
uses: codecov/codecov-action@v5

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
.venv/
33
/dist/
44
__pycache__/
5-
uv.lock
5+
uv.lock

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: check-json
6+
- id: check-toml
7+
- id: check-yaml
8+
exclude: ^mkdocs\.yml$
9+
- id: end-of-file-fixer
10+
- id: trailing-whitespace
11+
- repo: https://github.com/abravalheri/validate-pyproject
12+
rev: v0.25
13+
hooks:
14+
- id: validate-pyproject
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
rev: v0.15.0
17+
hooks:
18+
- id: ruff-check
19+
files: ^(src|tests)/
20+
- id: ruff-format
21+
files: ^(src|tests)/
22+
- repo: https://github.com/DetachHead/basedpyright-prek-mirror
23+
rev: 1.37.4
24+
hooks:
25+
- id: basedpyright
26+
files: ^(src|tests)/

0 commit comments

Comments
 (0)