Skip to content

Commit 2118cf4

Browse files
committed
Updated readme
1 parent 4f90b46 commit 2118cf4

1 file changed

Lines changed: 12 additions & 54 deletions

File tree

readme.md

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,12 @@
1-
# Evaluation Function Template Repository
1+
# IsSimilar
22

3-
.
4-
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 checks whether a student's numeric response is within an acceptable tolerance of the correct answer, using absolute (`atol`) and relative (`rtol`) tolerance parameters. The comparison follows the formula: `|response - answer| ≤ atol + rtol × |answer|`. By default both tolerances are 0, requiring an exact match (within floating-point precision).
54

6-
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.
5+
For more information, look at the docs in `app/docs/`.
76

8-
## Table of Contents
7+
## Deployment
8+
[![Create Release Request](https://img.shields.io/badge/Create%20Release%20Request-blue?style=for-the-badge)](https://github.com/lambda-feedback/IsSimilar/issues/new?template=release-request.yml)
99

10-
- [Evaluation Function Template Repository](#evaluation-function-template-repository)
11-
- [Table of Contents](#table-of-contents)
12-
- [Repository Structure](#repository-structure)
13-
- [Usage](#usage)
14-
- [Getting Started](#getting-started)
15-
- [How it works](#how-it-works)
16-
- [Docker & Amazon Web Services (AWS)](#docker--amazon-web-services-aws)
17-
- [Middleware Functions](#middleware-functions)
18-
- [GitHub Actions](#github-actions)
19-
- [Pre-requisites](#pre-requisites)
20-
- [Contact](#contact)
21-
22-
## Repository Structure
23-
24-
```bash
25-
app/
26-
__init__.py
27-
evaluation.py # Script containing the main evaluation_function
28-
docs.md # Documentation page for this function (required)
29-
evaluation_tests.py # Unittests for the main evaluation_function
30-
requirements.txt # list of packages needed for algorithm.py
31-
Dockerfile # for building whole image to deploy to AWS
32-
33-
.github/
34-
workflows/
35-
test-and-deploy.yml # Testing and deployment pipeline
36-
37-
config.json # Specify the name of the evaluation function in this file
38-
.gitignore
39-
```
40-
41-
## Usage
4210

4311
### Getting Started
4412

@@ -50,16 +18,15 @@ config.json # Specify the name of the evaluation function in this file
5018
- [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)
5119

5220
4. Merge commits into the default branch
53-
54-
- 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.
21+
- This will trigger the `staging-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.
5522

5623
5. You are now ready to start developing your function:
57-
24+
5825
- Edit the `app/evaluation.py` file, which ultimately gets called when the function is given the `eval` command
5926
- Edit the `app/evaluation_tests.py` file to add tests which get run:
60-
- Every time you commit to this repo, before the image is built and deployed
61-
- Whenever the `healthcheck` command is supplied to the deployed function
62-
- 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!
27+
- On every pull request, via the `test-lint.yml` workflow, before the image is built and deployed
28+
- Whenever the `healthcheck` command is supplied to the deployed function
29+
- Edit the `app/docs/` files to reflect your changes. These files are baked into the function's image, and are 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!
6330

6431
---
6532

@@ -74,31 +41,22 @@ The grading scripts are hosted AWS Lambda, using containers to run a docker imag
7441
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/).
7542

7643
### Middleware Functions
77-
7844
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.
7945

8046
The code needed to build the image using all the middleware functions are available in the [BaseEvaluationFunctionLayer](https://github.com/lambda-feedback/BaseEvalutionFunctionLayer) repository.
8147

8248
### GitHub Actions
83-
84-
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/`.
49+
Whenever a pull request is opened or updated, 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/`.
8550

8651
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.
8752

8853
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.
8954

9055
## Pre-requisites
91-
9256
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:
9357

9458
- Python 3.8 or higher.
9559

9660
- GitHub Desktop or the `git` CLI.
9761

98-
- A code editor such as Atom, VS Code, or Sublime.
99-
100-
Copy this template over by clicking **Use this template** button found in the repository on GitHub. Save it to the `lambda-feedback` Organisation.
101-
102-
## Contact
103-
104-
# TBC
62+
- A code editor such as Atom, VS Code, or Sublime.

0 commit comments

Comments
 (0)