Skip to content

Commit 2da2ab4

Browse files
authored
[Refactor:Developer] Replace submitty_count (#56)
### What is the current behavior? Fixes Submitty [Issue#11784](Submitty/Submitty#11784) - This one of the companion PRs to Submitty [PR#12609](Submitty/Submitty#12609). The tutorial courses 04 - Python Static Analysis, 06 - Loop Types, and 07 - Loop Depth all use `submitty_count` in their autograding configs. This command is being deprecated, so we should update it. ### What is the new behavior? `submitty_count` has been removed from `04 - Python Static Analysis` and `06 - Loop Types` and replaced with `submitty_count_ts` in preparation for deprecation. For `07 - Loop Depth`, there was no equivalent functionality present in `submitty_count_ts` so the testcase is entirely commented out. ### Other information? <!-- Is this a breaking change? --> This specific PR is not a breaking change. However, the other PRs accompanying this one are breaking PRs. <!-- How did you test --> Tested that all homework configs still build and their accompanying still submissions work as intended.
1 parent 15ebc3e commit 2da2ab4

3 files changed

Lines changed: 28 additions & 23 deletions

File tree

examples/04_python_static_analysis/config/config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
// The first is to execute the student code, the second is to count the number of calls to the
88
// "print" function.
99
"command" : [ "python3 *.py",
10-
"submitty_count token -l python Equal *.py",
11-
"submitty_count token -l python Asterisk *.py",
12-
"submitty_count token -l python Plus *.py" ],
10+
"submitty_count_ts -l python node = *.py",
11+
"submitty_count_ts -l python node \\\\* *.py",
12+
"submitty_count_ts -l python node + *.py" ],
1313
"points" : 4,
1414
"validation" : [
1515
// First, ensure that the student received the correct answer.

examples/06_loop_types/config/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"testcases" : [
33
{
44
"title" : "Python - Distinguish for and while Loops",
5-
"command" : [ "submitty_count -l python node for *.py",
6-
"submitty_count -l python token While *.py" ],
5+
"command" : [ "submitty_count_ts -l python node for *.py",
6+
"submitty_count_ts -l python node while *.py" ],
77
"points" : 2,
88
"validation" : [
99
{
Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
1+
// FIXME: In the process of deprecating submitty_count and replacing it with submitty_count_ts, the loop depth functionality
2+
// was lost. This example should either be updated or removed.
13
{
24
"testcases" : [
3-
{
4-
"title" : "Python - Determine Loop Depth",
5+
]
6+
// {
7+
// "title" : "Python - Determine Loop Depth",
58

69
// Here, an instructor-provided static analysis script is used, rather
710
// than one of the provided scripts like count_token and count_function.
811
// This works in much the same way as those scripts.
9-
"command" : [ "submitty_count -l python depth loop *.py" ],
10-
"points" : 10,
11-
"validation" : [
12-
{
13-
"method" : "intComparison",
14-
"actual_file" : "STDOUT.txt",
15-
"description" : "Loop Depth",
12+
// "command" : [ "submitty_count -l python depth loop *.py" ],
13+
// ""
14+
// "command" : [ "submitty_count_ts -l python call print *.py" ],
15+
// "points" : 10,
16+
// "validation" : [
17+
// {
18+
// "method" : "intComparison",
19+
// "actual_file" : "STDOUT.txt",
20+
// "description" : "Loop Depth",
1621

17-
"comparison" : "le",
18-
"term" : 3,
22+
// "comparison" : "ge",
23+
// "term" : 3 ,
1924

20-
"failure_message" : "Must have less than four nested loops",
21-
"show_message" : "always",
22-
"show_actual" : "always"
23-
}
24-
]
25-
}
26-
]
25+
// // "failure_message" : "Must have less than four nested loops",
26+
// // "show_message" : "always",
27+
// "show_actual" : "always"
28+
// }
29+
// ]
30+
// }
31+
// ]
2732
}

0 commit comments

Comments
 (0)