I'm running into an issue with pre-commit I set u...
# random
m
I'm running into an issue with pre-commit I set up an environment
Copy code
conda create --name nf-core python=3.12 nf-core nextflow
conda activate nf-core

pre-commit install 

pre-commit --version
pre-commit 4.0.1
And then I use 4.0.1 as the tag in my .pre-commit-config.yaml file, but get the following error
Copy code
git commit

[INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier.
An unexpected error has occurred: CalledProcessError: command: ('/home/vanme090/.conda/envs/nf-core2/libexec/git-core/git', 'checkout', 'v4.0.1')
return code: 1
stdout: (none)
stderr:
    error: pathspec 'v4.0.1' did not match any file(s) known to git
when I check
Copy code
git ls-remote --tags https://github.com/pre-commit/mirrors-prettier
There's indeed no 4.0.1 tag
m
Can you share your pre-commit-config.yml file? And double check the difference between prettier versions and pre-commit versions
m
Copy code
repos:
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: "4.0.1"
    hooks:
      - id: prettier
m
Yup, you are mixing up the versions here. See our template for the setup with the latest prettier version
m
Ah, I need to use the prettier version. Is this what you're referring to? https://nf-co.re/docs/contributing/code_editors_and_styling/code_formatting
Hmm, I keep running into issues with dependencies with node. If you have a recent template setup let me know 😀
m
Sorry I thought I had the link included in the previous message https://github.com/nf-core/tools/blob/main/nf_core/pipeline-template/.pre-commit-config.yaml