-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
In a project where only the StandalonePipeline is being used, there is a dependency on the redis package through pipelines/__init__.py.
To Reproduce
Steps to reproduce the behavior:
- Create a blank Python project.
- Add only
watergrid==1.1.0torequirements.txtand install frompip. - Create a
StandalonePipeline, using the import linefrom watergrid.pipelines import StandalonePipeline. - Run the project and note the below error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
module = __import__(module_name)
File "/<project_path>/test/TestExtractLogsStep.py", line 4, in <module>
from watergrid.pipelines import StandalonePipeline
File "/<project_path>/venv/lib/python3.9/site-packages/watergrid/pipelines/__init__.py", line 1, in <module>
from watergrid.pipelines.ha_pipeline import HAPipeline
File "/<project_path>/venv/lib/python3.9/site-packages/watergrid/pipelines/ha_pipeline.py", line 4, in <module>
from watergrid.locks.PipelineLock import PipelineLock
File "/<project_path>/venv/lib/python3.9/site-packages/watergrid/locks/__init__.py", line 1, in <module>
from watergrid.locks.RedisPipelineLock import RedisPipelineLock
File "/<project_path>/venv/lib/python3.9/site-packages/watergrid/locks/RedisPipelineLock.py", line 1, in <module>
from redis import Redis
ModuleNotFoundError: No module named 'redis'
Expected behavior
Using StandalonePipeline should not depend on redis.
Watergrid specific
Watergrid version/commit: v1.1.0
Python version: 3.9 MacOS x86
Redis version (if using HAPipeline): None
Additional context
Current workaround is to import directly using the following:
from watergrid.pipelines.StandalonePipeline import StandalonePipelineMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working