Skip to content

Commit ddb3b56

Browse files
committed
Various fixes before 3.0
- Fix .ini formatting issues in tox.ini file - Updated developer docs regarding testing - Add missing requirements for xosapi - Fix typo in docs Change-Id: I3603bbd68c8ecff68d8bbc1a2d4674908c54e5b9
1 parent 8419c08 commit ddb3b56

10 files changed

+67
-25
lines changed

README.md

+50-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# XOS
22

3-
XOS is a framework for operationalizing a collection of
4-
disaggregated services. It is packaged as a project in
5-
the Open CORD initiative, with source code managed through
6-
<https://gerrit.opencord.org>. It is also mirrored at
3+
XOS is a framework for operationalizing a collection of disaggregated services.
4+
It is packaged as a project in the Open CORD initiative, with source code
5+
managed through <https://gerrit.opencord.org>. It is also mirrored at
76
<https://github.com/opencord>.
87

98
You can download and use XOS either as part of CORD (see the
@@ -17,7 +16,51 @@ for additional information.
1716

1817
## Testing the XOS Core
1918

20-
Run `make test` to run tests on the XOS codebase.
19+
Run `make test` to run all tests on the XOS codebase. This is what happens
20+
during the `verify_xos_unit-test` job in Jenkins.
2121

22-
XOS's component libraries are stored in `lib` and are tested by running
23-
[tox](https://tox.readthedocs.io) in the individual library directories.
22+
Running these tests requires:
23+
24+
- A Python 2.7, and one or more of Python 3.5, 3.6, or 3.7 development environment
25+
- Requires a C build system and the python header files (under ubuntu 16.04, `apt
26+
install python2-dev python3-dev build-essential`) to build packages with C
27+
extensions.
28+
- [virtualenv](https://virtualenv.pypa.io)
29+
- [tox](https://tox.readthedocs.io) version 3.2 or later
30+
31+
This will run 3 sets of test targets, which can also be run individually:
32+
33+
- `lib-test`: runs `tox` on each of the library modules stored in `lib`.
34+
These are tested against both Python 2 and 3 by running both `nose2` and
35+
`flake8`.
36+
37+
If you are making changes only to a specific library, it is recommended that
38+
you run `tox` directly inside that modules directory, which should run much
39+
more quickly than testing all the libraries.
40+
41+
- `xos-test`: runs `nose2` to test the `xos` directory. This code is not yet
42+
Python 3 or flake8 clean.
43+
44+
- `migration-test`: Runs the `xos-migrate` tool on the XOS core modules. This
45+
verifies that the Django migrations have been properly created. If you've
46+
changed `xosgenx` or the `core.xproto` file you may need to generate new
47+
migrations. See `docs/dev/xosmigrate.md` for more information.
48+
49+
Additionally, a virtualenv will be created in `venv-xos` - you can `source
50+
./venv-xos/bin/activate` if you'd like to run tools like `xos-migrate` manually.
51+
52+
### Issues you may encounter when developing XOS
53+
54+
*Testing errors that complain about missing compliers or header files:
55+
`src/twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or
56+
directory`*
57+
58+
You probably need to install a C build system and the Python development headers.
59+
60+
*After making changes to the requirements.txt or other files, the changes don't
61+
seem to be register*
62+
63+
You might need to clean up any files left behind by previous development work.
64+
`make clean` in the root Makefile should clean up most files. Additionally,
65+
`git clean -ixd` will let you interactively remove all ignored files and
66+
directories from your source tree.

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.17
1+
2.2.18

containers/chameleon/Dockerfile.chameleon

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# xosproject/chameleon
16-
FROM xosproject/xos-base:2.2.17
16+
FROM xosproject/xos-base:2.2.18
1717

1818
# xos-base already has protoc and dependencies installed
1919

containers/xos/Dockerfile.client

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# xosproject/xos-client
16-
FROM xosproject/xos-libraries:2.2.17
16+
FROM xosproject/xos-libraries:2.2.18
1717

1818
# Install XOS client
1919
COPY lib/xos-api /tmp/xos-api

containers/xos/Dockerfile.libraries

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# xosproject/xos-libraries
16-
FROM xosproject/xos-base:2.2.17
16+
FROM xosproject/xos-base:2.2.18
1717

1818
# Add libraries
1919
COPY lib /opt/xos/lib

containers/xos/Dockerfile.synchronizer-base

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# xosproject/xos-synchronizer-base
16-
FROM xosproject/xos-client:2.2.17
16+
FROM xosproject/xos-client:2.2.18
1717

1818
COPY xos/synchronizers/new_base /opt/xos/synchronizers/new_base
1919
COPY xos/xos/logger.py /opt/xos/xos/logger.py

containers/xos/Dockerfile.xos-core

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# xosproject/xos-core
16-
FROM xosproject/xos-libraries:2.2.17
16+
FROM xosproject/xos-libraries:2.2.18
1717

1818
# Install XOS
1919
ADD xos /opt/xos
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{% include git+https://github.com/opencord/exampleservice.git/docs/example-service.md" %}
1+
{% include "git+https://github.com/opencord/exampleservice.git/docs/example-service.md" %}

lib/xos-api/requirements.txt

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
PyYAML~=3.12
12
Twisted~=16.6.0
2-
multistructlog~=2.1.0
3-
xosconfig~=2.2.6
4-
xosgenx~=2.2.6
53
googleapis-common-protos~=1.5.6
4+
grpcio-tools~=1.12.0
5+
grpcio~=1.12.0
6+
multistructlog~=2.1.0
67
pykwalify~=1.6.0
7-
PyYAML~=3.12
88
python-consul~=1.1.0
9-
grpcio~=1.12.0
9+
simplejson~=3.16.0
10+
xosconfig~=2.2.6
11+
xosgenx~=2.2.6

tox.ini

+3-6
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ max-line-length = 119
2222
[unittest]
2323
plugins = nose2.plugins.junitxml
2424
code-directories =
25-
xos-genx
26-
xos-api
27-
xos-config
28-
xos-synchronizer
2925
coreapi
3026

3127
[junit-xml]
@@ -34,5 +30,6 @@ path = nose2-results.xml
3430
[coverage]
3531
always-on = True
3632
coverage = xos
37-
coverage-report = term
38-
coverage-report = xml
33+
coverage-report =
34+
term
35+
xml

0 commit comments

Comments
 (0)