diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b23a866 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +--- +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # prettier-ignore + - package-ecosystem: "pip" # See documentation for possible values + # prettier-ignore + directory: "/" # Location of package manifests + - package-ecosystem: "pip" # See documentation for possible values + directory: "/" # Location of package manifests + commit-message: + prefix: "[dependabot] Chore:" + open-pull-requests-limit: 1 + schedule: + interval: "weekly" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f7c0fd..497f1a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,41 +1,161 @@ --- +ci: + autofix_commit_msg: 'Chore: pre-commit autoupdate' + skip: + # pre-commit.ci cannot install WGET, so tomlint must be disabled + - tomllint + # pre-commit.ci throws some error related to Docker! + - shellcheck + +exclude: | + (?x)^( + docs\/conf.py| + dco-signoffs/$ + )$ + repos: + - repo: local + hooks: + - id: tomllint + name: 'Script: scripts/tomllint.sh' + language: script + # pass_filenames: false + files: \^*.toml + types: [file] + entry: scripts/tomllint.sh . + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - - id: trailing-whitespace - - id: check-merge-conflict - - id: end-of-file-fixer - - id: name-tests-test + - id: check-added-large-files + - id: check-ast - id: check-byte-order-marker - id: check-case-conflict - id: check-docstring-first + - id: check-executables-have-shebangs - id: check-json + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks - id: check-toml + # - id: detect-aws-credentials + - id: check-xml - id: check-yaml - - id: check-symlinks - - id: detect-private-key - - id: check-ast - id: debug-statements + - id: detect-private-key + - id: end-of-file-fixer + - id: mixed-line-ending + args: ['--fix=lf'] + - id: name-tests-test + # Do not allow direct push to main/master branches + - id: no-commit-to-branch + # - id: pretty-format-json + - id: requirements-txt-fixer + - id: trailing-whitespace - - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.4 + # Autoformat: YAML, JSON, Markdown, etc. + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.3 hooks: - - id: remove-tabs + - id: prettier + args: + ['--ignore-unknown', '--no-error-on-unmatched-pattern', '!chart/**'] + + # Lint: Markdown + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.37.0 + hooks: + - id: markdownlint + args: ['--fix'] + + # - repo: https://github.com/asottile/pyupgrade + # rev: v3.15.0 + # hooks: + # - id: pyupgrade + # args: ['--py37-plus'] - - repo: https://github.com/psf/black - rev: '23.11.0' + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 23.10.1 hooks: - id: black - - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 23.10.1 + hooks: + - id: black-jupyter + + - repo: https://github.com/jorisroovers/gitlint + rev: v0.19.1 + hooks: + - id: gitlint + + - repo: https://github.com/openstack/bashate + rev: 2.1.1 + hooks: + - id: bashate + args: ['--ignore=E006'] + + - repo: https://github.com/koalaman/shellcheck-precommit + rev: v0.9.0 + hooks: + - id: shellcheck + # Optionally only show errors and warnings + # args: ["--severity=warning"] + + # If you want to avoid flake8 errors due to unused vars or imports: + # - repo: https://github.com/PyCQA/autoflake + # rev: v2.0.0 + # hooks: + # - id: autoflake + # args: [ + # --in-place, + # --remove-all-unused-imports, + # --remove-unused-variables, + # ] + + - repo: https://github.com/PyCQA/isort + rev: 5.12.0 + hooks: + - id: isort + + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.32.0 + hooks: + - id: yamllint + args: [--strict] + + - repo: https://github.com/Mateusz-Grzelinski/actionlint-py + rev: v1.6.26.11 + hooks: + - id: actionlint + + # If like to embrace black styles even in the docs: + # - repo: https://github.com/asottile/blacken-docs + # rev: v1.13.0 + # hooks: + # - id: blacken-docs + # additional_dependencies: [black] + + - repo: https://github.com/pycqa/flake8 + rev: '6.1.0' hooks: - id: flake8 - additional_dependencies: - - pep8-naming - # Ignore all format-related checks as Black takes care of those. - args: - - --ignore=E2, W5, F401, E401 - - --select=E, W, F, N - - --max-line-length=120 + + # Check for misspells in documentation files: + # - repo: https://github.com/codespell-project/codespell + # rev: v2.2.2 + # hooks: + # - id: codespell + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: 'v1.6.1' + hooks: + - id: mypy + + - repo: local + hooks: + - id: pip-audit + name: 'Script: scripts/pipaudit.sh' + language: script + # pass_filenames: false + entry: scripts/pipaudit.sh