markten


Namemarkten JSON
Version 1.1.1 PyPI version JSON
download
home_pageNone
SummaryAssess your students' work with all of the delight and none of the tedium
upload_time2025-07-21 11:26:50
maintainerNone
docs_urlNone
authorMaddy Guthridge
requires_python>=3.11
licenseNone
keywords marking auto-marker automation xmark imark mark ten
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

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

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

```bash
$ 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:

```sh
$ 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.

```sh
$ markten my_recipe.py
...
```

## How it works

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

```py
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.

```py
# 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.

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

marker.step(open_code)
```

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

```py
marker.run()
```

For more examples, see the examples directory.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "markten",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "marking, auto-marker, automation, xmark, imark, mark, ten",
    "author": "Maddy Guthridge",
    "author_email": "Maddy Guthridge <hello@maddyguthridge.com>",
    "download_url": "https://files.pythonhosted.org/packages/0d/c0/687534712d24e86b2c1817b17b110e00bae80f86e4c29a6c4351710d9ee8/markten-1.1.1.tar.gz",
    "platform": null,
    "description": "# Markten\n\nAssess your students' work with all of the delight and none of the tedium.\n\nMarkten is an automation framework aimed at reducing the pain of marking\nstudent assignments in bulk. By writing a simple recipe, you can define the\nsteps you take to mark an assignment, which can be anything from fetching\nsubmissions, compiling their code, viewing their codebase in an IDE, or running\na test suite. It's all done with simple readable Python, with enough power\nunder the hood to make even the most annoying workflows trivial.\n\n## Installing\n\n```bash\n$ pip install markten\n...\nSuccessfully installed markten-1.0.0\n```\n\nOr to install in an independent environment, you can use `pipx` or `uv`:\n\n```bash\n$ pipx install markten\n  installed package markten 1.0.0, installed using Python 3.12.6\n  These apps are now globally available\n    - markten\ndone! \u2728 \ud83c\udf1f \u2728\n$ uv tool install markten\nResolved 10 packages in 2ms\nInstalled 10 packages in 11ms\n + aiosqlite==0.21.0\n + click==8.2.1\n + humanize==4.12.3\n + markdown-it-py==3.0.0\n + markten==1.0.0\n + mdurl==0.1.2\n + platformdirs==4.3.8\n + pygments==2.19.1\n + rich==13.9.4\n + typing-extensions==4.14.0\nInstalled 1 executable: markten\n```\n\n## Running recipes\n\nYou can execute the recipe directly, like you would any Python script:\n\n```sh\n$ python my_recipe.py\n...\n```\n\nYou can also use the `markten` executable if you want to keep `markten`'s\ndependencies in an isolated environment. The Python script you provide as\nan argument is executed within that environment.\n\n```sh\n$ markten my_recipe.py\n...\n```\n\n## How it works\n\nDefine your recipe parameters. For example, this recipe takes in git repo names\nfrom stdin.\n\n```py\nfrom markten import Recipe, ActionSession, parameters, actions\n\nmarker = Recipe(\"Clone COMP1010 repos\")\n\nmarker.parameter(\"repo\", parameters.stdin(\"Repo name\"))\n```\n\nWrite simple marking recipes by defining simple functions for each step.\n\n```py\n# Functions can take arbitrary parameters, as long as those parameters were\n# defined earlier in the script.\n# Using the `Recipe.step` decorator allows us to register an action as a step\n# to the recipe.\n@marker.step\nasync def setup(action: ActionSession, repo: str):\n    \"\"\"Set up marking environment\"\"\"\n    # Clone the given git repo to a temporary directory\n    directory = await actions.git.clone(action, f\"git@github.com:COMP1010UNSW/{repo}.git\")\n    return {\n        \"directory\": directory,\n    }\n```\n\nThe values returned by your previous steps can be used in later steps, just\nby giving the function parameters the same name.\n\n```py\ndef open_code(action: ActionSession, directory: Path):\n    \"\"\"Open the cloned git repo in VS Code\"\"\"\n    return actions.editor.vs_code(action, directory)\n\nmarker.step(open_code)\n```\n\nThen run the recipe. It'll run for every permutation of your parameters, making\nit easy to mark in bulk.\n\n```py\nmarker.run()\n```\n\nFor more examples, see the examples directory.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Assess your students' work with all of the delight and none of the tedium",
    "version": "1.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/COMP1010UNSW/Markten/issues",
        "repository": "https://github.com/COMP1010UNSW/Markten"
    },
    "split_keywords": [
        "marking",
        " auto-marker",
        " automation",
        " xmark",
        " imark",
        " mark",
        " ten"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "314113869e129004ac7d4d5fb7bb9f4972d61f4860645d7c2e0f96d4b2bb353f",
                "md5": "6f201274c4882a94f1364b0115ae23b3",
                "sha256": "087d21f7c867ca96a88a25a46ccf507543e8d8373e30d90aa63e4cb0762a1b0a"
            },
            "downloads": -1,
            "filename": "markten-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f201274c4882a94f1364b0115ae23b3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 34299,
            "upload_time": "2025-07-21T11:26:49",
            "upload_time_iso_8601": "2025-07-21T11:26:49.011660Z",
            "url": "https://files.pythonhosted.org/packages/31/41/13869e129004ac7d4d5fb7bb9f4972d61f4860645d7c2e0f96d4b2bb353f/markten-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0dc0687534712d24e86b2c1817b17b110e00bae80f86e4c29a6c4351710d9ee8",
                "md5": "5b8b9e1a9c852853068f86a885602f52",
                "sha256": "7a4efb591df66d2fc4705e2494cf924fae5aa4ac6cdf90814f09ecb9b1cd6eef"
            },
            "downloads": -1,
            "filename": "markten-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5b8b9e1a9c852853068f86a885602f52",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 22803,
            "upload_time": "2025-07-21T11:26:50",
            "upload_time_iso_8601": "2025-07-21T11:26:50.869585Z",
            "url": "https://files.pythonhosted.org/packages/0d/c0/687534712d24e86b2c1817b17b110e00bae80f86e4c29a6c4351710d9ee8/markten-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-21 11:26:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "COMP1010UNSW",
    "github_project": "Markten",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "markten"
}
        
Elapsed time: 1.39458s