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-7VVs/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: get_requires_for_build_sdist> python /tmp/venv-7VVs/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: get_requires_for_build_wheel> python /tmp/venv-7VVs/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==24.0,setuptools==69.5.1,wheel==0.43.0 .pkg: prepare_metadata_for_build_wheel> python /tmp/venv-7VVs/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ .pkg: build_sdist> python /tmp/venv-7VVs/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==2024.6.2,charset-normalizer==3.3.2,coverage==7.5.3,exceptiongroup==1.2.1,hiredis==2.0.0,idna==3.7,influxdb==5.3.2,iniconfig==2.0.0,inotify==0.2.10,inotify_simple==1.3.5,joblib==1.4.2,mdclogpy==1.1.1,msgpack==1.0.8,nose==1.3.7,numpy==1.26.4,packaging==24.1,pandas==1.5.3,patsy==0.5.6,pip==24.0,pluggy==1.5.0,protobuf==3.20.3,pytest==8.2.2,pytest-cov==5.0.0,python-dateutil==2.9.0.post0,pytz==2024.1,qp==0.0.5,redis==4.3.6,requests==2.32.3,ricsdl==3.1.3,ricxappframe==3.2.2,schedule==1.2.2,scikit-learn==1.5.0,scipy==1.13.1,setuptools==69.5.1,six==1.16.0,statsmodels==0.14.2,threadpoolctl==3.5.0,tomli==2.0.1,urllib3==2.2.1,wheel==0.43.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-8.2.2, pluggy-1.5.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-5.0.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:77: 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 83 28 66% 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 312 107 66% Coverage HTML written to dir htmlcov Coverage XML written to file coverage.xml Required test coverage of 60% reached. Total coverage: 65.71% ======================= 5 passed, 62 warnings in 45.98s ======================== code: commands[1]> coverage xml -i Wrote XML report to coverage.xml code: OK ✔ in 1 minute 27.49 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==24.0,pycodestyle==2.11.1,pyflakes==3.2.0,qp==0.0.5,setuptools==69.5.1,wheel==0.43.0 flake8: commands[0]> flake8 setup.py src tests code: OK (87.49=setup[40.51]+cmd[46.73,0.25] seconds) flake8: OK (3.86=setup[3.62]+cmd[0.24] seconds) congratulations :) (91.51 seconds)