diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 85ba50e7..853023a8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -32,7 +32,7 @@ jobs: - name: Test with pytest working-directory: python/idsse_common run: | - pytest ./test --cov=./idsse/common --cov-report=term --junitxml=./pytest.xml | tee ./coverage.txt + pytest ./test --cov=./idsse/common --cov-report=term --junitxml=./test/pytest.xml | tee ./test/coverage.txt - name: Pytest coverage comment if: ${{ github.ref == 'refs/heads/main' }} diff --git a/python/idsse_common/coverage.txt b/python/idsse_common/coverage.txt deleted file mode 100644 index b60a0f58..00000000 --- a/python/idsse_common/coverage.txt +++ /dev/null @@ -1,50 +0,0 @@ -============================= test session starts ============================== -platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0 -rootdir: /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common -plugins: cov-4.1.0 -collected 112 items - -test/test_aws_utils.py .................. [ 16%] -test/test_config.py ............ [ 26%] -test/test_grid_proj.py ............. [ 38%] -test/test_path_builder.py ..................... [ 57%] -test/test_utils.py ........................ [ 78%] -test/test_validate_schema.py ........................ [100%] - -=============================== warnings summary =============================== -test/test_validate_schema.py:14 -test/test_validate_schema.py:14 - /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_validate_schema.py:14: DeprecationWarning: Importing Validator directly from the jsonschema package is deprecated and will become an ImportError. Import it from jsonschema.protocols instead. - from jsonschema import Validator - -idsse/common/validate_schema.py:16 -idsse/common/validate_schema.py:16 - /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/validate_schema.py:16: DeprecationWarning: Importing Validator directly from the jsonschema package is deprecated and will become an ImportError. Import it from jsonschema.protocols instead. - from jsonschema import Validator, FormatChecker, RefResolver - -idsse/common/validate_schema.py:16 -idsse/common/validate_schema.py:16 - /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/validate_schema.py:16: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization. A future release will remove RefResolver. Please file a feature request (on referencing) if you are missing an API for the kind of customization you need. - from jsonschema import Validator, FormatChecker, RefResolver - --- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -- generated xml file: /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/pytest.xml - - ----------- coverage: platform linux, python 3.11.5-final-0 ----------- -Name Stmts Miss Cover ------------------------------------------------------ -idsse/common/__init__.py 0 0 100% -idsse/common/aws_utils.py 86 5 94% -idsse/common/config.py 68 8 88% -idsse/common/grid_proj.py 53 0 100% -idsse/common/json_message.py 22 22 0% -idsse/common/log_util.py 40 40 0% -idsse/common/path_builder.py 157 41 74% -idsse/common/publish_confirm.py 155 155 0% -idsse/common/rabbitmq_utils.py 16 16 0% -idsse/common/utils.py 94 9 90% -idsse/common/validate_schema.py 39 0 100% ------------------------------------------------------ -TOTAL 730 296 59% - -======================= 112 passed, 6 warnings in 0.82s ======================== diff --git a/python/idsse_common/pytest.xml b/python/idsse_common/pytest.xml deleted file mode 100644 index 4c18d723..00000000 --- a/python/idsse_common/pytest.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/python/idsse_common/test/coverage.txt b/python/idsse_common/test/coverage.txt deleted file mode 100644 index adf3db7a..00000000 --- a/python/idsse_common/test/coverage.txt +++ /dev/null @@ -1,93 +0,0 @@ -============================= test session starts ============================== -platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0 -rootdir: /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common -plugins: cov-4.1.0 -collected 20 items / 4 errors - -==================================== ERRORS ==================================== -___________________ ERROR collecting test/test_aws_utils.py ____________________ -ImportError while importing test module '/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_aws_utils.py'. -Hint: make sure your test modules/packages have valid Python names. -Traceback: -/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/__init__.py:126: in import_module - return _bootstrap._gcd_import(name[level:], package, level) -test_aws_utils.py:22: in - from idsse.common.aws_utils import AwsUtils -../idsse/common/aws_utils.py:18: in - from .path_builder import PathBuilder -../idsse/common/path_builder.py:24: in - from .utils import TimeDelta -../idsse/common/utils.py:20: in - import pygrib -E ModuleNotFoundError: No module named 'pygrib' -___________________ ERROR collecting test/test_grid_proj.py ____________________ -ImportError while importing test module '/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_grid_proj.py'. -Hint: make sure your test modules/packages have valid Python names. -Traceback: -/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/__init__.py:126: in import_module - return _bootstrap._gcd_import(name[level:], package, level) -test_grid_proj.py:18: in - from idsse.common.grid_proj import GridProj, RoundingMethod -../idsse/common/grid_proj.py:17: in - from pyproj import CRS, Transformer -E ModuleNotFoundError: No module named 'pyproj' -__________________ ERROR collecting test/test_path_builder.py __________________ -ImportError while importing test module '/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_path_builder.py'. -Hint: make sure your test modules/packages have valid Python names. -Traceback: -/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/__init__.py:126: in import_module - return _bootstrap._gcd_import(name[level:], package, level) -test_path_builder.py:16: in - from idsse.common.utils import TimeDelta -../idsse/common/utils.py:20: in - import pygrib -E ModuleNotFoundError: No module named 'pygrib' -_____________________ ERROR collecting test/test_utils.py ______________________ -ImportError while importing test module '/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_utils.py'. -Hint: make sure your test modules/packages have valid Python names. -Traceback: -/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/__init__.py:126: in import_module - return _bootstrap._gcd_import(name[level:], package, level) -test_utils.py:21: in - from idsse.common.utils import TimeDelta, Map -../idsse/common/utils.py:20: in - import pygrib -E ModuleNotFoundError: No module named 'pygrib' -=============================== warnings summary =============================== -../idsse/common/validate_schema.py:16 -../idsse/common/validate_schema.py:16 - /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/validate_schema.py:16: DeprecationWarning: Importing Validator directly from the jsonschema package is deprecated and will become an ImportError. Import it from jsonschema.protocols instead. - from jsonschema import Validator, FormatChecker, RefResolver - -../idsse/common/validate_schema.py:16 -../idsse/common/validate_schema.py:16 - /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/validate_schema.py:16: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization. A future release will remove RefResolver. Please file a feature request (on referencing) if you are missing an API for the kind of customization you need. - from jsonschema import Validator, FormatChecker, RefResolver - --- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html -- generated xml file: /home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/pytest.xml - - ----------- coverage: platform linux, python 3.11.5-final-0 ----------- -Name Stmts Miss Cover ------------------------------------------------------------------------------------------------------------------------------------ -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/__init__.py 0 0 100% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/aws_utils.py 86 80 7% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/config.py 68 48 29% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/grid_proj.py 53 49 8% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/json_message.py 22 22 0% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/log_util.py 40 40 0% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/path_builder.py 157 152 3% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/publish_confirm.py 153 153 0% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/rabbitmq_utils.py 16 16 0% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/utils.py 111 103 7% -/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/idsse/common/validate_schema.py 39 32 18% ------------------------------------------------------------------------------------------------------------------------------------ -TOTAL 745 695 7% - -=========================== short test summary info ============================ -ERROR test_aws_utils.py -ERROR test_grid_proj.py -ERROR test_path_builder.py -ERROR test_utils.py -!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!! -======================== 4 warnings, 4 errors in 0.96s ========================= diff --git a/python/idsse_common/test/pytest.xml b/python/idsse_common/test/pytest.xml deleted file mode 100644 index 03c34af0..00000000 --- a/python/idsse_common/test/pytest.xml +++ /dev/null @@ -1,41 +0,0 @@ -ImportError while importing test module '/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_aws_utils.py'. -Hint: make sure your test modules/packages have valid Python names. -Traceback: -/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/__init__.py:126: in import_module - return _bootstrap._gcd_import(name[level:], package, level) -test_aws_utils.py:22: in <module> - from idsse.common.aws_utils import AwsUtils -../idsse/common/aws_utils.py:18: in <module> - from .path_builder import PathBuilder -../idsse/common/path_builder.py:24: in <module> - from .utils import TimeDelta -../idsse/common/utils.py:20: in <module> - import pygrib -E ModuleNotFoundError: No module named 'pygrib'ImportError while importing test module '/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_grid_proj.py'. -Hint: make sure your test modules/packages have valid Python names. -Traceback: -/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/__init__.py:126: in import_module - return _bootstrap._gcd_import(name[level:], package, level) -test_grid_proj.py:18: in <module> - from idsse.common.grid_proj import GridProj, RoundingMethod -../idsse/common/grid_proj.py:17: in <module> - from pyproj import CRS, Transformer -E ModuleNotFoundError: No module named 'pyproj'ImportError while importing test module '/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_path_builder.py'. -Hint: make sure your test modules/packages have valid Python names. -Traceback: -/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/__init__.py:126: in import_module - return _bootstrap._gcd_import(name[level:], package, level) -test_path_builder.py:16: in <module> - from idsse.common.utils import TimeDelta -../idsse/common/utils.py:20: in <module> - import pygrib -E ModuleNotFoundError: No module named 'pygrib'ImportError while importing test module '/home/runner/work/idss-engine-commons/idss-engine-commons/python/idsse_common/test/test_utils.py'. -Hint: make sure your test modules/packages have valid Python names. -Traceback: -/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/importlib/__init__.py:126: in import_module - return _bootstrap._gcd_import(name[level:], package, level) -test_utils.py:21: in <module> - from idsse.common.utils import TimeDelta, Map -../idsse/common/utils.py:20: in <module> - import pygrib -E ModuleNotFoundError: No module named 'pygrib' \ No newline at end of file