unit_grader package

Subpackages

Submodules

unit_grader.cli module

This module provides a CLI tool for converting units of measure and grading student responses to conversion questions.

Main Functions:
  • grade_response: Grade a student’s response to a conversion question.

  • Allow users to specify parameters via CLI arguments such as:
    • input_value: The input value provided in the question.

    • from_unit: The unit mentioned in the question.

    • to_unit: The target unit mentioned in the question.

    • student_response: The student’s response.

unit_grader.cli.version_callback(show_version: bool) None[source]

Get the project version from the pyproject.toml file.

Parameters:

show_version (bool) – A flag to indicate whether to show the version.

Returns:

None

unit_grader.cli.handle_feedback()[source]
unit_grader.cli.enableLogging(verbose: bool) None[source]

Enable logging based on the verbosity level.

Parameters:

verbose (bool) – A flag to indicate whether to enable verbose output.

Returns:

None

unit_grader.cli.grade_conversion(input_value: str = <typer.models.OptionInfo object>, from_unit: str = <typer.models.OptionInfo object>, to_unit: str = <typer.models.OptionInfo object>, student_response: str = <typer.models.OptionInfo object>, verbose: bool = <typer.models.OptionInfo object>, version: bool = <typer.models.OptionInfo object>) None[source]

Unit Conversion Grader Tool to grade a student’s response to the unit conversion question.

Student’s response must match the correct answer after both value are rounded to the tenths place.

Module contents

This file is required for Python to recognize this directory as a package.


The unit_grader package contains the following

Modules:
  • cli: Contains the CLI tool for converting units of measure and grading student responses to conversion questions.