Description
When attempting to install the repository in editable mode:
uv pip install -e .
or
pip install -e .
the installation fails with the following error:
error: Multiple top-level modules discovered in a flat-layout: ['train', 'prepare'].
This appears to be due to setuptools being unable to automatically determine which modules to include in a flat project layout.
Current Behavior
Editable install fails using both pip and uv pip
Error originates from setuptools package discovery
Expected Behavior
The project should install successfully in editable mode without requiring manual changes to pyproject.toml.
Temporary Fix
Adding the following resolves the issue:
[tool.setuptools]
py-modules = ["train", "prepare"]
Suggested Fixes
One of the following could resolve the issue permanently:
Explicitly define modules in pyproject.toml:
[tool.setuptools]
py-modules = ["train", "prepare"]
Convert to a package structure (recommended):
autoresearch/
init.py
Move to a src/ layout for better packaging practices
Environment
Python: 3.10
Installer: uv (also reproducible with pip)
OS: Linux (HPC cluster)
Additional Context
This issue may affect users trying to extend or modify the project locally using editable installs.
Description
When attempting to install the repository in editable mode:
uv pip install -e .
or
pip install -e .
the installation fails with the following error:
error: Multiple top-level modules discovered in a flat-layout: ['train', 'prepare'].
This appears to be due to setuptools being unable to automatically determine which modules to include in a flat project layout.
Current Behavior
Editable install fails using both pip and uv pip
Error originates from setuptools package discovery
Expected Behavior
The project should install successfully in editable mode without requiring manual changes to pyproject.toml.
Temporary Fix
Adding the following resolves the issue:
[tool.setuptools]
py-modules = ["train", "prepare"]
Suggested Fixes
One of the following could resolve the issue permanently:
Explicitly define modules in pyproject.toml:
[tool.setuptools]
py-modules = ["train", "prepare"]
Convert to a package structure (recommended):
autoresearch/
init.py
Move to a src/ layout for better packaging practices
Environment
Python: 3.10
Installer: uv (also reproducible with pip)
OS: Linux (HPC cluster)
Additional Context
This issue may affect users trying to extend or modify the project locally using editable installs.