From b5f0c8f39a0fbdf20071895be4a5e19488e735bf Mon Sep 17 00:00:00 2001 From: Vignesh Rao Date: Thu, 27 Jun 2024 09:59:15 -0500 Subject: [PATCH] Update pre-commit configuration Restrict workflow runs based on paths --- .github/workflows/markdown.yml | 5 +++++ .github/workflows/python-publish.yml | 2 ++ .pre-commit-config.yaml | 17 +++++++---------- MANIFEST.in | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/markdown.yml b/.github/workflows/markdown.yml index 623e0575..4263164b 100644 --- a/.github/workflows/markdown.yml +++ b/.github/workflows/markdown.yml @@ -5,6 +5,11 @@ on: push: branches: - master + paths: + - '**/*.md' + - '!jarvis/**' + - '!docs/**' + - '!docs_gen/**' jobs: none-shall-pass: diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index ad523134..134a9555 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -7,6 +7,8 @@ on: push: branches: - master + paths: + - jarvis/** workflow_dispatch: jobs: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb757fcb..67548a44 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,35 +2,32 @@ fail_fast: true exclude: ^(notebooks/|scripts/|.github/|docs/) repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-ast - - id: check-byte-order-marker - id: check-builtin-literals - id: check-case-conflict - id: check-docstring-first - id: check-executables-have-shebangs - # - id: check-json - - id: check-shebang-scripts-are-executable + - id: check-json - id: check-merge-conflict - # - id: check-symlinks + - id: check-shebang-scripts-are-executable - id: check-toml - id: check-vcs-permalinks - id: check-xml - id: check-yaml - id: debug-statements - # - id: destroyed-symlinks - id: detect-aws-credentials - id: detect-private-key - id: end-of-file-fixer - # - id: file-contents-sorter + - id: file-contents-sorter - id: fix-byte-order-marker + - id: forbid-submodules - id: mixed-line-ending - id: name-tests-test - # - id: pretty-format-json - id: requirements-txt-fixer - # - id: sort-simple-yaml + - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/psf/black @@ -40,7 +37,7 @@ repos: exclude: docs_gen/ - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.1.0 hooks: - id: flake8 additional_dependencies: diff --git a/MANIFEST.in b/MANIFEST.in index 0a8bca52..9562cee6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -# MANIFEST.in is mandatory due to a wire range of filetypes +# MANIFEST.in is mandatory due to a wide range of filetypes global-exclude .env global-exclude *.yaml global-exclude .DS_Store