moved import of optional packages into classes #6

Merged
brian merged 4 commits from make-optional-parts-independent into main 2025-09-17 12:39:00 +02:00
Owner
No description provided.
brian added 1 commit 2025-09-17 11:45:35 +02:00
moved import of optional packages into classes
Code Quality Pipeline / code-quality (pull_request) Failing after 1m53s
Test Python Package / test (pull_request) Failing after 22s
ee6acc6791
brian added 2 commits 2025-09-17 12:14:42 +02:00
code quality fixes
Code Quality Pipeline / code-quality (pull_request) Successful in 30s
Test Python Package / test (pull_request) Successful in 1m12s
396cf83a05
Author
Owner

Test Coverage Report:

============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0
rootdir: /workspace/brian/python-repositories
configfile: pyproject.toml
plugins: anyio-4.10.0, cov-7.0.0
collected 59 items

tests/integration/connection_aware_interface_test.py ......              [ 10%]
tests/integration/context_aware_interface_test.py ....                   [ 16%]
tests/integration/minio_adapter_test.py ...........................      [ 62%]
tests/integration/redis_adapter_test.py ......................           [100%]

=============================== warnings summary ===============================
.venv/lib/python3.12/site-packages/testcontainers/core/waiting_utils.py:178
  /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/core/waiting_utils.py:178: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready'))
    @wait_container_is_ready()

.venv/lib/python3.12/site-packages/testcontainers/core/container.py:245
  /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/core/container.py:245: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready'))
    @wait_container_is_ready()

.venv/lib/python3.12/site-packages/testcontainers/redis/__init__.py:46
  /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/redis/__init__.py:46: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready'))
    @wait_container_is_ready(redis.exceptions.ConnectionError)

.venv/lib/python3.12/site-packages/testcontainers/minio/__init__.py:101
  /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/minio/__init__.py:101: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready'))
    @wait_container_is_ready(ConnectionError)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.12.3-final-0 ________________

Name                                                           Stmts   Miss  Cover   Missing
--------------------------------------------------------------------------------------------
python_repositories/__init__.py                                    3      0   100%
python_repositories/adapters/__init__.py                           3      0   100%
python_repositories/adapters/minio_adapter.py                    102      1    99%   19
python_repositories/adapters/redis_adapter.py                     80      2    98%   21-22
python_repositories/interfaces/__init__.py                         3      0   100%
python_repositories/interfaces/connection_aware_interface.py      12      0   100%
python_repositories/interfaces/context_aware_interface.py          9      0   100%
--------------------------------------------------------------------------------------------
TOTAL                                                            212      3    99%
======================= 59 passed, 4 warnings in 53.61s ========================
**Test Coverage Report:** ``` ============================= test session starts ============================== platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0 rootdir: /workspace/brian/python-repositories configfile: pyproject.toml plugins: anyio-4.10.0, cov-7.0.0 collected 59 items tests/integration/connection_aware_interface_test.py ...... [ 10%] tests/integration/context_aware_interface_test.py .... [ 16%] tests/integration/minio_adapter_test.py ........................... [ 62%] tests/integration/redis_adapter_test.py ...................... [100%] =============================== warnings summary =============================== .venv/lib/python3.12/site-packages/testcontainers/core/waiting_utils.py:178 /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/core/waiting_utils.py:178: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready')) @wait_container_is_ready() .venv/lib/python3.12/site-packages/testcontainers/core/container.py:245 /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/core/container.py:245: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready')) @wait_container_is_ready() .venv/lib/python3.12/site-packages/testcontainers/redis/__init__.py:46 /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/redis/__init__.py:46: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready')) @wait_container_is_ready(redis.exceptions.ConnectionError) .venv/lib/python3.12/site-packages/testcontainers/minio/__init__.py:101 /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/minio/__init__.py:101: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready')) @wait_container_is_ready(ConnectionError) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================ tests coverage ================================ _______________ coverage: platform linux, python 3.12.3-final-0 ________________ Name Stmts Miss Cover Missing -------------------------------------------------------------------------------------------- python_repositories/__init__.py 3 0 100% python_repositories/adapters/__init__.py 3 0 100% python_repositories/adapters/minio_adapter.py 102 1 99% 19 python_repositories/adapters/redis_adapter.py 80 2 98% 21-22 python_repositories/interfaces/__init__.py 3 0 100% python_repositories/interfaces/connection_aware_interface.py 12 0 100% python_repositories/interfaces/context_aware_interface.py 9 0 100% -------------------------------------------------------------------------------------------- TOTAL 212 3 99% ======================= 59 passed, 4 warnings in 53.61s ======================== ```
brian added 1 commit 2025-09-17 12:36:28 +02:00
added graceful handling of missing optional packages
Code Quality Pipeline / code-quality (pull_request) Successful in 26s
Test Python Package / test (pull_request) Successful in 34s
e5c4025aeb
Author
Owner

Test Coverage Report:

============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0
rootdir: /workspace/brian/python-repositories
configfile: pyproject.toml
plugins: cov-7.0.0, anyio-4.10.0
collected 59 items

tests/integration/connection_aware_interface_test.py ......              [ 10%]
tests/integration/context_aware_interface_test.py ....                   [ 16%]
tests/integration/minio_adapter_test.py ...........................      [ 62%]
tests/integration/redis_adapter_test.py ......................           [100%]

=============================== warnings summary ===============================
.venv/lib/python3.12/site-packages/testcontainers/core/waiting_utils.py:178
  /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/core/waiting_utils.py:178: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready'))
    @wait_container_is_ready()

.venv/lib/python3.12/site-packages/testcontainers/core/container.py:245
  /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/core/container.py:245: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready'))
    @wait_container_is_ready()

.venv/lib/python3.12/site-packages/testcontainers/redis/__init__.py:46
  /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/redis/__init__.py:46: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready'))
    @wait_container_is_ready(redis.exceptions.ConnectionError)

.venv/lib/python3.12/site-packages/testcontainers/minio/__init__.py:101
  /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/minio/__init__.py:101: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready'))
    @wait_container_is_ready(ConnectionError)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.12.3-final-0 ________________

Name                                                           Stmts   Miss  Cover   Missing
--------------------------------------------------------------------------------------------
python_repositories/__init__.py                                    3      0   100%
python_repositories/adapters/__init__.py                           3      0   100%
python_repositories/adapters/minio_adapter.py                    101      0   100%
python_repositories/adapters/redis_adapter.py                     78      0   100%
python_repositories/interfaces/__init__.py                         3      0   100%
python_repositories/interfaces/connection_aware_interface.py      12      0   100%
python_repositories/interfaces/context_aware_interface.py          9      0   100%
--------------------------------------------------------------------------------------------
TOTAL                                                            209      0   100%
======================= 59 passed, 4 warnings in 17.98s ========================
**Test Coverage Report:** ``` ============================= test session starts ============================== platform linux -- Python 3.12.3, pytest-8.4.2, pluggy-1.6.0 rootdir: /workspace/brian/python-repositories configfile: pyproject.toml plugins: cov-7.0.0, anyio-4.10.0 collected 59 items tests/integration/connection_aware_interface_test.py ...... [ 10%] tests/integration/context_aware_interface_test.py .... [ 16%] tests/integration/minio_adapter_test.py ........................... [ 62%] tests/integration/redis_adapter_test.py ...................... [100%] =============================== warnings summary =============================== .venv/lib/python3.12/site-packages/testcontainers/core/waiting_utils.py:178 /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/core/waiting_utils.py:178: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready')) @wait_container_is_ready() .venv/lib/python3.12/site-packages/testcontainers/core/container.py:245 /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/core/container.py:245: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready')) @wait_container_is_ready() .venv/lib/python3.12/site-packages/testcontainers/redis/__init__.py:46 /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/redis/__init__.py:46: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready')) @wait_container_is_ready(redis.exceptions.ConnectionError) .venv/lib/python3.12/site-packages/testcontainers/minio/__init__.py:101 /workspace/brian/python-repositories/.venv/lib/python3.12/site-packages/testcontainers/minio/__init__.py:101: DeprecationWarning: The @wait_container_is_ready decorator is deprecated and will be removed in a future version. Use structured wait strategies instead: container.waiting_for(HttpWaitStrategy(8080).for_status_code(200)) or container.waiting_for(LogMessageWaitStrategy('ready')) @wait_container_is_ready(ConnectionError) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================ tests coverage ================================ _______________ coverage: platform linux, python 3.12.3-final-0 ________________ Name Stmts Miss Cover Missing -------------------------------------------------------------------------------------------- python_repositories/__init__.py 3 0 100% python_repositories/adapters/__init__.py 3 0 100% python_repositories/adapters/minio_adapter.py 101 0 100% python_repositories/adapters/redis_adapter.py 78 0 100% python_repositories/interfaces/__init__.py 3 0 100% python_repositories/interfaces/connection_aware_interface.py 12 0 100% python_repositories/interfaces/context_aware_interface.py 9 0 100% -------------------------------------------------------------------------------------------- TOTAL 209 0 100% ======================= 59 passed, 4 warnings in 17.98s ======================== ```
brian merged commit 1dd604dc2a into main 2025-09-17 12:39:00 +02:00
brian deleted branch make-optional-parts-independent 2025-09-17 12:39:01 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lille-vemmelund/python-repositories#6