Skip to content

⬆️ Update prek checks#925

Merged
denialhaag merged 4 commits intomainfrom
prek
Feb 2, 2026
Merged

⬆️ Update prek checks#925
denialhaag merged 4 commits intomainfrom
prek

Conversation

@denialhaag
Copy link
Member

Description

This PR updates .pre-commit-config.yml to make use of prek's priority feature. The commits were initially part of #921, which is blocked due to a CD issue.

Checklist:

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

@denialhaag denialhaag self-assigned this Feb 1, 2026
@denialhaag denialhaag added the dependencies Pull requests that update a dependency file label Feb 1, 2026
@github-project-automation github-project-automation bot moved this to In Progress in MQT Compilation Feb 1, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 1, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Reorganized development quality checks with prioritized execution and added new code formatting validators to improve consistency.
    • Tightened critical dependency version constraints to guarantee stable and reproducible builds across all environments.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Pre-commit hooks are restructured with prioritized grouping and new hook additions; dependency constraints are tightened for nanobind and mqt.core to exact versions; repo-review configuration updated with PC170 ignore entry.

Changes

Cohort / File(s) Summary
Pre-commit Hook Reorganization
.pre-commit-config.yaml
Restructured hook configuration with prioritized grouping (Priority 0, 1, 2+). Multiple hooks moved into grouped structures; new hooks introduced (disallow-caps, validate-pyproject, bibtex-tidy, clang-format, cmake-format, prettier, blacken-docs, ruff-format/ruff-check, ty-check); several hooks removed (nb-clean, texthooks, pygrep-hooks); execution sequencing updated for ruff and type-check workflows.
Dependency Pinning and Configuration
pyproject.toml
Tightened dependency constraints: nanobind from compatible release (>=2.10.2) to compatible pin (~=2.10.2); mqt.core from compatible release (~=3.4.0) to exact pin (==3.4.0) across [build-system].requires, [project].dependencies, and [dependency-groups].build. Added PC170 ignore entry to [tool.repo-review].

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

code quality

Suggested reviewers

  • burgholzer

Poem

🐰 Hooks reorganized with priority and care,
Dependencies pinned, no compatibility flare,
Pre-commit now grouped in a tidy array,
New formatters bloom in this refactored day! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title references updating 'prek' checks but is vague about the actual changes; the emoji and abbreviation lack clarity about what 'prek' means or what specifically was updated. Clarify the title to describe the main change more explicitly, such as 'Add priority levels to pre-commit hooks' or 'Restructure pre-commit configuration with priority metadata'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the purpose (adopting prek's priority feature), references the related issue (#921), and the author has completed the checklist with appropriate items marked as not applicable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch prek

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@denialhaag denialhaag enabled auto-merge (squash) February 1, 2026 23:53
@denialhaag denialhaag disabled auto-merge February 2, 2026 00:08
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.pre-commit-config.yaml:
- Around line 154-164: The ty-check hook’s entry uses a fragile nested
subprocess Python one-liner; replace it with a simple shell-based invocation or
a dedicated wrapper script to improve readability and maintainability: create a
small executable script (or use language: system with a bash -c style entry)
that runs the two uv commands in sequence (sync with --no-install-project
--inexact, then run ty with --no-sync) and forwards the exit code, then point
the hook’s entry to that script and update the language field accordingly (refer
to the hook id "ty-check", the "entry" and "language: unsupported" fields) while
leaving types_or, exclude and priority intact.

@denialhaag denialhaag merged commit 9af0f3a into main Feb 2, 2026
24 checks passed
@denialhaag denialhaag deleted the prek branch February 2, 2026 00:51
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQT Compilation Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file pre-commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant