Skip to content

Commit

Permalink
ci: Add python-jsonschema/check-jsonschema pre-commit hook
Browse files Browse the repository at this point in the history
* 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'.
  • Loading branch information
matthewfeickert committed May 23, 2024
1 parent b0efa64 commit 702c91a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ on:
- minor
- major
release_candidate:
type: choice
type: boolean
description: 'Release candidate?'
options:
- false
- true
new_version:
description: 'New version to bump to'
required: true
Expand All @@ -27,17 +24,11 @@ on:
required: true
type: string
force:
type: choice
type: boolean
description: 'Force override check?'
options:
- false
- true
dry_run:
type: choice
type: boolean
description: 'Perform a dry run to check?'
options:
- true
- false

jobs:
bump-version:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ on:
workflow_dispatch:
inputs:
publish:
type: choice
type: boolean
description: 'Publish to TestPyPI?'
options:
- false
- true

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 702c91a

Please sign in to comment.