Add ruff, pre -commit hook and CI pipeline when a PR is made#9
Merged
Conversation
MechaCritter
commented
Jun 10, 2026
Owner
- Ruff linter now runs every commit (user has to install)
- Added pre-commit hook file
- Added ci.yaml file for github workflows
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces Ruff-based formatting/linting and pre-commit automation, and adds a GitHub Actions CI workflow intended to run checks on pull requests. In addition to tooling, it applies broad formatting/import cleanups across the codebase to align with the new Ruff configuration.
Changes:
- Add Ruff configuration (lint + formatter) and a
make fmttarget. - Add
.pre-commit-config.yamlwith Ruff formatting, codespell, and common repo hygiene hooks. - Add a PR CI workflow to run mypy and Ruff checks.
Reviewed changes
Copilot reviewed 21 out of 33 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Whitespace/formatting normalization. |
| pyvisim/neural_networks/README.md | Minor formatting cleanup. |
| pyvisim/features/README.md | Minor formatting cleanup. |
| pyvisim/features/_features.py | Import/type/format adjustments for Ruff/mypy alignment. |
| pyvisim/features/init.py | Import ordering/formatting cleanup. |
| pyvisim/eval.py | Import/formatting cleanup in evaluation helpers. |
| pyvisim/encoders/vlad.py | Reformatting and minor logic touchpoints in encoder implementation. |
| pyvisim/encoders/README.md | Whitespace/formatting normalization. |
| pyvisim/encoders/pipeline.py | Import ordering and formatting updates. |
| pyvisim/encoders/fisher_vector.py | Import ordering and formatting updates. |
| pyvisim/encoders/_base_encoder.py | Typing/import updates and formatting cleanup. |
| pyvisim/encoders/init.py | Import ordering/formatting cleanup. |
| pyvisim/datasets/datasets.py | Import ordering/formatting cleanup in dataset utilities. |
| pyvisim/datasets/init.py | Formatting normalization. |
| pyvisim/_errors.py | Formatting normalization. |
| pyvisim/_config.py | Formatting cleanup and minor I/O style adjustments. |
| pyvisim/_base_classes.py | Typing/import updates and formatting cleanup. |
| pyvisim/init.py | Formatting normalization. |
| pyproject.toml | Add Ruff + codespell config; define uv dependency groups for tooling. |
| Makefile | Add fmt target using Ruff. |
| LICENSE | Formatting normalization. |
| examples/m_ap_and_top_k_accuracy.ipynb | Notebook JSON reformatting/import ordering updates. |
| CONTRIBUTING.md | Update contributor workflow to include formatting and pre-commit install. |
| .pre-commit-config.yaml | New pre-commit hooks for formatting, spellcheck, and workflow linting. |
| .gitignore | Formatting normalization. |
| .github/workflow/ci.yml | New CI workflow for mypy + Ruff checks on PRs. |
| .flake8 | Formatting normalization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.