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:

  1. Clone the test-tutorial-framework repository and take a closer look at it contents, then attempt to run it.
  2. 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.
  3. Edit frontend_config.yaml to suit your needs. Rewrite the iframeUrl property to an empty string if you don't need it, compose the layouts, etc.
  4. 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.
  5. 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 the test_fsm.yml example.
  6. You need to put the triggers after the respective checks, and formulate bot messages to guide the user through each step.
  7. When everything is ready, you can start to check your tutorial with the check_format.py script in the challenge-toolbox repository in order to be able to upload it to the platform.
  8. 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.