Skip to content

Commit 1fa15ce

Browse files
authored
feat: support ai extension (#88)
1 parent e7ad7cc commit 1fa15ce

24 files changed

+6358
-665
lines changed

.github/workflows/linux_arm64_docker_ci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ jobs:
6969
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7070
shell: bash
7171

72-
- name: Install Ruff
72+
- name: Install dependencies
7373
run: |
74-
${{ env.PIP_BIN }} install --upgrade pip ruff
74+
${{ env.PIP_BIN }} install --upgrade pip ruff==v0.14.4 clang-format==18.1.8 pybind11==3.0 pytest pytest-cov
7575
shell: bash
7676

7777
- name: Run Ruff Linter
@@ -88,7 +88,6 @@ jobs:
8888

8989
- name: Run clang-format Check
9090
run: |
91-
${{ env.PIP_BIN }} install clang-format==18.1.8
9291
cd "$CLEAN_WORKSPACE"
9392
9493
@@ -120,11 +119,6 @@ jobs:
120119
${{ env.PIP_BIN }} install -v . --config-settings='cmake.define.BUILD_TOOLS="ON"'
121120
shell: bash
122121

123-
- name: Install test dependencies
124-
run: |
125-
${{ env.PIP_BIN }} install pytest pytest-cov
126-
shell: bash
127-
128122
- name: Run Python Tests with Coverage
129123
run: |
130124
cd "$CLEAN_WORKSPACE"
@@ -133,7 +127,6 @@ jobs:
133127

134128
- name: Run Cpp Tests
135129
run: |
136-
${{ env.PIP_BIN }} install pybind11==3.0
137130
cd "$CLEAN_WORKSPACE/build"
138131
make unittest -j$(nproc)
139132
shell: bash

.github/workflows/linux_x64_docker_ci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ jobs:
6969
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7070
shell: bash
7171

72-
- name: Install Ruff
72+
- name: Install dependencies
7373
run: |
74-
${{ env.PIP_BIN }} install --upgrade pip ruff
74+
${{ env.PIP_BIN }} install --upgrade pip ruff==v0.14.4 clang-format==18.1.8 pybind11==3.0 pytest pytest-cov
7575
shell: bash
7676

7777
- name: Run Ruff Linter
@@ -88,7 +88,6 @@ jobs:
8888

8989
- name: Run clang-format Check
9090
run: |
91-
${{ env.PIP_BIN }} install clang-format==18.1.8
9291
cd "$CLEAN_WORKSPACE"
9392
9493
@@ -120,11 +119,6 @@ jobs:
120119
${{ env.PIP_BIN }} install -v . --config-settings='cmake.define.BUILD_TOOLS="ON"'
121120
shell: bash
122121

123-
- name: Install test dependencies
124-
run: |
125-
${{ env.PIP_BIN }} install pytest pytest-cov
126-
shell: bash
127-
128122
- name: Run Python Tests with Coverage
129123
run: |
130124
cd "$CLEAN_WORKSPACE"
@@ -133,7 +127,6 @@ jobs:
133127

134128
- name: Run Cpp Tests
135129
run: |
136-
${{ env.PIP_BIN }} install pybind11==3.0
137130
cd "$CLEAN_WORKSPACE/build"
138131
make unittest -j$(nproc)
139132
shell: bash

pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,21 @@ ignore = [
217217
"E731", # Lambda assignment (used in callbacks)
218218
"B019", # `functools.lru_cache` on methods (handled manually)
219219
"PLR0912", # Too many branches
220+
"PLC0105", # Ignore contravariant
221+
"RUF002", # Ignore Unicode
220222
]
221223
fixable = ["ALL"]
222224
unfixable = []
223225

226+
# Ignore all errors in docstrings
227+
[tool.ruff.lint.pydocstyle]
228+
convention = "google" # or "numpy", "pep257"
229+
ignore-decorators = ["typing.overload"]
230+
231+
[tool.ruff.lint.flake8-type-checking]
232+
# Don't check code examples in docstrings
233+
quote-annotations = true
234+
224235
[tool.ruff.lint.isort]
225236
required-imports = ["from __future__ import annotations"]
226237
known-first-party = ["zvec"]
@@ -237,6 +248,9 @@ known-first-party = ["zvec"]
237248
"python/zvec/model/doc.py" = [
238249
"RUF023", # Unused sort (for __slot__)
239250
]
251+
"python/zvec/extension/**" = [
252+
"PLC0415", # Import outside top-level (dynamic imports in _get_model)
253+
]
240254

241255
[tool.ruff.format]
242256
indent-style = "space"

0 commit comments

Comments
 (0)