diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..abc5eb0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: + - package-ecosystem: pip + directory: /docs/ + schedule: + interval: monthly + allow: + # Allow only production updates for Sphinx + - dependency-name: sphinx + dependency-type: production + groups: + docs: + patterns: + - '*' + - package-ecosystem: github-actions + directory: /.github/workflows + schedule: + interval: monthly + groups: + workflows: + patterns: + - '*' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1974394..4bb7977 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,20 +5,33 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: + # standard end of line/end of file cleanup + - id: mixed-line-ending + - id: end-of-file-fixer + - id: trailing-whitespace + # ensure syntaxes are valid + - id: check-toml + - id: check-yaml + exclude: ^(conda\.)?recipe/meta.yaml + # catch git merge/rebase problems + - id: check-merge-conflict + # sort requirements files + - id: file-contents-sorter + files: | + (?x)^( + docs/requirements.txt | + tests/requirements.*\.txt + ) + args: [--unique] + # other - id: check-added-large-files - id: check-ast - id: fix-byte-order-marker - id: check-case-conflict - - id: check-executables-have-shebangs - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: debug-statements - id: detect-private-key - - id: mixed-line-ending - - id: end-of-file-fixer - - id: trailing-whitespace - - id: check-yaml - exclude: conda.recipe/meta.yaml - repo: https://github.com/asottile/pyupgrade rev: v3.19.0 hooks: @@ -36,3 +49,16 @@ repos: rev: 7.1.1 hooks: - id: flake8 + - repo: meta + # see https://pre-commit.com/#meta-hooks + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + - repo: local + hooks: + - id: git-diff + name: git diff + entry: git diff --exit-code + language: system + pass_filenames: false + always_run: true diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..f34c092 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +furo +mdit-py-plugins>=0.3.0 +myst-parser +sphinx diff --git a/requirements.txt b/tests/requirements.txt similarity index 62% rename from requirements.txt rename to tests/requirements.txt index 4b7f83e..b45110e 100644 --- a/requirements.txt +++ b/tests/requirements.txt @@ -1,15 +1,9 @@ -requests -zstandard >=0.15 -# test -pytest >=7 -pytest-cov -pytest-mock boto3 boto3-stubs[essential] bottle conda -# docs -furo -sphinx -myst-parser -mdit-py-plugins>=0.3.0 +pytest >=7 +pytest-cov +pytest-mock +requests +zstandard >=0.15