code: install_deps> python -I -m pip install coverage pytest pytest-cov .pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel .pkg: _optional_hooks> python /tmp/venv-bYVu/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: get_requires_for_build_sdist> python /tmp/venv-bYVu/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: get_requires_for_build_wheel> python /tmp/venv-bYVu/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: install_requires_for_build_wheel> python -I -m pip install wheel .pkg: freeze> python -m pip freeze --all .pkg: pip==23.3.1,setuptools==69.0.2,wheel==0.42.0 .pkg: prepare_metadata_for_build_wheel> python /tmp/venv-bYVu/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: build_sdist> python /tmp/venv-bYVu/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ code: install_package_deps> python -I -m pip install influxdb joblib 'joblib>=0.3.2' 'mdclogpy<=1.1.1' pandas==1.5.3 ricxappframe==3.2.2 schedule scikit-learn 'statsmodels>=0.11.1' code: install_package> python -I -m pip install --force-reinstall --no-deps /w/workspace/ric-app-qp-tox-sonarqube/.tox/.tmp/package/1/qp-0.0.5.tar.gz code: freeze> python -m pip freeze --all code: async-timeout==4.0.3,certifi==2023.11.17,charset-normalizer==3.3.2,coverage==7.4.0,exceptiongroup==1.2.0,hiredis==2.0.0,idna==3.6,influxdb==5.3.1,iniconfig==2.0.0,inotify==0.2.10,inotify-simple==1.3.5,joblib==1.3.2,mdclogpy==1.1.1,msgpack==1.0.7,nose==1.3.7,numpy==1.26.3,packaging==23.2,pandas==1.5.3,patsy==0.5.6,pip==23.3.1,pluggy==1.3.0,protobuf==3.20.3,pytest==7.4.4,pytest-cov==4.1.0,python-dateutil==2.8.2,pytz==2023.3.post1,qp==0.0.5,redis==4.3.6,requests==2.31.0,ricsdl==3.1.3,ricxappframe==3.2.2,schedule==1.2.1,scikit-learn==1.3.2,scipy==1.11.4,setuptools==69.0.2,six==1.16.0,statsmodels==0.14.1,threadpoolctl==3.2.0,tomli==2.0.1,urllib3==2.1.0,wheel==0.42.0 code: commands[0]> pytest -v --cov src --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=60 ============================= test session starts ============================== platform linux -- Python 3.10.6, pytest-7.4.4, pluggy-1.3.0 -- /w/workspace/ric-app-qp-tox-sonarqube/.tox/code/bin/python cachedir: .tox/code/.pytest_cache rootdir: /w/workspace/ric-app-qp-tox-sonarqube plugins: cov-4.1.0 collecting ... collected 5 items tests/test_qp.py::test_init_xapp PASSED [ 20%] tests/test_qp.py::test_database_connection PASSED [ 40%] tests/test_qp.py::test_training PASSED [ 60%] tests/test_qp.py::test_predict PASSED [ 80%] tests/test_qp.py::test_rmr_flow PASSED [100%] =============================== warnings summary =============================== tests/test_qp.py::test_training /w/workspace/ric-app-qp-tox-sonarqube/src/qptrain.py:60: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. for name, column in df.iteritems(): tests/test_qp.py: 20 warnings /w/workspace/ric-app-qp-tox-sonarqube/.tox/code/lib/python3.10/site-packages/pandas/core/indexes/multi.py:643: DeprecationWarning: `cumproduct` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `cumprod` instead. codes = cartesian_product(codes) tests/test_qp.py: 40 warnings /w/workspace/ric-app-qp-tox-sonarqube/.tox/code/lib/python3.10/site-packages/pandas/core/reshape/util.py:60: DeprecationWarning: `product` is deprecated as of NumPy 1.25.0, and will be removed in NumPy 2.0. Please use `prod` instead. return [ tests/test_qp.py::test_rmr_flow /w/workspace/ric-app-qp-tox-sonarqube/.tox/code/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-4 (loop) Traceback (most recent call last): File "/opt/pyenv/versions/3.10.6/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/opt/pyenv/versions/3.10.6/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/w/workspace/ric-app-qp-tox-sonarqube/.tox/code/lib/python3.10/site-packages/ricxappframe/xapp_frame.py", line 961, in loop func(self, summary, sbuf) File "/w/workspace/ric-app-qp-tox-sonarqube/src/main.py", line 67, in qp_predict_handler pred_msg = predict(summary[rmr.RMR_MS_PAYLOAD]) File "/w/workspace/ric-app-qp-tox-sonarqube/src/main.py", line 99, in predict ue_list = payload['UEPredictionSet'] TypeError: string indices must be integers warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ---------- coverage: platform linux, python 3.10.6-final-0 ----------- Name Stmts Miss Cover Missing ------------------------------------------------- src/__init__.py 0 0 100% src/database.py 107 48 55% 44-55, 59-73, 76-91, 94-99, 102-105, 145, 148, 151 src/exceptions.py 6 0 100% src/main.py 84 28 67% 49-50, 57-59, 68-76, 104-118, 149, 152, 169 src/prediction.py 18 13 28% 27-40 src/qptrain.py 98 18 82% 41-43, 53, 63-64, 68-75, 115-116, 139-140 ------------------------------------------------- TOTAL 313 107 66% Coverage HTML written to dir htmlcov Coverage XML written to file coverage.xml Required test coverage of 60% reached. Total coverage: 65.81% ======================= 5 passed, 62 warnings in 44.20s ======================== code: commands[1]> coverage xml -i Wrote XML report to coverage.xml .pkg: _exit> python /tmp/venv-bYVu/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ code: OK ✔ in 1 minute 22.35 seconds flake8: install_deps> python -I -m pip install flake8 flake8: freeze> python -m pip freeze --all flake8: flake8==7.0.0,mccabe==0.7.0,pip==23.3.1,pycodestyle==2.11.1,pyflakes==3.2.0,qp==0.0.5,setuptools==69.0.2,wheel==0.42.0 flake8: commands[0]> flake8 setup.py src tests code: OK (82.35=setup[37.49]+cmd[44.73,0.14] seconds) flake8: OK (5.51=setup[5.26]+cmd[0.25] seconds) congratulations :) (88.02 seconds)