Skip to main content

Automatic logging of student code development and test runs

Project description

learnlog

A Python package that automatically logs code development and program runs.

By adding import learnlog as the first import in a Python file, every program run is recorded transparently: source code changes, command-line arguments, standard input/output/error, and unhandled exceptions. The data is stored in a hidden local Git repository.

Use cases

  • Sharing live-coding sessions. A teacher adds import learnlog to demonstration scripts during a lecture or tutorial. After the session the teacher pushes the log to a remote repository:

    learnlog set-remote git@gitlab.kth.se:dbosk/lecture01.git
    learnlog push
    

    Students clone the log and replay it step by step:

    learnlog clone git@gitlab.kth.se:dbosk/lecture01.git
    learnlog play
    

    Alternatively, when a shared Git remote is not available, the teacher can export the log as a portable bundle file:

    learnlog export -o lecture01.bundle
    

    The teacher distributes the file (e.g. via a course page) and students replay it directly:

    learnlog play lecture01.bundle
    
  • Studying how students code. A researcher creates an empty Git repository for each student. Each student adds import learnlog to their programs and pushes the log:

    learnlog set-remote git@gitlab.kth.se:dbosk/alice-log.git
    learnlog push
    

    The researcher then clones each student's repository to analyse the development data:

    learnlog clone git@gitlab.kth.se:dbosk/alice-log.git
    learnlog play
    learnlog analyse X-Tag=lab1 X-Tag=lab2
    

    The analyse command generates LaTeX reports of edit--run cycles. The optional positional arguments filter events by Column=Regex boundaries—here, only events between tags lab1 and lab2 are included.

    Alternatively, the student can export the log as a bundle and submit it through the course platform:

    learnlog export -o alice-log.bundle
    

    The researcher then replays it directly:

    learnlog play alice-log.bundle
    

    This gives a complete timeline of how students develop and debug their code — for research purposes or to help students refine their debugging techniques.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

learnlog-0.10.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

learnlog-0.10-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file learnlog-0.10.tar.gz.

File metadata

  • Download URL: learnlog-0.10.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.7 Linux/6.17.0-19-generic

File hashes

Hashes for learnlog-0.10.tar.gz
Algorithm Hash digest
SHA256 2f4eb5e60a2ad82baddfe3765e582d98d18257ace6d658a2aece5277185ebf19
MD5 415b962cb257d5ea2745d046c0f27d4c
BLAKE2b-256 4a579f269ebabbc4c66d3a7b9f6683f72f1aa843dd55dc48733c9788c8fb3727

See more details on using hashes here.

File details

Details for the file learnlog-0.10-py3-none-any.whl.

File metadata

  • Download URL: learnlog-0.10-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.7 Linux/6.17.0-19-generic

File hashes

Hashes for learnlog-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d99288e8a35241d6357e0b0969b7aa82ed11fcfdbbe8abf6f03571a65dce4d6b
MD5 e999e61989e2e13239303206176e5b94
BLAKE2b-256 f9f2a3d00f7e0396be985ecb3e80617c7ca9b5038a8d5f7f3ed4dfa77030f9cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page