Deprecated: This evaluation function is no longer maintained. It has been superseded by compareExpressions, which provides equivalent functionality with broader support. Please migrate to
compareExpressions.
This evaluation function compares physical quantities submitted by students against a reference answer, handling unit conversions and symbolic expressions.
app/
__init__.py
evaluation.py # Main evaluation function
evaluation_test.py # Unit tests
preview.py # Preview function
preview_test.py # Preview tests
expression_utilities.py # Expression parsing utilities
unit_system_conversions.py # Unit conversion logic
static_unit_conversion_arrays.py # Pre-generated conversion data
generate_unit_conversion_arrays.py # Script to regenerate conversion data
requirements.txt # Python dependencies
Dockerfile # Image definition for AWS deployment
docs/
user.md # End-user documentation
dev.md # Developer documentation
.github/
workflows/
test-lint.yml # Run tests and linting on PRs
pre_production_tests.yml
staging-deploy.yml # Deploy to staging
production-deploy.yml # Deploy to production
config.json # Evaluation function name
The function is built on top of a custom base layer, BaseEvaluationFunctionLayer, which provides tooling, tests, and schema checking common to all evaluation functions.
The function is hosted on AWS Lambda using a Docker container image. For more information on Docker, see this introduction to containerisation. To learn more about AWS Lambda, click here.
Middleware provided by BaseEvaluationFunctionLayer handles request validation, routing, and response formatting.
Commits trigger the GitHub Actions pipelines in .github/workflows/, which run tests and linting before building and deploying the Docker image to AWS.