Skip to content

Commit

Permalink
Port common docs to v10
Browse files Browse the repository at this point in the history
  • Loading branch information
thsparks committed May 10, 2024
1 parent 6b9a634 commit 19afea9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
5 changes: 5 additions & 0 deletions common-docs/teachertool/catalog-shared.json
Expand Up @@ -6,6 +6,7 @@
"template": "${Block} used ${count} times",
"description": "This block was used the specified number of times in your project.",
"docPath": "/teachertool",
"tags": ["General"],
"params": [
{
"name": "block",
Expand All @@ -27,6 +28,7 @@
"description": "The project contains at least the specified number of comments.",
"docPath": "/teachertool",
"maxCount": 1,
"tags": ["General"],
"params": [
{
"name": "count",
Expand All @@ -43,6 +45,7 @@
"docPath": "/teachertool",
"description": "The program uses at least this many loops of any kind (for, repeat, while, or for-of).",
"maxCount": 1,
"tags": ["Code Elements"],
"params": [
{
"name": "count",
Expand All @@ -59,6 +62,7 @@
"docPath": "/teachertool",
"description": "At least this many user-defined functions are created and called.",
"maxCount": 1,
"tags": ["Code Elements"],
"params": [
{
"name": "count",
Expand All @@ -75,6 +79,7 @@
"docPath": "/teachertool",
"description": "The program creates and uses at least this many user-defined variables.",
"maxCount": 1,
"tags": ["Code Elements"],
"params": [
{
"name": "count",
Expand Down
1 change: 1 addition & 0 deletions common-docs/teachertool/test/catalog-shared.json
Expand Up @@ -7,6 +7,7 @@
"description": "Experimental: AI outputs may not be accurate. Use with caution and always review responses.",
"docPath": "/teachertool",
"maxCount": 10,
"tags": ["General"],
"params": [
{
"name": "question",
Expand Down
57 changes: 25 additions & 32 deletions common-docs/teachertool/validator-plans-shared.json
Expand Up @@ -86,38 +86,6 @@
}
]
},
{
".desc": "A variable's value is set",
"name": "variable_set",
"threshold": 1,
"checks": [
{
"validator": "blocksExist",
"blockCounts": [
{
"blockId": "variables_set",
"count": 1
}
]
}
]
},
{
".desc": "A variable's value is used",
"name": "variable_accessed",
"threshold": 1,
"checks": [
{
"validator": "blocksExist",
"blockCounts": [
{
"blockId": "variables_get",
"count": 1
}
]
}
]
},
{
".desc": "A parameter's value is used",
"name": "parameter_variable_accessed",
Expand Down Expand Up @@ -301,6 +269,31 @@
"count": 0
}
]
},
{
".desc": "Variable creation & usage validation, with optional name filtering",
"name": "variable_usage",
"threshold": 1,
"checks": [
{
"validator": "variableUsage",
"count": 0,
"name": ""
}
]
},
{
".desc": "The zero number block is present.",
"name": "number_zero",
"threshold": 1,
"checks": [
{
"validator": "blockFieldValueExists",
"fieldType": "NUM",
"fieldValue": 0,
"blockType": "math_number"
}
]
}
]
}

0 comments on commit 19afea9

Please sign in to comment.