Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

292 Commits

Repository files navigation

comparePhysicalQuantities (Deprecated)

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.

Table of Contents

Repository Structure

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

How it works

The function is built on top of a custom base layer, BaseEvaluationFunctionLayer, which provides tooling, tests, and schema checking common to all evaluation functions.

Docker & Amazon Web Services (AWS)

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 Functions

Middleware provided by BaseEvaluationFunctionLayer handles request validation, routing, and response formatting.

GitHub Actions

Commits trigger the GitHub Actions pipelines in .github/workflows/, which run tests and linting before building and deploying the Docker image to AWS.

About

Experimental evaluation function that provides some tools for dimensional analysis

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages