From 7eaec9c063022aa971151593922bdef1cbb21db5 Mon Sep 17 00:00:00 2001 From: Austin Gregg-Smith Date: Thu, 14 Nov 2024 18:06:24 +0000 Subject: [PATCH] Feature/more pre commit (#65) * add more precommit * fix spelling * pre-commit all --- .pre-commit-config.yaml | 18 +++++++++++++++++- .vscode/extensions.json | 30 +++++++++++++++--------------- README.md | 2 +- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9183eb0..d51dc5f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,10 +22,19 @@ repos: - id: check-case-conflict - id: check-docstring-first - id: check-merge-conflict + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: name-tests-test + - id: detect-private-key - id: check-symlinks + - id: check-toml + - id: check-xml - id: check-yaml args: ['--unsafe'] # Fixes errors parsing custom jinja templates - # - id: debug-statements + # - id: check-json + # - id: pretty-format-json + # args: ['--autofix'] + - id: debug-statements - id: end-of-file-fixer - id: mixed-line-ending # - id: trailing-whitespace @@ -42,3 +51,10 @@ repos: # Run the formatter. - id: ruff-format types_or: [ python, pyi ] + # Checks for spelling mistakes + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 #TODO latest version 2.3.0 finds a lot of spelling mistakes but fails on "assertIn" + hooks: + - id: codespell + args: ['--write-changes'] + exclude: \.(svg|pyc|lock|json)$ diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c31655f..5b53e16 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,17 +1,17 @@ { - "recommendations": [ - "ms-python.python", - "ms-python.vscode-pylance", - "ms-python.pylint", - "ms-python.black-formatter", - "njpwerner.autodocstring", - "charliermarsh.ruff", - "mhutchie.git-graph", - "eamodio.gitlens", - "tamasfe.even-better-toml", - "Codium.codium", - "ms-azuretools.vscode-docker", - "ryanluker.vscode-coverage-gutters", - "jjjermiah.pixi-vscode" - ] + "recommendations": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-python.pylint", + "ms-python.black-formatter", + "njpwerner.autodocstring", + "charliermarsh.ruff", + "mhutchie.git-graph", + "eamodio.gitlens", + "tamasfe.even-better-toml", + "Codium.codium", + "ms-azuretools.vscode-docker", + "ryanluker.vscode-coverage-gutters", + "jjjermiah.pixi-vscode" + ] } diff --git a/README.md b/README.md index 344afae..514a5cc 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ If you don't want to install rocker on your system but want to use vscode, you c ## Troubleshooting -The main pixi tasks are related to CI. Github actions runs the pixi task "ci". The CI is mostly likey to fail from a lockfile mismatch. Use `pixi run fix` to fix any lockfile related problems. +The main pixi tasks are related to CI. Github actions runs the pixi task "ci". The CI is mostly likely to fail from a lockfile mismatch. Use `pixi run fix` to fix any lockfile related problems. ## vscode tasks