123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- Installation
- ============
- Dependencies
- ------------
- The Modelverse reference implementation is relatively dependency-free.
- As its code is written in Python 2, a working Python 2.7 interpreter is necessary.
- To run the tests, this interpreter needs to have the `pytest <http://docs.pytest.org/en/latest/>`_ module installed.
- To run the server, the `SCCD <https://msdl.uantwerpen.be/git/simon/SCCD>`_ module needs to be installed.
- Installation
- ------------
- The Modelverse is merely a set of Python scripts, and there is no real installation, except for its dependencies.
- As such, you will only have to download the source code and are ready to use the Modelverse.
- 0. Install dependencies.
- 1. Download the `Modelverse source code <https://msdl.uantwerpen.be/git/yentl/modelverse>`_.
- For example using git::
- git clone https://msdl.uantwerpen.be/git/yentl/modelverse
- Or using your favorite HTTP download tool::
- wget https://msdl.uantwerpen.be/git/yentl/modelverse/archive/master.zip
- unzip master.zip
- 2. That's it! You can now run the scripts in the *scripts/* directory using Python.
- Tests
- -----
- To make sure that everything is working correctly, you can execute the tests with the script *scripts/run_tests.sh*.
- Executing the tests is as simple as the following command::
- python scripts/run_tests.py
- This will run a set of tests for all different projects.
- Note that this also causes some bootstrap files to be created, which might take some time on slow machines.
- A faster alternative is to only run the overall tests::
- python -m pytest integration
- PyPy
- ^^^^
- The default way of executing tests is probably through CPython.
- Note, however, that CPython is a slow implementation of Python, which makes everything in the Modelverse slower.
- While it is not impossible to use CPython, using PyPy is recommended for the server!
- Nonetheless, PyPy is often not the default interpreter.
- You will therefore have to explicitly give control to PyPy instead of CPython.
- This is fairly simple: all scripts in *scripts/* execute their subprocesses using the Python interpreter used to start the script.
- As such, the following command suffices to execute the Modelverse tests using PyPy::
- pypy scripts/run_tests.py
- The problem, however, is that all modules need to be readily installed on PyPy.
- For SCCD, you can simply install it using PyPy instead of CPython.
- For pytest, you also need to install all of pytest's dependencies.
- The easiest way to do this is through *pip*, which you also have to install first::
- wget https://msdl.uantwerpen.be/files/get-pip.py
- pypy get-pip.py --user
- pypy -m pip install pytest --user
- Afterwards, you can simply run::
- pypy scripts/run_tests.py
- To execute the tests using PyPy.
|