Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/check-schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Check JSON Schema

on:
pull_request:
branches:
- dev

jobs:
generate-schema:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install .

- name: Generate JSON Schema
run: |
python -m scripts.generate_json_schema_config

- name: Check for changes in JSON Schema
run: |
if ! git diff --quiet docs/optimizer_config.schema.json; then
echo "Error: docs/optimizer_config.schema.json has been modified after running the generator script."
exit 1
else
echo "No changes detected in docs/optimizer_config.schema.json."
fi
45 changes: 0 additions & 45 deletions .github/workflows/generate-schema.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@ clean-docs:
rm -rf docs/source/autoapi
rm -rf docs/source/user_guides

.PHONY: schema
schema:
$(poetry) python -m scripts.generate_json_schema_config

.PHONY: all
all: lint
16 changes: 9 additions & 7 deletions docs/optimizer_config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,24 +441,26 @@
"title": "Module Name",
"type": "string"
},
"cv": {
"embedder_name": {
"items": {
"type": "integer"
"type": "string"
},
"title": "Cv",
"title": "Embedder Name",
"type": "array"
},
"embedder_name": {
"cv": {
"default": [
3
],
"items": {
"type": "string"
"type": "integer"
},
"title": "Embedder Name",
"title": "Cv",
"type": "array"
}
},
"required": [
"module_name",
"cv",
"embedder_name"
],
"title": "LogregAimedEmbeddingInitModel",
Expand Down