Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON schemas #42

Merged
merged 10 commits into from
Sep 23, 2024
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ pyyaml = "^6.0.1"
pyqt6 = "^6.6.1"
click = "^8.1.7"
pre-commit = "^3.6.0"
jsonschema= "^4.21.1"
python-levenshtein = "^0.25.1"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
53 changes: 53 additions & 0 deletions schema/library.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we missing description_assertions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right. Just added that

"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"library_item_id": {
"type": "integer",
"minimum": 1
},
"description_brief": {
"type": "string"
},
"description_detailed": {
"type": "string"
},
"description_index": {
"type": "array",
"items": {
"type": "string"
}
},
"description_datapoints": {
"type": "object"
},
"description_assertions": {
"type": "array",
"items": {
"type": "string"
}
},
"description_verification_type": {
"enum": [
"rule-based",
"procedure-based"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with just these for now since that we don't have any ml-based one yet. But we might want to add it eventually.

]
},
"assertions_type": {
"enum": [
"pass",
"fail"
]
}
},
"required": [
"library_item_id",
"description_brief",
"description_detailed",
"description_index",
"description_datapoints",
"description_verification_type",
"assertions_type"
],
"additionalProperties": false
}
Loading
Loading