Skip to content

Commit acd018e

Browse files
committed
ci: Optimize CI workflow
- Only run tests on macOS (3.10, 3.11) - fastest and most stable - Replace black+isort+flake8 with ruff for faster linting and auto-fixing - Add ruff.toml configuration - Fix unused variables in conftest.py
1 parent c2fb566 commit acd018e

File tree

23 files changed

+108
-31
lines changed

23 files changed

+108
-31
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,8 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
os: [ubuntu-latest, windows-latest, macos-latest]
15-
python-version: ["3.8", "3.9", "3.10", "3.11"]
16-
exclude:
17-
# Reduce matrix size, test all Python versions only on Ubuntu
18-
- os: windows-latest
19-
python-version: "3.8"
20-
- os: windows-latest
21-
python-version: "3.9"
22-
- os: macos-latest
23-
python-version: "3.8"
24-
- os: macos-latest
25-
python-version: "3.9"
14+
os: [macos-latest]
15+
python-version: ["3.10", "3.11"]
2616

2717
steps:
2818
- uses: actions/checkout@v4
@@ -76,20 +66,13 @@ jobs:
7666
- name: Install dependencies
7767
run: |
7868
python -m pip install --upgrade pip
79-
pip install flake8 black isort mypy
69+
pip install ruff mypy
8070
81-
- name: Lint with flake8
71+
- name: Lint and format with ruff
8272
run: |
83-
flake8 huez tests --count --select=E9,F63,F7,F82 --show-source --statistics
84-
flake8 huez tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
85-
86-
- name: Check formatting with black
87-
run: |
88-
black --check huez tests
89-
90-
- name: Check import sorting with isort
91-
run: |
92-
isort --check-only huez tests
73+
# Check and auto-fix with ruff
74+
ruff check --fix huez tests
75+
ruff format huez tests
9376
9477
- name: Type check with mypy
9578
run: |

docs/source/api/adapters.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ plotnine
4545

4646

4747

48+

docs/source/api/utils.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ Quality Checks
3131

3232

3333

34+

docs/source/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,4 @@ See :doc:`contributing` to help shape future releases!
103103

104104

105105

106+

docs/source/comparison.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,3 +693,4 @@ Next Steps
693693
- See :doc:`faq` for common questions
694694

695695

696+

docs/source/contributing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,4 @@ Every contribution, no matter how small, is appreciated! 🎉
165165

166166

167167

168+

docs/source/faq.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,3 +637,4 @@ Still Have Questions?
637637
- Open an issue: https://github.com/hzacode/huez/issues
638638

639639

640+

docs/source/gallery/comparisons.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ Next Steps
132132

133133

134134

135+

docs/source/gallery/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ All palettes available via ``hz.use("palette_name")``.
5454

5555

5656

57+

docs/source/gallery/palettes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,4 @@ Next Steps
150150

151151

152152

153+

0 commit comments

Comments
 (0)