Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Update document of callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
wxh06 committed Jul 16, 2020
1 parent 8615d75 commit d9f6ed1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
14 changes: 7 additions & 7 deletions dockerjudge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ def judge(processor, source, tests, config=None,
Tese case
=== ================================== =====================
Key Value type Description
=== ================================== =====================
`0` :class:`dockerjudge.status.Status` Status code
`1` `tuple` `stdout` and `stderr`
`2` `float` Time used
=== ================================== =====================
=== =================================== =====================
Key Value type Description
=== =================================== =====================
`0` :class:`~dockerjudge.status.Status` Status code
`1` `tuple` `stdout` and `stderr`
`2` `float` Time used
=== =================================== =====================
"""
config = config or {}
container = client.containers.run(
Expand Down
29 changes: 29 additions & 0 deletions docs/__init__.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
=========================
:mod:`dockerjudge` - Main
=========================

.. automodule:: dockerjudge

Judge
=====

.. autofunction:: dockerjudge.judge

Callback
========

Compile
-------

========= ================= =================================================
Parameter Type Description
========= ================= =================================================
`0` `int` Return value of the compiler
`1` `byte` or `tuple` Output of compiler, value type depends on `demux`
========= ================= =================================================

Judge
-----

========= =================================== ===============================
Parameter Type Description
========= =================================== ===============================
`0` `int` Test case id, starting from `0`
`1` :class:`~dockerjudge.status.Status` Status
`2` `tuple` Output `(stdout, stderr)`
`3` `float` Time used
========= =================================== ===============================

0 comments on commit d9f6ed1

Please sign in to comment.