@@ -8,53 +8,113 @@ import typing
88from enum import Enum , auto
99
1010class Dependency :
11+ r"""
12+ Dependency object to refer to previous output.
13+
14+ Path to the output will be provided as an environment variable named `envvar_name`.
15+ """
1116 def __new__ (cls ,ref_to :Output , envvar_name :builtins .str ): ...
1217 ...
1318
1419class EmptyDirectory :
20+ r"""
21+ Empty directory object to be placed in the execution environment.
22+ """
1523 def __new__ (cls ,name :builtins .str ): ...
1624 ...
1725
1826class Execution :
27+ r"""
28+ Execution object to be executed
29+
30+ Script will be run with paths as environment variables specified in `depends_on`.
31+ """
1932 def __new__ (cls ,name :builtins .str , script :ScriptOutput , depends_on :typing .Sequence [Dependency ]): ...
2033 ...
2134
2235class LocalJudge :
36+ r"""
37+ LocalJudge object to run provided procedures in your local environment.
38+ """
2339 def __new__ (cls ,temp_dir :builtins .str | os .PathLike | pathlib .Path ): ...
2440 def run (self , builder :ProcedureBuilder , runtime_text_contents :typing .Mapping [builtins .str , builtins .str ]) -> builtins .str :
41+ r"""
42+ Run the provided procedure in your local environment.
43+ """
2544 ...
2645
2746
2847class Output :
48+ r"""
49+ Output object of each job.
50+
51+ Executions can depend on Output by passing Output object to `depends_on` field of Execution.
52+ """
2953 ...
3054
3155class ProcedureBuilder :
56+ r"""
57+ ProcedureBuilder object to build a procedure.
58+ """
3259 def __new__ (cls ,): ...
3360 def add_resource (self , resource :ResourceKind ) -> Output :
61+ r"""
62+ Add a resource to the procedure.
63+ """
3464 ...
3565
3666 def add_script (self , script :Text ) -> ScriptOutput :
67+ r"""
68+ Add a script to the procedure.
69+ """
3770 ...
3871
3972 def add_execution (self , execution :Execution ) -> Output :
73+ r"""
74+ Add an execution to the procedure.
75+ """
4076 ...
4177
4278 def write_to (self , path :builtins .str | os .PathLike | pathlib .Path ) -> None :
79+ r"""
80+ Export the procedure to a json file.
81+ """
4382 ...
4483
4584
4685class RuntimeText :
86+ r"""
87+ RuntimeText object to be placed in the execution environment.
88+
89+ `label`s have corresponding types of resources determined in judge-run time.
90+ | label | description |
91+ | --- | --- |
92+ | `source` | Submission source code |
93+ | `time_limit` | Time limit(optional) |
94+ | `memory_limit` | Memory limit(optional) |
95+ | `language` | Language of the submission(optional) |
96+ """
4797 def __new__ (cls ,name :builtins .str , label :builtins .str ): ...
4898 ...
4999
50100class ScriptOutput :
51101 ...
52102
53103class Text :
104+ r"""
105+ Text object to be placed in the execution environment.
106+
107+ Contents of Text must be static.
108+ """
54109 def __new__ (cls ,name :builtins .str , path :builtins .str | os .PathLike | pathlib .Path ): ...
55110 ...
56111
57112class ResourceKind (Enum ):
113+ r"""
114+ Resource object to be placed in the execution environment.
115+
116+ EmptyDirectory is an directory and TextFile and RuntimeTextFile are files.
117+ """
58118 EmptyDirectory = auto ()
59119 RuntimeTextFile = auto ()
60120 TextFile = auto ()
0 commit comments