jupyter-cache icon indicating copy to clipboard operation
jupyter-cache copied to clipboard

Replicate Quantecon Execution Reporting

Open chrisjsewell opened this issue 5 years ago • 1 comments

See: https://python.quantecon.org/status.html

This can be achieved by:

  1. Staging all notebooks for execution
  2. Running execution (which will only run for notebooks that don't exist in the cache)
  3. During/after execution, successfully executed notebooks will be committed to the cache with commit records containing data like execution_time (as implemented in #13)
  4. During/after execution, failed notebooks would also be stored in the cache, in a separate folder, with a 'failure record' that's linked to the 'staged record' (not yet implemented). This will be deleted when the notebook is unstaged or execution re-run.
  5. Then, given a staged PK/URI, you can work out the build status, based on whether a complimentary commit/failure record exists, and retrieve any requisite data/notebooks.

chrisjsewell avatar Feb 25 '20 21:02 chrisjsewell

For html plugins to parse the reports we will need to define a default report structure. In QuantEcon we have used json with the following structure but we may want to think a bit more deeply about what fields we wish to record etc.

{
    "results": [
        {
            "filename": "404",
            "runtime": "0:02.7",
            "num_errors": 0,
            "extension": "py",
            "language": "python3"
        },
        {
            "filename": "about_lectures",
            "runtime": "0:00.9",
            "num_errors": 0,
            "extension": "py",
            "language": "python3"
        },
       ...
    ],
    "run_time": "19-02-2020 15:30:22"
}

mmcky avatar Feb 25 '20 23:02 mmcky