79533437

Date: 2025-03-25 11:02:55
Score: 0.5
Natty:
Report link

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.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ismail Ahmed