mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-21 16:31:32 +00:00
2
Creating a TFW exercise
Kristóf Tóth edited this page 2019-12-19 16:11:24 +01:00
First of all, make sure that you have every dependency installed. If you believe that you are ready to get started, here are our recommended steps:
- Clone the test-tutorial-framework repository and take a closer look at it contents, then attempt to run it.
- Try to replace the webservice with your own HTTP server. If you don't need it, or you wish to run something else, just delete the
solvable/src/webservice
directory and copy your code somewhere in its parents directory. You also have to modify it's supervisor configuration to fit your needs:solvable/supervisor/webservice.conf
. It's important for your server to behave well behind a reverse proxy, as requests will be sent to/webservice/your_endpoint
. - Edit
frontend_config.yaml
to suit your needs. Rewrite theiframeUrl
property to an empty string if you don't need it, compose the layouts, etc. - At this point there should be a couple of unused event handlers defined in
event_handler_main.py
. You should just delete their instantiations and imports, then rewrite the constructor parameters in the remaining ones where you deem necessary. - The next step is to create an FSM. You either use the Python-based LinearFSM and FSMBase classes that utilize the
transitions
Python module, or you just compile it into a YAML file like thetest_fsm.yml
example. - You need to put the triggers after the respective checks, and formulate bot messages to guide the user through each step.
- When everything is ready, you can start to check your tutorial with the
check_format.py
script in thechallenge-toolbox
repository in order to be able to upload it to the platform. - After you no errors, you can finally share it by creating a repository through the dashboard at https://platform.avatao.com, then push your solution to a
staging
branch and open a pull request, and then comes our part to make it available.