Skip to content

Commit 902f4c8

Browse files
authored
Merge pull request #225 from lambda-feedback/m-messer-patch-1
Added dev information back in
2 parents 53212f6 + 4b0f834 commit 902f4c8

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,59 @@
22

33
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-
For more information look at the docs [here](https://lambda-feedback.github.io/user-documentation/user_eval_function_docs/compareExpressions/) or in `docs/`.
5+
For more information, look at the docs [here](https://lambda-feedback.github.io/user-documentation/user_eval_function_docs/compareExpressions/) or in `docs/`.
6+
7+
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.
8+
9+
### Getting Started
10+
11+
1. Clone this repository
12+
2. Change the name of the evaluation function in `config.json`
13+
3. The name must be unique. To view existing grading functions, go to:
14+
15+
- [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)
16+
- [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)
17+
18+
4. Merge commits into the default branch
19+
- 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.
20+
21+
5. You are now ready to start developing your function:
22+
23+
- Edit the `app/evaluation.py` file, which ultimately gets called when the function is given the `eval` command
24+
- Edit the `app/evaluation_tests.py` file to add tests which get run:
25+
- Every time you commit to this repo, before the image is built and deployed
26+
- Whenever the `healthcheck` command is supplied to the deployed function
27+
- 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!
28+
29+
---
30+
31+
## How it works
32+
33+
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.
34+
35+
### Docker & Amazon Web Services (AWS)
36+
37+
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**.
38+
39+
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/).
40+
41+
### Middleware Functions
42+
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.
43+
44+
The code needed to build the image using all the middleware functions are available in the [BaseEvaluationFunctionLayer](https://github.com/lambda-feedback/BaseEvalutionFunctionLayer) repository.
45+
46+
### GitHub Actions
47+
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/`.
48+
49+
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.
50+
51+
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.
52+
53+
## Pre-requisites
54+
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:
55+
56+
- Python 3.8 or higher.
57+
58+
- GitHub Desktop or the `git` CLI.
59+
60+
- A code editor such as Atom, VS Code, or Sublime.

0 commit comments

Comments
 (0)