From 1ad59fc86e9f340fec0829032236d9ec8198fa7c Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Thu, 23 May 2024 10:12:59 -0500 Subject: [PATCH] ci: Add python-jsonschema/check-jsonschema pre-commit hook (#2480) * Add https://github.com/python-jsonschema/check-jsonschema pre-commit hook. * Fix schema errors by converting 'choice' dispatch type, which is a string, to 'boolean'. --- .github/workflows/bump-version.yml | 24 +++++++++--------------- .github/workflows/publish-package.yml | 8 +++----- .pre-commit-config.yaml | 8 ++++++++ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index cfd178cac4..3a5b1f0142 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -12,11 +12,9 @@ on: - minor - major release_candidate: - type: choice - description: 'Release candidate?' - options: - - false - - true + type: boolean + description: 'Release candidate' + default: false new_version: description: 'New version to bump to' required: true @@ -27,17 +25,13 @@ on: required: true type: string force: - type: choice - description: 'Force override check?' - options: - - false - - true + type: boolean + description: 'Force override check' + default: false dry_run: - type: choice - description: 'Perform a dry run to check?' - options: - - true - - false + type: boolean + description: 'Perform a dry run to check' + default: true jobs: bump-version: diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 9aced4f4aa..eeb8131afa 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -17,11 +17,9 @@ on: workflow_dispatch: inputs: publish: - type: choice - description: 'Publish to TestPyPI?' - options: - - false - - true + type: boolean + description: 'Publish to TestPyPI' + default: false concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2903cf297a..8012c467c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -73,3 +73,11 @@ repos: - id: codespell files: ^.*\.(py|md|rst)$ args: ["-w", "-L", "hist,gaus"] + +- repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.28.4 + hooks: + - id: check-readthedocs + args: ["--verbose"] + - id: check-github-workflows + args: ["--verbose"]