|
276 | 276 | }, |
277 | 277 | "stdin" : { |
278 | 278 | "description" : "Stdin for this context", |
279 | | - "type" : [ |
280 | | - "string", |
281 | | - "number", |
282 | | - "integer", |
283 | | - "boolean" |
| 279 | + "oneOf" : [ |
| 280 | + { |
| 281 | + "type" : [ |
| 282 | + "string", |
| 283 | + "number", |
| 284 | + "integer", |
| 285 | + "boolean" |
| 286 | + ] |
| 287 | + }, |
| 288 | + { |
| 289 | + "$ref": "#/definitions/fileData" |
| 290 | + } |
284 | 291 | ] |
285 | 292 | }, |
286 | 293 | "arguments" : { |
|
336 | 343 | ] |
337 | 344 | }, |
338 | 345 | "files" : { |
| 346 | + "description" : "Deprecated: use input_files instead.", |
339 | 347 | "type" : "array", |
340 | 348 | "items" : { |
341 | 349 | "$ref" : "#/definitions/file" |
342 | 350 | } |
343 | 351 | }, |
| 352 | + "input_files": { |
| 353 | + "type": "array", |
| 354 | + "items": { |
| 355 | + "$ref": "#/definitions/fileDataRequiredPath" |
| 356 | + } |
| 357 | + }, |
344 | 358 | "return" : { |
345 | 359 | "description" : "Expected return value", |
346 | 360 | "$ref" : "#/definitions/returnOutputChannel" |
|
354 | 368 | "$ref" : "#/definitions/textOutputChannel" |
355 | 369 | }, |
356 | 370 | "file": { |
| 371 | + "description" : "Deprecated: use output_files instead.", |
| 372 | + "$ref" : "#/definitions/fileOutputChannel" |
| 373 | + }, |
| 374 | + "output_files": { |
357 | 375 | "description" : "Expected files generated by the submission.", |
358 | 376 | "$ref" : "#/definitions/fileOutputChannel" |
359 | 377 | }, |
|
598 | 616 | } |
599 | 617 | } |
600 | 618 | }, |
| 619 | + { |
| 620 | + "type" : "object", |
| 621 | + "description" : "Built-in oracle for files.", |
| 622 | + "required" : [ |
| 623 | + "data" |
| 624 | + ], |
| 625 | + "properties" : { |
| 626 | + "data" : { |
| 627 | + "type" : "array", |
| 628 | + "description" : "Files to expect.", |
| 629 | + "items" : { |
| 630 | + "$ref" : "#/definitions/fileDataFullyRequired" |
| 631 | + } |
| 632 | + }, |
| 633 | + "oracle" : { |
| 634 | + "const" : "builtin" |
| 635 | + }, |
| 636 | + "config" : { |
| 637 | + "$ref" : "#/definitions/fileConfigurationOptions" |
| 638 | + } |
| 639 | + } |
| 640 | + }, |
| 641 | + { |
| 642 | + "type" : "array", |
| 643 | + "description" : "Built-in oracle for files.", |
| 644 | + "items" : { |
| 645 | + "$ref" : "#/definitions/fileDataFullyRequired" |
| 646 | + } |
| 647 | + }, |
601 | 648 | { |
602 | 649 | "type" : "object", |
603 | 650 | "description" : "Custom oracle for file values.", |
|
643 | 690 | } |
644 | 691 | } |
645 | 692 | } |
| 693 | + }, |
| 694 | + { |
| 695 | + "type" : "object", |
| 696 | + "description" : "Custom oracle for file values.", |
| 697 | + "required" : [ |
| 698 | + "oracle", |
| 699 | + "data" |
| 700 | + ], |
| 701 | + "properties" : { |
| 702 | + "oracle" : { |
| 703 | + "const" : "custom_check" |
| 704 | + }, |
| 705 | + "data" : { |
| 706 | + "type" : "array", |
| 707 | + "description" : "Files to expect.", |
| 708 | + "items" : { |
| 709 | + "$ref" : "#/definitions/fileDataFullyRequired" |
| 710 | + } |
| 711 | + }, |
| 712 | + "file" : { |
| 713 | + "type" : "string", |
| 714 | + "description" : "The path to the file containing the custom check function." |
| 715 | + }, |
| 716 | + "name" : { |
| 717 | + "type" : "string", |
| 718 | + "description" : "The name of the custom check function.", |
| 719 | + "default" : "evaluate" |
| 720 | + }, |
| 721 | + "arguments" : { |
| 722 | + "type" : "array", |
| 723 | + "description" : "List of YAML (or tagged expression) values to use as arguments to the function.", |
| 724 | + "items" : { |
| 725 | + "$ref" : "#/definitions/yamlValueOrPythonExpression" |
| 726 | + } |
| 727 | + }, |
| 728 | + "languages": { |
| 729 | + "type" : "array", |
| 730 | + "description" : "Which programming languages are supported by this oracle.", |
| 731 | + "items" : { |
| 732 | + "$ref" : "#/definitions/programmingLanguage" |
| 733 | + } |
| 734 | + } |
| 735 | + } |
646 | 736 | } |
647 | 737 | ] |
648 | 738 | }, |
|
890 | 980 | "$ref" : "#/definitions/fileConfigurationOptions" |
891 | 981 | } |
892 | 982 | } |
| 983 | + }, |
| 984 | + "fileData": { |
| 985 | + "type": "object", |
| 986 | + "additionalProperties" : false, |
| 987 | + "anyOf" : [ |
| 988 | + { |
| 989 | + "required" : [ |
| 990 | + "content" |
| 991 | + ] |
| 992 | + }, |
| 993 | + { |
| 994 | + "required" : [ |
| 995 | + "path" |
| 996 | + ] |
| 997 | + } |
| 998 | + ], |
| 999 | + "properties": { |
| 1000 | + "content": { |
| 1001 | + "type": [ |
| 1002 | + "string", |
| 1003 | + "path" |
| 1004 | + ], |
| 1005 | + "description" : "Content of the file, which will be provided inline or written to disk in the workdir. If a !path, the file contents will be read from the provided path." |
| 1006 | + }, |
| 1007 | + "path": { |
| 1008 | + "type": "string", |
| 1009 | + "description" : "Path to the file, relative to the workdir. Used to display in the output." |
| 1010 | + } |
| 1011 | + } |
| 1012 | + }, |
| 1013 | + "fileDataRequiredPath": { |
| 1014 | + "type": "object", |
| 1015 | + "additionalProperties" : false, |
| 1016 | + "required" : [ |
| 1017 | + "path" |
| 1018 | + ], |
| 1019 | + "properties": { |
| 1020 | + "content": { |
| 1021 | + "type": [ |
| 1022 | + "string", |
| 1023 | + "path" |
| 1024 | + ], |
| 1025 | + "description" : "Content of the file, which will be provided inline or written to disk in the workdir. If a !path, the file contents will be read from the provided path." |
| 1026 | + }, |
| 1027 | + "path": { |
| 1028 | + "type": "string", |
| 1029 | + "description" : "Path to the file, relative to the workdir. Used to display in the output." |
| 1030 | + } |
| 1031 | + } |
| 1032 | + }, |
| 1033 | + "fileDataFullyRequired": { |
| 1034 | + "type": "object", |
| 1035 | + "additionalProperties" : false, |
| 1036 | + "required" : [ |
| 1037 | + "path", |
| 1038 | + "content" |
| 1039 | + ], |
| 1040 | + "properties": { |
| 1041 | + "content": { |
| 1042 | + "type": [ |
| 1043 | + "string", |
| 1044 | + "path" |
| 1045 | + ], |
| 1046 | + "description" : "Content of the file, which will be provided inline or written to disk in the workdir. If a !path, the file contents will be read from the provided path." |
| 1047 | + }, |
| 1048 | + "path": { |
| 1049 | + "type": "string", |
| 1050 | + "description" : "Path to the file, relative to the workdir. Used to display in the output." |
| 1051 | + } |
| 1052 | + } |
893 | 1053 | } |
894 | 1054 | } |
895 | 1055 | } |
0 commit comments