Skip to content

Migrate to prek#73

Merged
puddly merged 9 commits intodevfrom
puddly/prek
Apr 29, 2026
Merged

Migrate to prek#73
puddly merged 9 commits intodevfrom
puddly/prek

Conversation

@puddly
Copy link
Copy Markdown
Owner

@puddly puddly commented Apr 29, 2026

This PR migrates from pre-commit to prek and adds a few more checks, most notably zizimor and some tools for validating YAML and TOML.

I've pinned all actions in CI to commit hashes and took the opportunity to rewrite the serialx-compat version swapping to use tomlkit for proper parsing.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.77%. Comparing base (e06a19d) to head (3bb715b).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #73      +/-   ##
==========================================
- Coverage   90.77%   90.77%   -0.01%     
==========================================
  Files          21       21              
  Lines        3350     3349       -1     
==========================================
- Hits         3041     3040       -1     
  Misses        309      309              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates the repo’s local/CI hook runner from pre-commit to prek, adds additional formatting/lint checks, and hardens CI workflows by pinning GitHub Actions and improving permission/concurrency handling. Also updates the serialx-compat version/dependency pinning logic to use tomlkit for safer TOML parsing.

Changes:

  • Replace pre-commit configuration with prek.toml and update CI to run prek (with caching).
  • Pin GitHub Actions to commit SHAs, add concurrency controls, and tighten default workflow permissions.
  • Rewrite serialx-compat dependency/version swapping in release CI using tomlkit instead of string replacement.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
serialx_compat/pyproject.toml Reformat and structure dependencies/optionals to support TOML-aware CI rewriting.
serialx/platforms/serial_pyodide/__init__.py Removes a narrowing assert in the writer loop (may impact type checking).
pyproject.toml Replace pre-commit with prek in dev deps; extensive formatting-only reshaping.
prek.toml New prek hook configuration (ruff/mypy/codespell/prettier/yamlfmt/taplo + cargo + zizmor).
.pre-commit-config.yaml Removed as part of migration to prek.
.github/workflows/publish-to-pypi.yml Pin actions, add concurrency/permissions adjustments, and use tomlkit for serialx-compat pinning.
.github/workflows/docs.yml Pin actions, add concurrency, and scope permissions to deploy job.
.github/workflows/ci.yml Switch CI lint job from pre-commit to prek; pin actions and add concurrency/permissions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread serialx/platforms/serial_pyodide/__init__.py
Comment thread pyproject.toml Outdated
@puddly puddly merged commit e062529 into dev Apr 29, 2026
64 of 65 checks passed
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