Skip to content

Commit

Permalink
Update version to 0.1.39 and finalize build.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed Jan 28, 2022
1 parent 2d5fc88 commit 0109fd6
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 54 deletions.
1 change: 1 addition & 0 deletions js/CompletionCriteria.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default {
};

export const SCHEMA = {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Schema for completion criteria of content nodes",
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "0.1.38"
"version": "0.1.39"
}
105 changes: 53 additions & 52 deletions le_utils/constants/completion_criteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,57 @@
]

SCHEMA = {
"type": "object",
"description": "Schema for completion criteria of content nodes",
"anyOf": [
{
"required": ["threshold"],
"properties": {
"threshold": {"exclusiveMinimum": 0, "type": "number"},
"model": {
"anyOf": [
{"const": "time"},
{"const": "approx_time"},
{"const": "pages"},
]
},
},
},
{
"required": ["threshold"],
"properties": {
"threshold": {"$ref": "#/definitions/mastery_criteria"},
"model": {"const": "mastery"},
},
},
{
"required": [],
"properties": {
"threshold": {"type": "null"},
"model": {"const": "reference"},
},
},
],
"required": ["model"],
"additionalProperties": False,
"definitions": {
"model": {
"type": "string",
"$exportConstants": "completion_criteria",
"enum": ["time", "approx_time", "pages", "mastery", "reference"],
"type": "string",
},
"mastery_criteria": {
"type": "object",
"$comment": "TODO move to separate schema",
"additionalProperties": False,
"required": ["mastery_model"],
"properties": {
"m": True,
"n": True,
"mastery_model": {
"type": "string",
"enum": [
"do_all",
"m_of_n",
"num_correct_in_a_row_2",
"num_correct_in_a_row_3",
"num_correct_in_a_row_5",
"num_correct_in_a_row_10",
],
},
},
"additionalProperties": False,
"$comment": "TODO move to separate schema",
"anyOf": [
{
"properties": {"mastery_model": {"const": "m_of_n"}},
"required": ["m", "n"],
"properties": {"mastery_model": {"const": "m_of_n"}},
},
{
"properties": {
"m": {"type": "null"},
"mastery_model": {
"enum": [
"do_all",
Expand All @@ -72,46 +87,32 @@
"num_correct_in_a_row_10",
]
},
"m": {"type": "null"},
"n": {"type": "null"},
}
},
],
"properties": {
"mastery_model": {
"enum": [
"do_all",
"m_of_n",
"num_correct_in_a_row_2",
"num_correct_in_a_row_3",
"num_correct_in_a_row_5",
"num_correct_in_a_row_10",
],
"type": "string",
},
"m": True,
"n": True,
},
},
},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"threshold": True,
"model": {"$ref": "#/definitions/model"},
"learner_managed": {"type": "boolean"},
"threshold": True,
},
"required": ["model"],
"anyOf": [
{
"properties": {
"model": {
"anyOf": [
{"const": "time"},
{"const": "approx_time"},
{"const": "pages"},
]
},
"threshold": {"type": "number", "exclusiveMinimum": 0},
},
"required": ["threshold"],
},
{
"properties": {
"model": {"const": "mastery"},
"threshold": {"$ref": "#/definitions/mastery_criteria"},
},
"required": ["threshold"],
},
{
"properties": {
"model": {"const": "reference"},
"threshold": {"type": "null"},
},
"required": [],
},
],
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
setup(
name="le-utils",
packages=find_packages(),
version="0.1.38",
version="0.1.39",
description="LE-Utils contains shared constants used in Kolibri, Ricecooker, and Kolibri Studio.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 0109fd6

Please sign in to comment.