It looks like the issue is with how setuptools is handling the package discovery. The [tool.setuptools.packages.find] section is only searching inside packages/src and config, but config isn’t structured as a package under packages/src.
Fixes to try:
Explicitly list config as a package
Update pyproject.toml to:
[tool.setuptools.packages.find]
where = ["packages/src"] # Only look in packages/src
include = ["*"] # Find all packages
Then, manually add config in setup.cfg (or switch to setuptools.find_namespace_packages()).
Ensure the config module is correctly recognized
Move config/ inside packages/src/ if it should be part of the installable package.
Check PYTHONPATH
When running scripts, try:
sh
PYTHONPATH=. python services/data_ingestion/ingest_data.py
Or explicitly add sys.path.append(str(Path(_file_).resolve().parent.parent)) in the script.
Use src layout
If restructuring is an option, consider putting all code inside packages/src/dashboard/ and updating imports accordingly.