Skip to main content

Assess your students' work with all of the delight and none of the tedium

Project description

Markten

Assess your students' work with all of the delight and none of the tedium.

Markten is an automation framework aimed at reducing the pain of marking student assignments in bulk. By writing a simple recipe, you can define the steps you take to mark an assignment, which can be anything from fetching submissions, compiling their code, viewing their codebase in an IDE, or running a test suite. It's all done with simple readable Python, with enough power under the hood to make even the most annoying workflows trivial.

Installing

$ pip install markten
...
Successfully installed markten-1.0.0

Or to install in an independent environment, you can use pipx or uv:

$ pipx install markten
  installed package markten 1.0.0, installed using Python 3.12.6
  These apps are now globally available
    - markten
done!  🌟 ✨
$ uv tool install markten
Resolved 10 packages in 2ms
Installed 10 packages in 11ms
 + aiosqlite==0.21.0
 + click==8.2.1
 + humanize==4.12.3
 + markdown-it-py==3.0.0
 + markten==1.0.0
 + mdurl==0.1.2
 + platformdirs==4.3.8
 + pygments==2.19.1
 + rich==13.9.4
 + typing-extensions==4.14.0
Installed 1 executable: markten

Running recipes

You can execute the recipe directly, like you would any Python script:

$ python my_recipe.py
...

You can also use the markten executable if you want to keep markten's dependencies in an isolated environment. The Python script you provide as an argument is executed within that environment.

$ markten my_recipe.py
...

How it works

Define your recipe parameters. For example, this recipe takes in git repo names from stdin.

from markten import Recipe, ActionSession, parameters, actions

marker = Recipe("Clone COMP1010 repos")

marker.parameter("repo", parameters.stdin("Repo name"))

Write simple marking recipes by defining simple functions for each step.

# Functions can take arbitrary parameters, as long as those parameters were
# defined earlier in the script.
# Using the `Recipe.step` decorator allows us to register an action as a step
# to the recipe.
@marker.step
async def setup(action: ActionSession, repo: str):
    """Set up marking environment"""
    # Clone the given git repo to a temporary directory
    directory = await actions.git.clone(action, f"git@github.com:COMP1010UNSW/{repo}.git")
    return {
        "directory": directory,
    }

The values returned by your previous steps can be used in later steps, just by giving the function parameters the same name.

@marker.step
def open_code(action: ActionSession, directory: Path):
    """Open the cloned git repo in VS Code"""
    return actions.editor.vs_code(action, directory)

Then run the recipe. It'll run for every permutation of your parameters, making it easy to mark in bulk.

marker.run()

For more examples, see the examples directory.

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

markten-1.3.3.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

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

markten-1.3.3-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file markten-1.3.3.tar.gz.

File metadata

  • Download URL: markten-1.3.3.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for markten-1.3.3.tar.gz
Algorithm Hash digest
SHA256 fa49a1f3481540342a31a9e1cd63dbd94bdf3e508098afe8c113c09a231aaf60
MD5 b4905bae3bc84ba30f3cfb3e6418991f
BLAKE2b-256 efb1d574b888ee871ff819557c9c12fa53af7da5c5c8f99a580b7445b55eb8c3

See more details on using hashes here.

File details

Details for the file markten-1.3.3-py3-none-any.whl.

File metadata

  • Download URL: markten-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 38.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for markten-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 45792d9bd9f7af76b8fe8b95fca9a233bebd5422b8e49f6b9463d5467ec4f652
MD5 ebc20abb760f308aba43a221660dd5dc
BLAKE2b-256 397e7d915e95ead8bec401db6eae137499cd72799b30654dfca4afd1ee606e18

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