Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. http://creativecommons.org/licenses/by/4.0 |
| 3 | |
| 4 | Developer Guide |
| 5 | =============== |
| 6 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 7 | Tech Stack |
| 8 | ---------- |
| 9 | |
| 10 | The framework requires Python version 3.7 or later, and depends on |
| 11 | these packages provided by the O-RAN-SC project and third parties: |
| 12 | |
| 13 | * msgpack |
| 14 | * mdclogpy |
| 15 | * ricsdl |
| 16 | |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 17 | |
| 18 | Version bumping the framework |
| 19 | ----------------------------- |
| 20 | |
| 21 | This project follows semver. When changes are made, the versions are in: |
| 22 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 23 | #. ``docs/release-notes.rst`` |
| 24 | #. ``setup.py`` |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 25 | |
| 26 | Version bumping RMR |
| 27 | ------------------- |
| 28 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 29 | These items in this repo must be kept in sync with the RMR version: |
| 30 | |
| 31 | #. Dockerfile-Unit-Test |
| 32 | #. examples/Dockerfile-Ping |
| 33 | #. examples/Dockerfile-Pong |
| 34 | #. ``rmr-version.yaml`` controls what version of RMR is installed for |
| 35 | unit testing in Jenkins CI |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 36 | |
| 37 | |
| 38 | Unit Testing |
| 39 | ------------ |
| 40 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 41 | Running the unit tests requires the python packages ``tox`` and ``pytest``. |
| 42 | |
| 43 | The RMR library is also required during unit tests. If running directly from tox |
| 44 | (outside a Docker container), install RMR according to its instructions. |
| 45 | |
| 46 | Upon completion, view the test coverage like this: |
Lott, Christopher (cl778h) | 2407cdc | 2020-04-29 09:58:37 -0400 | [diff] [blame] | 47 | |
| 48 | :: |
| 49 | |
Lott, Christopher (cl778h) | bbc9028 | 2020-05-07 08:39:49 -0400 | [diff] [blame] | 50 | tox |
| 51 | open htmlcov/index.html |
| 52 | |
| 53 | Alternatively, if you cannot install RMR locally, you can run the unit |
| 54 | tests in Docker. This is somewhat less nice because you don't get the |
| 55 | pretty HTML report on coverage. |
| 56 | |
| 57 | :: |
| 58 | |
| 59 | docker build --no-cache -f Dockerfile-Unit-Test . |