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
You can install globally using your preferred tool:
# Any of
$ pipx install markten
$ uv tool install markten
$ mise install -g pipx:markten
If you are using it for a specific project, you should add it to that project's Python environment:
$ uv add markten
# Or use any other Python project manager
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.
Release files for markten 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| markten-1.4.0.tar.gz | 27.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| markten-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.7 kB
Release files / markten-1.4.0.tar.gz
| Download URL | markten-1.4.0.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a3b69582ef878ee89d1a691072b17b0d0517cda72dabaf4e64530741fa7c62d
|
|
BLAKE2b-256 checksum How to use checksums |
ff65dc4dafcf5a6b5e9a2ff790b147b1e72af15f9c032f9e31dac57a61f4983d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / markten-1.4.0-py3-none-any.whl
| Download URL | markten-1.4.0-py3-none-any.whl |
|---|---|
| Size | 41.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1def693c58e2582c71eb478dee1a34d15abf5b70d5f8cfee6c14864385cf67a0
|
|
BLAKE2b-256 checksum How to use checksums |
ff2f15fea15ef865807451f9d7b3b72caf2823504d0ca04b7ab0a18857e32628
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|