installation.rst 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Installation
  2. ============
  3. Installation of the Modelverse is rather simple, as is its simple usage.
  4. We first introduce the dependencies of the Modelverse, followed by installation instructions for the Modelverse itself.
  5. To check whether or not the installation was successful, users can run the enclosed tests.
  6. Dependencies
  7. ------------
  8. The Modelverse reference implementation is relatively dependency-free.
  9. As its code is written in Python 2, a working Python 2.7 interpreter is necessary.
  10. To run the server, the `SCCD <https://msdl.uantwerpen.be/git/simon/SCCD>`_ module needs to be installed.
  11. Full installation instructions can be found on the project website.
  12. To run the tests, the `pytest <http://docs.pytest.org/en/latest/>`_ module must be installed.
  13. In case you want to use PyPy, which often offers increased performance, you need to install both dependencies in PyPy as well.
  14. Next, we document how this is done.
  15. PyPy
  16. ^^^^
  17. For SCCD, you can simply install it using PyPy instead of CPython.
  18. For pytest, you also need to install all of pytest's dependencies, and pytest itself.
  19. The easiest way to do this is through *pip*, which you also have to install first for PyPy::
  20. wget https://msdl.uantwerpen.be/files/get-pip.py
  21. pypy get-pip.py --user
  22. pypy -m pip install pytest --user
  23. Installation
  24. ------------
  25. The Modelverse is merely a set of Python scripts, and there is no real installation, except for its dependencies.
  26. As such, you will only have to download the source code and are ready to use the Modelverse.
  27. To install the Modelverse, download the `Modelverse source code <https://msdl.uantwerpen.be/git/yentl/modelverse>`_.
  28. This can be done through git::
  29. git clone https://msdl.uantwerpen.be/git/yentl/modelverse
  30. Or using your favorite HTTP download tool::
  31. wget https://msdl.uantwerpen.be/git/yentl/modelverse/archive/master.zip
  32. unzip master.zip
  33. You can now run the scripts in the *scripts/* directory using Python.
  34. In the next section, we go deeper into the relevant scripts.
  35. Tests
  36. -----
  37. To make sure that everything is working correctly, you can execute the tests with the script *scripts/run_tests.sh*.
  38. Executing the tests is as simple as the following command::
  39. python scripts/run_tests.py
  40. .. note::
  41. If you prefer to use PyPy, you can similarly execute it by replacing *python* with *pypy*.
  42. All occurences of *python* can be replaced by *pypy*, as long as both implement Python 2.7.
  43. This will run a set of tests for all different projects.
  44. Note that this also causes some bootstrap files to be created, which might take some time on slow machines, certainly if PyPy is not used.
  45. A faster alternative is to run the faster tests, though this will not test the creation of bootstrap files::
  46. python scripts/run_fast_tests.py