You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
# Evaluation Function Template Repository
2
-
hi this is me
2
+
3
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.
4
4
5
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
6
7
7
## Table of Contents
8
+
8
9
-[Evaluation Function Template Repository](#evaluation-function-template-repository)
9
10
-[Table of Contents](#table-of-contents)
10
11
-[Repository Structure](#repository-structure)
@@ -48,14 +49,15 @@ config.json # Specify the name of the evaluation function in this file
48
49
-[Production API Gateway Integrations](https://eu-west-2.console.aws.amazon.com/apigateway/main/develop/integrations/attach?api=cttolq2oph&integration=qpbgva8®ion=eu-west-2&routes=0xsoy4q)
49
50
50
51
4. Merge commits into the default branch
52
+
51
53
- 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
54
53
55
5. You are now ready to start developing your function:
54
-
56
+
55
57
- Edit the `app/evaluation.py` file, which ultimately gets called when the function is given the `eval` command
56
58
- 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
+
- Every time you commit to this repo, before the image is built and deployed
60
+
- Whenever the `healthcheck` command is supplied to the deployed function
59
61
- 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
62
61
63
---
@@ -71,18 +73,21 @@ The grading scripts are hosted AWS Lambda, using containers to run a docker imag
71
73
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
74
73
75
### Middleware Functions
76
+
74
77
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
78
76
79
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
80
78
81
### GitHub Actions
82
+
79
83
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
84
81
85
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
86
83
87
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
88
85
89
## Pre-requisites
90
+
86
91
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
92
88
93
- Python 3.8 or higher.
@@ -95,5 +100,4 @@ Copy this template over by clicking **Use this template** button found in the re
0 commit comments