geoHeil
01/05/2023, 7:16 AMfrom utilities.utilities import common_function
Dagster is only happy with this version above.
from utilities import common_function
Pytest only with this version here.
XOR in either case one of thm (dasger, pytest throws a module not found error) or ImportError: cannot import name 'common_function' from 'utilities' (unknown location)
.
NOTICE: all 3 packages have been installed withand should be natively callable.pip install -e .
Sean Lopp
01/05/2023, 5:24 PMfrom utilities import common_function
in both cases
Dagster's complaint suggests that the utilities package is either incorrectly setup or perhaps not installed when Dagster is calling it
The steps that are required (and shown in the example):
1. Include a __init__.py
in the utilities package that exports the common_function: https://github.com/slopp/dagteam/blob/main/utils/utils/__init__.py
2. Ensure the utilities package has a setup.py
that includes find_packages
which registers the modules within the package: https://github.com/slopp/dagteam/blob/main/utils/setup.py
3. Install the utilities package into the virtualenv for the project
4. Run dagster and pytest from the project virtualenv
I also added some details to the bottom of the README. Let me know if this helps you get it sorted out!geoHeil
01/05/2023, 7:16 PM"-d", "/opt/dagster/dagster_home/src/teamA_analytics"
and 2) installing the common package dagster is starting in docker. But I wonder how well this handles a dev cycle around reloads? Do you think when installing in editable mode the volume mapping should work fine?