[build]: Lint/format tooling + CI (add-lint-tooling) - #35
Merged
Conversation
…ling) OpenSpec change: add-lint-tooling. Single-source lint/format config + CI. - pyproject.toml: recreate the ruff config (deleted with the scaffold in the cleanup PR) at the root as the single source; rule set B,I,ARG,C4,EM,PL,PT, PTH,RET,SIM,UP,NPY,PD (+E/F/W); documented ignore list splits formatter-owned codes from logic-adjacent codes deferred to follow-up; per-file-ignores for tests; analysis/ and docs/ excluded. - .pre-commit-config.yaml: drop black/black-jupyter (ruff-format replaces them), bump ruff to v0.15.1, add mirrors-clang-format hook scoped to the extension. - .clang-format (Microsoft/4-space/120/PointerAlignment Right/sorted includes) and .clang-tidy (curated bugprone/performance/modernize checks). - CMakeLists.txt: export compile_commands.json for clang-tidy. - .github/workflows/ci.yml: lint (ruff + clang-format check), build, and CPU-test jobs (build/test use a CUDA devel container; GPU tests remain local). - .git-blame-ignore-revs for the mechanical format commit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mechanical, tool-generated formatting of the package, tests, and CUDA extension (scope: libs/ccc, tests, libs/ccc_cuda_ext; analysis/ untouched). No behavior change intended. - Python: `ruff format` reflow + `ruff check --fix` safe fixes only (import sorting, unused-import removal in tests, Union->|, .format->f-string, redundant open mode, NPY201 np.unicode_->np.str_). - CUDA/C++: `clang-format -i` (Microsoft base, 4-space, 120 cols, sorted includes within each group; local headers unmoved). The NPY201 fix (np.unicode_->np.str_) in tests/test_coef_pval.py incidentally resolves the 2 pre-existing NumPy-2 test failures — they now pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Codex review ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements OpenSpec change add-lint-tooling (proposal 2/8).
Two commits: (1) config/CI (reviewable) and (2) mechanical format (tool-generated —
ruff format+clang-format+ ruff safe autofixes).Config (commit 1)
pyproject.toml: single-source ruff config (the config was deleted with the scaffold in the cleanup PR and is recreated here). Rules B,I,ARG,C4,EM,PL,PT,PTH,RET,SIM,UP,NPY,PD (+E/F/W); a documentedignorelist separates formatter-owned codes from logic-adjacent ones deferred to follow-up (NPY002 legacy RNG, PLC0415 lazy imports, EM/PTH/B905/PLW1510 behavior-changing).analysis/anddocs/excluded..pre-commit-config.yaml: drop black/black-jupyter; bump ruff to 0.15.1; add scopedmirrors-clang-format..clang-format(Microsoft/4-space/120/PointerAlignment Right/sorted includes),.clang-tidy(curated checks).CMakeLists.txt: exportcompile_commands.json..github/workflows/ci.yml:lint(ruff + clang-format check),build+test-cpu(CUDA devel container; GPU tests remain local).Mechanical format (commit 2) — scope:
libs/ccc,tests,libs/ccc_cuda_ext;analysis/untouchedPython
ruff format+ safe autofixes (import sorting, unused-import removal in tests,Union→|,.format→f-string, redundant open mode, NPY201np.unicode_→np.str_); CUDAclang-format -i. The NPY201 fix incidentally resolves the 2 pre-existing NumPy-2 test failures — the suite is now fully green.Testing
Rebuilt in
ccc-gpu-dev; 216 passed (was 214 + 2 previously-failing now fixed).ruff check,ruff format --check, andclang-format --dry-run --Werrorall clean. CI YAML validated (Actions not executed locally).