Skip to content

Add ruff, pre -commit hook and CI pipeline when a PR is made#9

Merged
MechaCritter merged 10 commits into
mainfrom
add-ruff
Jun 10, 2026
Merged

Add ruff, pre -commit hook and CI pipeline when a PR is made#9
MechaCritter merged 10 commits into
mainfrom
add-ruff

Conversation

@MechaCritter

Copy link
Copy Markdown
Owner
  • Ruff linter now runs every commit (user has to install)
  • Added pre-commit hook file
  • Added ci.yaml file for github workflows

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 fmt target.
  • Add .pre-commit-config.yaml with 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.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflow/ci.yml Outdated
Comment thread .github/workflow/ci.yml Outdated
Comment thread pyvisim/encoders/vlad.py Outdated
Comment thread pyvisim/eval.py
Comment thread pyvisim/datasets/datasets.py
Comment thread pyvisim/features/_features.py
@MechaCritter MechaCritter merged commit 0855bfe into main Jun 10, 2026
0 of 2 checks passed
@MechaCritter MechaCritter deleted the add-ruff branch June 10, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants