Skip to content

Commit 2db47c6

Browse files
authored
[Bugfix:Autograding] schema validation errors and unbuffer output (#31)
1 parent 7eeb980 commit 2db47c6

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

examples/16_docker_network_python/config/config.json

+27-31
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// (e.g. when specifying outgoing connections). By default containers are named
2828
// container0, container1, container2, etc.
2929
"container_name" : "alpha",
30-
"commands" : ["python3 server.py"],
30+
"commands" : ["python3 -u server.py"],
3131
//outgoing_connections list the containers that this container is allowed to network to.
3232
"outgoing_connections" : ["beta", "charlie"]
3333
// You can specify a docker image here, and if it is built on submitty, this container
@@ -37,19 +37,19 @@
3737
},
3838
{
3939
"container_name" : "beta",
40-
"commands" : ["python3 server.py"],
40+
"commands" : ["python3 -u server.py"],
4141
"outgoing_connections" : ["alpha", "charlie"]
4242
},
4343
{
4444
"container_name" : "charlie",
45-
"commands" : ["python3 server.py"],
45+
"commands" : ["python3 -u server.py"],
4646
"outgoing_connections" : ["alpha", "beta"]
4747
},
4848
{
4949
"container_name" : "client",
5050
// It can be important to ensure your container's start in the correct order.
5151
// In this example, we want the server to start before the client, so we add a sleep command.
52-
"commands" : ["python3 client.py"]
52+
"commands" : ["python3 -u client.py"]
5353
// By not specifying a outgoing_connections array, we allow ourselves to connect to all nodes on the network
5454
}
5555
],
@@ -118,7 +118,7 @@
118118
// (e.g. when specifying outgoing connections). By default containers are named
119119
// container0, container1, container2, etc.
120120
"container_name" : "alpha",
121-
"commands" : ["python3 server.py"],
121+
"commands" : ["python3 -u server.py"],
122122
//outgoing_connections list the containers that this container is allowed to network to.
123123
"outgoing_connections" : ["beta", "charlie"]
124124
// You can specify a docker image here, and if it is built on submitty, this container
@@ -128,19 +128,19 @@
128128
},
129129
{
130130
"container_name" : "beta",
131-
"commands" : ["python3 server.py"],
131+
"commands" : ["python3 -u server.py"],
132132
"outgoing_connections" : ["alpha", "charlie"]
133133
},
134134
{
135135
"container_name" : "charlie",
136-
"commands" : ["python3 server.py"],
136+
"commands" : ["python3 -u server.py"],
137137
"outgoing_connections" : ["alpha", "beta"]
138138
},
139139
{
140140
"container_name" : "client",
141141
// It can be important to ensure your container's start in the correct order.
142142
// In this example, we want the server to start before the client, so we add a sleep command.
143-
"commands" : ["python3 client.py"]
143+
"commands" : ["python3 -u client.py"]
144144
// By not specifying a outgoing_connections array, we allow ourselves to connect to all nodes on the network
145145
}
146146
],
@@ -193,15 +193,14 @@
193193
// of messages passed to the student.
194194
{
195195
"sequence_diagram" : true,
196-
"type" : "FileCheck",
196+
"method" : "errorIfEmpty",
197197
"title" : "Sequence Diagram Text File",
198198
"actual_file" : "router/sequence_diagram.txt",
199-
"points" : 0
199+
"deduction" : 0.0
200200
}
201201
]
202202
},
203203
{
204-
//Despite the default being true, this testcase will not use a router.
205204
"use_router" : true,
206205
"title" : "Moderate Testcase, With Router",
207206
"containers" : [
@@ -210,7 +209,7 @@
210209
// (e.g. when specifying outgoing connections). By default containers are named
211210
// container0, container1, container2, etc.
212211
"container_name" : "alpha",
213-
"commands" : ["python3 server.py"],
212+
"commands" : ["python3 -u server.py"],
214213
//outgoing_connections list the containers that this container is allowed to network to.
215214
"outgoing_connections" : ["beta", "charlie"]
216215
// You can specify a docker image here, and if it is built on submitty, this container
@@ -220,20 +219,24 @@
220219
},
221220
{
222221
"container_name" : "beta",
223-
"commands" : ["python3 server.py"],
222+
"commands" : ["python3 -u server.py"],
224223
"outgoing_connections" : ["alpha", "charlie"]
225224
},
226225
{
227226
"container_name" : "charlie",
228-
"commands" : ["python3 server.py"],
227+
"commands" : ["python3 -u server.py"],
229228
"outgoing_connections" : ["alpha", "beta"]
230229
},
231230
{
232231
"container_name" : "client",
233232
// It can be important to ensure your container's start in the correct order.
234233
// In this example, we want the server to start before the client, so we add a sleep command.
235-
"commands" : ["python3 client.py"]
234+
"commands" : ["python3 -u client.py"]
236235
// By not specifying a outgoing_connections array, we allow ourselves to connect to all nodes on the network
236+
},
237+
{
238+
"container_name" : "router",
239+
"commands" : ["python3 -u custom_router.py"]
237240
}
238241
],
239242
"dispatcher_actions" : [
@@ -283,10 +286,10 @@
283286
},
284287
{
285288
"sequence_diagram" : true,
286-
"type" : "FileCheck",
289+
"method" : "errorIfEmpty",
287290
"title" : "Sequence Diagram Text File",
288291
"actual_file" : "router/sequence_diagram.txt",
289-
"points" : 0
292+
"deduction" : 0.0
290293
}
291294
]
292295
},
@@ -297,37 +300,30 @@
297300
"containers" : [
298301
{
299302
"container_name" : "alpha",
300-
"commands" : ["python3 server.py"],
303+
"commands" : ["python3 -u server.py"],
301304
"outgoing_connections" : ["beta", "charlie", "delta"]
302305
},
303306
{
304307
"container_name" : "beta",
305-
"commands" : ["python3 server.py"],
308+
"commands" : ["python3 -u server.py"],
306309
"outgoing_connections" : ["alpha", "charlie", "delta"]
307310
},
308311
{
309312
"container_name" : "charlie",
310-
"commands" : ["python3 server.py"],
313+
"commands" : ["python3 -u server.py"],
311314
"outgoing_connections" : ["alpha", "beta", "delta"]
312315
},
313316
{
314317
"container_name" : "delta",
315-
"commands" : ["python3 server.py"],
318+
"commands" : ["python3 -u server.py"],
316319
"outgoing_connections" : ["alpha", "beta", "charlie"]
317320
},
318321
{
319322
"container_name" : "client",
320323
// It can be important to ensure your container's start in the correct order.
321324
// In this example, we want the server to start before the client, so we add a sleep command.
322-
"commands" : ["python3 client.py"]
325+
"commands" : ["python3 -u client.py"]
323326
// By not specifying a outgoing_connections array, we allow ourselves to connect to all nodes on the network
324-
},
325-
{
326-
"sequence_diagram" : true,
327-
"type" : "FileCheck",
328-
"title" : "Sequence Diagram Text File",
329-
"actual_file" : "router/sequence_diagram.txt",
330-
"points" : 0
331327
}
332328
],
333329
"dispatcher_actions" : [
@@ -385,10 +381,10 @@
385381
},
386382
{
387383
"sequence_diagram" : true,
388-
"type" : "FileCheck",
384+
"method" : "errorIfEmpty",
389385
"title" : "Sequence Diagram Text File",
390386
"actual_file" : "router/sequence_diagram.txt",
391-
"points" : 0
387+
"deduction" : 0.0
392388
}
393389
]
394390
}

0 commit comments

Comments
 (0)