You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue exists to generate a consensus on the content of the pre-commit config file employed in this repository.
At present, the author employs the following pre-commit config file.
Author's Pre-Commit Config File
repos:
################################################################################# GENERAL################################################################################
- repo: https://github.com/pre-commit/pre-commit-hooksrev: v5.0.0hooks:
- id: check-added-large-filesargs: ["--maxkb=10000"]
- id: check-yamlargs: ["--allow-multiple-documents"]
- id: check-toml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pre-commit-hooksrev: v5.0.0hooks:
# prevent giant files from being committed.
- id: check-added-large-filesargs: ["--maxkb=10000"]# simply check whether files parse as valid# python
- id: check-ast# check for files with names that would# conflict on a case-insensitive filesystem# like MacOS HFS+ or Windows FAT.
- id: check-case-conflict# checks for a common error of placing# code before the docstring.
- id: check-docstring-first# attempts to load all yaml files to# verify syntax.
- id: check-yaml# allow yaml files which use the# multi-document syntaxargs: ["--allow-multiple-documents"]# attempts to load all TOML files to# verify syntax.
- id: check-toml# makes sure files end in a newline and# only a newline.
- id: end-of-file-fixer# replaces or checks mixed line ending.
- id: mixed-line-ending# verifies that test files are named# correctly.
- id: name-tests-test# ensure tests match test_.*\.pyargs: ["--pytest-test-first"]# trims trailing whitespace.
- id: trailing-whitespace# checks that non-binary executables have# a proper shebang.
- id: check-executables-have-shebangsfiles: \.sh$################################################################################# QUARTO README RENDERING################################################################################
- repo: localhooks:
- id: render-quarto-readmename: "render README.qmd as README.md"entry: "./scripts/hooks/render-quarto-readme.sh"language: scriptalways_run: truefiles: "README.(q|)md"################################################################################# PYTHON################################################################################
- repo: https://github.com/astral-sh/ruff-pre-commitrev: v0.9.4hooks:
# "currently, the Ruff formatter does not sort imports.# In order to both sort imports and format, call# the Ruff linter and then the formatter:"
- id: ruffargs: ["check","--select",# isort"I","--fix"]# run ruff linter; the Ruff Linter is an extremely fast Python linter# designed as a drop-in replacement for Flake8 (plus dozens of plugins),# isort, pydocstyle, pyupgrade, autoflake, and more
- id: ruffargs: [# ambiguous variable name: {name}"--ignore=E741",# do not assign a lambda expression, use a def"--ignore=E731",# found useless expression. ignore since .qmd displays"--ignore=B018",# {name} is too complex ({complexity} > {max_complexity})# note: ignored on select repositories"--ignore=C901",# E and W: pycodestyle, standard PEP8 errors and pycodestyle warnings.# F: pyflakes warnings (e.g., unused variables, undefined names).,# B: flake8-bugbear (useful best practices).# SIM: flake8-simplify# C90: McCabe complexity (cyclomatic complexity).# UP: pyupgrade, Python version compatibility"--select=E,W,F,B,C90,UP,SIM",# linter checks for lines, but doesn't fix, default is 88"--line-length=79",# lint all files in the current directory, and fix any fixable errors."--fix"]# run the ruff-formatter; the Ruff formatter is an extremely fast# Python code formatter designed as a drop-in replacement for Black
- id: ruff-formatargs: ["--line-length=79",]################################################################################# GITHUB ACTIONS################################################################################
- repo: https://github.com/rhysd/actionlintrev: v1.7.7hooks:
- id: actionlint################################################################################# SPELLING################################################################################
- repo: https://github.com/crate-ci/typosrev: typos-dict-v0.12.4hooks:
- id: typosargs: ["--force-exclude"]################################################################################# COMMIT MESSAGES################################################################################
- repo: https://github.com/commitizen-tools/commitizenrev: v4.1.1hooks:
- id: commitizen
- repo: https://github.com/jorisroovers/gitlintrev: v0.19.1hooks:
- id: gitlint################################################################################
Most if not all hooks in this config file have been of use to the author at least several times; however, utility from some of the hooks is infrequent.
Some have suggested that the config file in this repository sync exactly with the one employed in pyrenew (see below), but the author does not perceive this as necessarily useful.
A resolution on the contents of the config file for this repository is wanted by STF members.
This issue exists to generate a consensus on the content of the
pre-commit
config file employed in this repository.At present, the author employs the following
pre-commit
config file.Author's Pre-Commit Config File
Most if not all hooks in this config file have been of use to the author at least several times; however, utility from some of the hooks is infrequent.
Some have suggested that the config file in this repository sync exactly with the one employed in
pyrenew
(see below), but the author does not perceive this as necessarily useful.A resolution on the contents of the config file for this repository is wanted by STF members.
Pyrenew-HEW Config File
The text was updated successfully, but these errors were encountered: