Skip to content

Implementing pre-commit and pre-push git hooks#69

Merged
anderdc merged 1 commit into
entrius:testfrom
seroperson:hooks
Apr 20, 2026
Merged

Implementing pre-commit and pre-push git hooks#69
anderdc merged 1 commit into
entrius:testfrom
seroperson:hooks

Conversation

@seroperson
Copy link
Copy Markdown
Contributor

@seroperson seroperson commented Apr 18, 2026

Summary

Introduces a pre-commit / pre-push hooks for local checks and wires it into CI alongside a new pytest workflow.

Changes

  • .pre-commit-config.yaml adds pre-commit checks trailing-whitespace, end-of-file-fixer, check-yaml, check-json, mixed-line-ending, check-added-large-files (500KB), ruff check --fix and ruff format; pre-push runs pytest tests/ -x -q.
  • pyproject.toml: adds pre-commit to the dev dependency group; drops dead [tool.black] / [tool.isort] config.
  • CONTRIBUTING.md: updated to uv-based workflow and documents the hooks.
  • .github/workflows/lint.yml: now runs the full pre-commit suite (pre-commit stage). Same-repo PRs get auto-fix + auto-commit + verify; fork PRs get a single failing run.
  • .github/workflows/test.yml: new workflow running uv run pytest tests/ -q on PRs to main/test. Previously tests were not running on CI, probably that's the reason why they were failing in tests/test_axon_handlers.py.

Installing hooks requires a manual command after uv sync: uv run pre-commit install --install-hooks.

The same PR for gittensor: entrius/gittensor#512

@anderdc anderdc added the enhancement New feature or request label Apr 20, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented Apr 20, 2026

delete data/pending_requests.json, randomly got in but should be gitignored

@anderdc anderdc merged commit 0b54986 into entrius:test Apr 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants