scripts.rst 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. How to run
  2. ==========
  3. Running the Modelverse is all done through the use of scripts to coordinate the three different projects.
  4. The following scripts are included by default.
  5. Despite the various files, only *run_local_modelverse.py* is required for most cases.
  6. fix_files.py
  7. ------------
  8. Fix some files that must be kept identical.
  9. This is sometimes necessary because if a file gets updated, the changes must propagate.
  10. Usually, this is done with symbolic links or similar, but there does not seem to be a nice cross-platform way of doing this in Git.
  11. Invocation::
  12. python scripts/fix_files.py
  13. flush_compiler_caches.py
  14. ------------------------
  15. Clear all cached files from the compiler.
  16. The compiler will automatically reparse files when they have been changed, but changes to the compiler code itself will not be detected.
  17. When changing the compiler, this file should be executed to flush these file caches.
  18. Invocation::
  19. python scripts/flush_compiler_caches.py
  20. generate_bootstrap.py
  21. ---------------------
  22. Creates the bootstrap file for the Modelverse State.
  23. This creates the necessary initial graph which contains links to all primitive code that is executed by the Modelverse before tasks can communicate with it.
  24. Generally, this needs to be executed when any file in the *bootstrap/* folder is modified.
  25. Compilation is fairly smart, only recompiling parts that have changed.
  26. Invocation::
  27. python scripts/generate_bootstrap.py
  28. prompt.py
  29. ---------
  30. A generic prompt interface to the Modelverse.
  31. You can log in as a specific task and start sending input messages to the Modelverse as that task.
  32. All output sent by the Modelverse will be printed in the console.
  33. There is no logic in the prompt itself, making it completely generic.
  34. While this is not the most usable way of communicating with the Modelverse, it provides a minimal interface.
  35. Invocation::
  36. python scripts/prompt.py
  37. run_local_modelverse.py
  38. -----------------------
  39. Locally runs an instance of the Modelverse at the requested port.
  40. This combines MvK and MvS at the same system, and actually makes a direct link between them, omitting the slow use of sockets.
  41. While this is kind of a hack at the moment, it is really necessary for performance.
  42. To split them up, there just needs to be a statechart in between both of them (which is already written and working).
  43. The port option is optional, and defaults to 8001.
  44. Invocation::
  45. python scripts/run_local_modelverse.py port
  46. run_tests.py
  47. ------------
  48. Run the tests for all parts of the Modelverse.
  49. Invocation::
  50. python scripts/run_tests.py
  51. run_basic_tests.py
  52. ------------------
  53. Run the relatively fast tests for the Modelverse.
  54. Invocation::
  55. python scripts/run_basic_tests.py