mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2025-10-30 09:12:54 +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/webservicedirectory 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.yamlto suit your needs. Rewrite theiframeUrlproperty 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
transitionsPython module, or you just compile it into a YAML file like thetest_fsm.ymlexample. - 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.pyscript in thechallenge-toolboxrepository 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
stagingbranch and open a pull request, and then comes our part to make it available.