Skip to content

ci: prek for lint/formatting, remove pre-commit(.ci)#250

Merged
consideRatio merged 8 commits intosensmetry:mainfrom
consideRatio:prek-transition
Apr 3, 2026
Merged

ci: prek for lint/formatting, remove pre-commit(.ci)#250
consideRatio merged 8 commits intosensmetry:mainfrom
consideRatio:prek-transition

Conversation

@consideRatio
Copy link
Copy Markdown
Collaborator

@consideRatio consideRatio commented Apr 2, 2026

Based on a decision in todays sysand standup, we'll lean on using prek for static checks and formatting, this PR gets it done.

This reverts commit 8fbda0c.

Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
With this change, we stop using pre-commit that doesn't support rust as
a language to run hooks. We also stop using pre-commit.ci for the same
reason, and with that we need to run prek in GitHub Action's CI system.

I transitioned to run mypy checks using prek as well, and removed such
ci logic from the Python github actions workflow.

I cleaned up run_chores.sh scripts as well, as we can now rely on prek
for this.

Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
@consideRatio
Copy link
Copy Markdown
Collaborator Author

consideRatio commented Apr 2, 2026

@simonas-drauksas-sensmetry we have now stopped using pre-commit.ci, as it doesn't support rust based hooks we do this ourselves instead in GitHub Actions. Could you remove the third-party integration to this repo (or escalate my permissions here).

Also, we introduce a Prek CI Gate now.

@simonas-drauksas-sensmetry
Copy link
Copy Markdown
Member

@simonas-drauksas-sensmetry we have now stopped using pre-commit.ci, as it doesn't support rust based hooks we do this ourselves instead in GitHub Actions. Could you remove the third-party integration to this repo (or escalate my permissions here).

Also, we introduce a Prek CI Gate now.

Done

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator

Regarding CI, can't figure out what's wrong...

Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
@consideRatio
Copy link
Copy Markdown
Collaborator Author

Regarding CI, can't figure out what's wrong...

The lockfile at uv.lock needs to be updated, but --locked was provided. To update the lockfile, run uv lock.

I had removed mypy/ruff as dev deps for the bindings/py locally, leaning on prek to do it, so the uv.lock file was outdated in relation to the pyproject.toml file.

@andrius-puksta-sensmetry
Copy link
Copy Markdown
Collaborator

The lockfile at uv.lock needs to be updated, but --locked was provided. To update the lockfile, run uv lock.

I thought this was just a warning...

Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
@consideRatio
Copy link
Copy Markdown
Collaborator Author

I thought this was just a warning...

It is made into an error when you specify --locked, I did that before in some PR, so the behavior changed with that

Signed-off-by: Erik Sundell <erik.sundell+2025@sensmetry.com>
@consideRatio consideRatio changed the title ci: use prek in CI, and phase out pre-commit and pre-commit.ci ci: prek in CI, remove pre-commit(.ci), add mypy and zizmor (gha security checks) Apr 2, 2026
@consideRatio consideRatio changed the title ci: prek in CI, remove pre-commit(.ci), add mypy and zizmor (gha security checks) ci: prek for lint/formatting, remove pre-commit(.ci), add zizmor prek hook for GitHub Actions security checks Apr 2, 2026
Comment on lines +13 to +25
# FIXME: artipacked was disabled on introduction to avoid erroring, try fix
# issues or motivate why it should remain disabled
cache-poisoning:
disable: true

# FIXME: cache-poisoning was disabled on introduction to avoid erroring, try
# fix issues or motivate why it should remain disabled
excessive-permissions:
disable: true

# FIXME: excessive-permissions was disabled on introduction to avoid erroring,
# try fix issues or motivate why it should remain disabled
secrets-outside-env:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The names in these FIXMEs don't quite match up.

@consideRatio
Copy link
Copy Markdown
Collaborator Author

@andrius-puksta-sensmetry @victor-linroth-sensmetry okay to go with this?

I've started working on some zizmor things in a followup PR, with #250 (review) fixed already

Copy link
Copy Markdown
Collaborator

@andrius-puksta-sensmetry andrius-puksta-sensmetry left a comment

Choose a reason for hiding this comment

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

Good to go, just split out zizmor stuff into #251.

Signed-off-by: Erik Sundell <erik.sundell@sensmetry.com>
@consideRatio consideRatio changed the title ci: prek for lint/formatting, remove pre-commit(.ci), add zizmor prek hook for GitHub Actions security checks ci: prek for lint/formatting, remove pre-commit(.ci) Apr 3, 2026
@consideRatio consideRatio enabled auto-merge (rebase) April 3, 2026 12:16
@consideRatio consideRatio disabled auto-merge April 3, 2026 12:16
@consideRatio consideRatio enabled auto-merge (squash) April 3, 2026 12:17
@consideRatio consideRatio merged commit 5303c1a into sensmetry:main Apr 3, 2026
51 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.

4 participants