:py:mod:`oioioi.zeus.package` ============================= .. py:module:: oioioi.zeus.package Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.zeus.package.ZeusPackage oioioi.zeus.package.ZeusPackageCreator oioioi.zeus.package.ZeusPackageBackend Attributes ~~~~~~~~~~ .. autoapisummary:: oioioi.zeus.package.logger .. py:data:: logger .. py:class:: ZeusPackage(path, original_filename=None) Bases: :py:obj:`oioioi.sinolpack.package.SinolPackage` .. py:attribute:: controller_name :annotation: = oioioi.zeus.controllers.ZeusProblemController .. py:attribute:: package_backend_name :annotation: = oioioi.zeus.package.ZeusPackageBackend .. py:method:: _find_main_dir() Looks for the directory which contains at least the in/ and out/ subdirectories. Only one such directory should be found. Otherwise None is returned. .. py:method:: _save_zeus_data() .. py:method:: _process_package() .. py:class:: ZeusPackageCreator(problem) Bases: :py:obj:`oioioi.sinolpack.package.SinolPackageCreator` Responsible for packing SinolPackages. .. py:method:: _pack_tests() .. py:class:: ZeusPackageBackend Bases: :py:obj:`oioioi.sinolpack.package.SinolPackageBackend` Backend that use :class:`~oioioi.sinolpack.package.SinolPackage` to unpack and :class:`~oioioi.sinolpack.package.SinolPackageCreator` to pack sinol packages. .. py:attribute:: description .. py:attribute:: package_class .. py:method:: identify(path, original_filename=None) Checks if the backend is suitable for processing the specified problem package. :param path: a path to the processed problem package :param original_filename: the name of the package specified by the uploading user. Returns ``True`` if the backend can handle the specified problem package file. .. py:method:: pack(problem) Creates a package from problem, returns a :class:`django.http.HttpResponse` instance. Should raise ``NotImplementedError`` if creating packages is not supported.