blob: 6cfe3698c92a650efc38b86bef24beabe1909151 [file] [log] [blame]
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -04001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
Lott, Christopher (cl778h)ca170d32020-05-12 15:05:59 -04002.. SPDX-License-Identifier: CC-BY-4.0
3.. Copyright (C) 2020 AT&T Intellectual Property
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -04004
5Developer Guide
6===============
7
Lott, Christopher (cl778h)ca170d32020-05-12 15:05:59 -04008This document explains how to maintain the RIC Xapp framework.
9Information for users of this framework (i.e., Xapp developers) is in the User Guide.
10
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040011Tech Stack
12----------
13
14The framework requires Python version 3.7 or later, and depends on
15these packages provided by the O-RAN-SC project and third parties:
16
17* msgpack
18* mdclogpy
19* ricsdl
20
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -040021
22Version bumping the framework
23-----------------------------
24
25This project follows semver. When changes are made, the versions are in:
26
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040027#. ``docs/release-notes.rst``
28#. ``setup.py``
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -040029
30Version bumping RMR
31-------------------
32
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040033These items in this repo must be kept in sync with the RMR version:
34
35#. Dockerfile-Unit-Test
36#. examples/Dockerfile-Ping
37#. examples/Dockerfile-Pong
38#. ``rmr-version.yaml`` controls what version of RMR is installed for
39 unit testing in Jenkins CI
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -040040
41
42Unit Testing
43------------
44
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040045Running the unit tests requires the python packages ``tox`` and ``pytest``.
46
47The RMR library is also required during unit tests. If running directly from tox
48(outside a Docker container), install RMR according to its instructions.
49
50Upon completion, view the test coverage like this:
Lott, Christopher (cl778h)2407cdc2020-04-29 09:58:37 -040051
52::
53
Lott, Christopher (cl778h)bbc90282020-05-07 08:39:49 -040054 tox
55 open htmlcov/index.html
56
57Alternatively, if you cannot install RMR locally, you can run the unit
58tests in Docker. This is somewhat less nice because you don't get the
59pretty HTML report on coverage.
60
61::
62
63 docker build --no-cache -f Dockerfile-Unit-Test .