sio3pack.django.sinolpack.handler¶
Module Contents¶
- class sio3pack.django.sinolpack.handler.SinolpackDjangoHandler(package, problem_id)[source]¶
Bases:
sio3pack.django.common.handler.DjangoHandler
Handler for Sinolpack packages in Django. Has additional properties like config, model_solutions, additional_files and attachments.
- Parameters:
- property model_solutions: list[dict[str, Any]]¶
A list of model solutions, where each element is a dictionary containing a
RemoteFile
object and thesio3pack.packages.sinolpack.enums.ModelSolutionKind
kind.
- property additional_files: list[sio3pack.files.remote_file.RemoteFile]¶
A list of additional files (as
RemoteFile
) for the problem.- Return type:
- property special_files: dict[str, sio3pack.files.remote_file.RemoteFile]¶
A dictionary of special files (as
RemoteFile
) for the problem. The keys are the types of the special files.- Return type:
- property extra_execution_files: list[sio3pack.files.remote_file.RemoteFile]¶
A list of extra execution files (as
RemoteFile
) specified in the config file.- Return type:
- property extra_compilation_files: list[sio3pack.files.remote_file.RemoteFile]¶
A list of extra compilation files (as
RemoteFile
) specified in the config file.- Return type:
- property attachments: list[sio3pack.files.remote_file.RemoteFile]¶
A list of attachments (as
RemoteFile
) related to the problem.- Return type:
- property extra_files: dict[str, sio3pack.files.remote_file.RemoteFile]¶
A dictionary of extra files (as
RemoteFile
) for the problem, as specified in the config file. The keys are the paths of the files in the package.- Return type:
- get_extra_file(package_path)[source]¶
Get an extra file (as
RemoteFile
) for the problem.- Parameters:
package_path (str) – The path of the file in the package.
- Returns:
The extra file (as
RemoteFile
) or None if it does not exist.- Return type:
- package¶
- problem_id¶
- get_executable_path(program)¶
Get the executable path for the given program.
- property lang_titles: dict[str, str]¶
A dictionary of problem titles, where keys are language codes and values are titles.
- property main_model_solution: sio3pack.files.remote_file.RemoteFile¶
The main model solution as a
RemoteFile
.- Return type:
- property lang_statements: dict[str, sio3pack.files.remote_file.RemoteFile]¶
A dictionary of problem statements, where keys are language codes and values are files.
- Return type:
- property tests: list[sio3pack.test.Test]¶
A list of tests, where each element is a dictionary containing
- Return type:
- property workflows: dict[str, sio3pack.workflow.Workflow]¶
A dictionary of workflows, where keys are workflow names and values are
Workflow
objects.- Return type: