diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1ad5bc47..4c00c7502 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -79,3 +79,20 @@ repos: - id: codespell args: ["-L", "sur", "-w"] exclude: ^docs/working-examples\.md$ # Autogenerated + + +- repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.27.0 + hooks: + - id: check-dependabot + - id: check-github-actions + - id: check-github-workflows + - id: check-gitlab-ci + - id: check-readthedocs + - id: check-travis + - id: check-jsonschema + name: Check projects + args: [--schemafile, docs/data/projects.schema.json] + files: '^docs/data/projects.yml$' + - id: check-metaschema + files: '^docs/data/projects.schema.json$' diff --git a/docs/data/projects.schema.json b/docs/data/projects.schema.json new file mode 100644 index 000000000..ba12ccb9e --- /dev/null +++ b/docs/data/projects.schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://github.com/pypa/cibuildwheel/blob/main/cibuildwheel/docs/data/projects.schema.json", + "type": "array", + "description": "The projects file for cibuildwheel", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { "type": "string" }, + "gh": { "type": "string", "pattern": "[^/]*/[^/]*" }, + "stars": { "$ref": "#/items/properties/gh" }, + "pypi": { "type": "string" }, + "notes": { "type": "string" }, + "ci": { + "type": "array", + "items": { + "enum": [ + "github", + "travisci", + "appveyor", + "circleci", + "gitlab", + "cirrusci", + "azurepipelines" + ] + } + }, + "ci_config": { "type": "string" }, + "os": { + "type": "array", + "items": { "enum": ["windows", "apple", "linux"] } + } + }, + "required": ["name", "gh", "ci", "os"] + } +} diff --git a/docs/data/projects.yml b/docs/data/projects.yml index df0e85e4b..6dc23b87b 100644 --- a/docs/data/projects.yml +++ b/docs/data/projects.yml @@ -603,13 +603,13 @@ gh: tensorchord/envd ci: [github] os: [apple, linux, windows] - note: A machine learning development environment build tool + notes: A machine learning development environment build tool - name: mosec gh: mosecorg/mosec ci: [github] os: [linux, apple] - note: A machine learning model serving framework powered by Rust + notes: A machine learning model serving framework powered by Rust - name: ril gh: Cryptex-github/ril-py