Release 0.0.5
[ric-app/qp.git] / docs / developers-guide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. Copyright (c) 2020 HCL Technologies Limited.
4 .. Copyright (C) 2020 AT&T Intellectual Property
5
6
7 Developers Guide
8 =================
9
10 .. contents::
11    :depth: 3
12    :local:
13
14
15 Version bumping the Xapp
16 ------------------------
17
18 This project follows semver. When changes are made, update the version strings in:
19
20 #. ``container-tag.yaml``
21 #. ``docs/release-notes.rst``
22 #. ``setup.py``
23 #. ``xapp-descriptor/config.json``
24
25
26 Testing RMR Healthcheck
27 -----------------------
28 The following instructions should deploy the QP container in bare docker, and allow you
29 to test that the RMR healthcheck is working.
30
31 ::
32
33     docker build -t qpd:latest -f  Dockerfile .
34     docker run -d --net=host -e USE_FAKE_SDL=1 qpd:latest
35     docker exec -it CONTAINER_ID /usr/local/bin/rmr_probe -h 127.0.0.1:4560
36
37
38 Unit Testing
39 ------------
40
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:
47
48 ::
49
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 .