Create a Module
To create a new Athena Module, follow the following steps:
Copy the
module_example
folder to a new folder with the name of your module. It should still be at the project root and its name should start withmodule_
.- Update your module name (
module_something
) in the following places: module_something/pyproject.toml
rename
module_something/module_example
tomodule_something/module_something
- Update your module name (
Delete the
poetry.lock
file, then runpoetry install
in your module folder to recreate it.- Update the
module.conf
file to include the following values: MODULE_NAME
: The name of your module, e.g.module_something
MODULE_TYPE
: The type of exercise your module supports, e.g.text
orprogramming
PORT
: The port your module will run on, e.g.5002
. Look for the ports that existing modules are using and use a port that is not already in use. It’s best if you just count one up from the highest number (e.g. if the highest used port is 5002, use 5003).
- Update the
Add your module to the
assessment_module_manager/modules.ini
andassessment_module_manager/modules.docker.ini
files. Update the URLs accordingly. The Docker URL for your module should behttp://module_something:port
.Add a service to in
docker-compose.yml
anddocker-compose.prod.yml
. Look at the existing modules for examples. Make sure to use the same port as in the.env
file.- Add a new workspace folder entry for VS Code:
Edit
athena-workspace.code-workspace
Add a new entry to the
folders
array, similar to the one from the example module
- Add a launch configuration for VS Code:
Open the
.vscode/launch.json
fileAdd a new configuration, similar to the one from the example module