Skip to content

Update dev instructions to use prek - #1096

Merged
Czaki merged 5 commits into
napari:mainfrom
Czaki:prek_instruction
Aug 6, 2026
Merged

Update dev instructions to use prek#1096
Czaki merged 5 commits into
napari:mainfrom
Czaki:prek_instruction

Conversation

@Czaki

@Czaki Czaki commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

References and relevant issues

Depends on napari/napari#9211

Description

As prek is faster than pre-commit (for example, it uses uv to install tools), we should advertise it and use it.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 4, 2026

@TimMonko TimMonko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for doing this

Comment thread docs/developers/contributing/dev_install.md Outdated
please do not ignore errors lightly.

```{note}
To run `prek` manually, without creating a commit, you can run `prek run --all-files`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is all-files the correct thing here? Unless I've been using -a incorrectly, this lints the entire repo, causing many files to be diffed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

-a is shorter form of --all-files.

One could just run prek run but then it only checks files staged for commit.
And as we keep pre-commit on the whole repo, then prek run --all-files should report problems only in user changed files.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I made napari/napari#9359 to address my confusion. It was line ending shenanigans cuasing all the .py files to get changed by ruff to LF (locally on windows).

Comment thread docs/plugins/virtual_environment_docs/4-developer-tools.md Outdated
Czaki and others added 2 commits August 4, 2026 15:02
Co-authored-by: Tim Monko <timmonko@gmail.com>
@Czaki Czaki added this to the 0.8.1 milestone Aug 4, 2026
@Czaki Czaki added the Full docs preview/ready to merge Adding this label will trigger a full docs build for previewing changes. Also @napari-bot make html label Aug 6, 2026
@Czaki
Czaki merged commit 7d675fc into napari:main Aug 6, 2026
11 of 12 checks passed
@Czaki
Czaki deleted the prek_instruction branch August 6, 2026 14:25
@github-actions github-actions Bot removed the Full docs preview/ready to merge Adding this label will trigger a full docs build for previewing changes. Also @napari-bot make html label Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants