Skip to content

Commit 53212f6

Browse files
authored
Merge pull request #224 from lambda-feedback/readme-update
Update README.md
2 parents 4c9fc84 + 9876865 commit 53212f6

File tree

1 file changed

+3
-94
lines changed

1 file changed

+3
-94
lines changed

README.md

Lines changed: 3 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,5 @@
1-
# Evaluation Function Template Repository
1+
# Compare Expressions
22

3-
This template repository contains the boilerplate code needed in order to create an AWS Lambda function that can be written by any tutor to grade a response area in any way they like.
3+
This function utilises the SymPy to provide a maths-aware comparison of a student's response to the correct answer. This means that mathematically equivalent inputs will be marked as correct. Note that pi is a reserved constant and cannot be used as a symbol name.
44

5-
This version is specifically for python, however the ultimate goal is to make similar boilerplate repositories in any language, allowing tutors the freedom to code in what they feel most comfortable with.
6-
7-
## Table of Contents
8-
- [Evaluation Function Template Repository](#evaluation-function-template-repository)
9-
- [Table of Contents](#table-of-contents)
10-
- [Repository Structure](#repository-structure)
11-
- [Usage](#usage)
12-
- [Getting Started](#getting-started)
13-
- [How it works](#how-it-works)
14-
- [Docker & Amazon Web Services (AWS)](#docker--amazon-web-services-aws)
15-
- [Middleware Functions](#middleware-functions)
16-
- [GitHub Actions](#github-actions)
17-
- [Pre-requisites](#pre-requisites)
18-
- [Contact](#contact)
19-
20-
## Repository Structure
21-
22-
```bash
23-
app/
24-
__init__.py
25-
evaluation.py # Script containing the main evaluation_function
26-
docs.md # Documentation page for this function (required)
27-
evaluation_tests.py # Unittests for the main evaluation_function
28-
requirements.txt # list of packages needed for algorithm.py
29-
Dockerfile # for building whole image to deploy to AWS
30-
31-
.github/
32-
workflows/
33-
test-and-deploy.yml # Testing and deployment pipeline
34-
35-
config.json # Specify the name of the evaluation function in this file
36-
.gitignore
37-
```
38-
39-
## Usage
40-
41-
### Getting Started
42-
43-
1. Clone this repository
44-
2. Change the name of the evaluation function in `config.json`
45-
3. The name must be unique. To view existing grading functions, go to:
46-
47-
- [Staging API Gateway Integrations](https://eu-west-2.console.aws.amazon.com/apigateway/main/develop/integrations/attach?api=c1o0u8se7b&region=eu-west-2&routes=0xsoy4q)
48-
- [Production API Gateway Integrations](https://eu-west-2.console.aws.amazon.com/apigateway/main/develop/integrations/attach?api=cttolq2oph&integration=qpbgva8&region=eu-west-2&routes=0xsoy4q)
49-
50-
4. Merge commits into the default branch
51-
- This will trigger the `test-and-deploy.yml` workflow, which will build the docker image, push it to a shared ECR repository, then call the backend `grading-function/ensure` route to build the necessary infrastructure to make the function available from the client app.
52-
53-
5. You are now ready to start developing your function:
54-
55-
- Edit the `app/evaluation.py` file, which ultimately gets called when the function is given the `eval` command
56-
- Edit the `app/evaluation_tests.py` file to add tests which get run:
57-
- Every time you commit to this repo, before the image is built and deployed
58-
- Whenever the `healthcheck` command is supplied to the deployed function
59-
- Edit the `app/docs.md` file to reflect your changes. This file is baked into the function's image, and is made available using the `docs` command. This feature is used to display this function's documentation on our [Documentation](https://lambda-feedback.github.io/Documentation/) website once it's been hooked up!
60-
61-
---
62-
63-
## How it works
64-
65-
The function is built on top of a custom base layer, [BaseEvaluationFunctionLayer](https://github.com/lambda-feedback/BaseEvalutionFunctionLayer), which tools, tests and schema checking relevant to all evaluation functions.
66-
67-
### Docker & Amazon Web Services (AWS)
68-
69-
The grading scripts are hosted AWS Lambda, using containers to run a docker image of the app. Docker is a popular tool in software development that allows programs to be hosted on any machine by bundling all its requirements and dependencies into a single file called an **image**.
70-
71-
Images are run within **containers** on AWS, which give us a lot of flexibility over what programming language and packages/libraries can be used. For more information on Docker, read this [introduction to containerisation](https://www.freecodecamp.org/news/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b/). To learn more about AWS Lambda, click [here](https://geekflare.com/aws-lambda-for-beginners/).
72-
73-
### Middleware Functions
74-
In order to run the algorithm and schema on AWS Lambda, some middleware functions have been provided to handle, validate and return the data so all you need to worry about is the evaluation script and testing.
75-
76-
The code needed to build the image using all the middleware functions are available in the [BaseEvaluationFunctionLayer](https://github.com/lambda-feedback/BaseEvalutionFunctionLayer) repository.
77-
78-
### GitHub Actions
79-
Whenever a commit is made to the GitHub repository, the new code will go through a pipeline, where it will be tested for syntax errors and code coverage. The pipeline used is called **GitHub Actions** and the scripts for these can be found in `.github/workflows/`.
80-
81-
On top of that, when starting a new evaluation function, you will have to complete a set of unit test scripts, which not only make sure your code is reliable, but also helps you to build a _specification_ for how the code should function before you start programming.
82-
83-
Once the code passes all these tests, it will then be uploaded to AWS and will be deployed and ready to go in only a few minutes.
84-
85-
## Pre-requisites
86-
Although all programming can be done through the GitHub interface, it is recommended you do this locally on your machine. To do this, you must have installed:
87-
88-
- Python 3.8 or higher.
89-
90-
- GitHub Desktop or the `git` CLI.
91-
92-
- A code editor such as Atom, VS Code, or Sublime.
93-
94-
Copy this template over by clicking **Use this template** button found in the repository on GitHub. Save it to the `lambda-feedback` Organisation.
95-
96-
## Contact
5+
For more information look at the docs [here](https://lambda-feedback.github.io/user-documentation/user_eval_function_docs/compareExpressions/) or in `docs/`.

0 commit comments

Comments
 (0)