Skip to content

Commit

Permalink
chore: add schema refresher
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Oct 21, 2024
1 parent 7ff07a2 commit ba89810
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ ignore = [
# B011 - assert-false
# INP001 - implicit-namespace-package
"tests/*" = ["ANN001", "ANN2", "ANN102", "S101", "B011", "D103", "INP001"]
"scripts/*" = ["INP001"]

[tool.ruff.format]
docstring-code-format = true
13 changes: 13 additions & 0 deletions scripts/update_jsonschema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Update `schema.json` with latest output schema."""

import json
from pathlib import Path

from dcd_mapping.schemas import ScoresetMapping

schema = ScoresetMapping.model_json_schema()
schema_text = json.dumps(schema, indent=4)
file = Path(__file__).parents[1] / "schema.json"

with file.open("w") as f:
f.write(schema_text)

0 comments on commit ba89810

Please sign in to comment.