Skip to content

[adoption] explicit source_layout provides no import-path wiring guidance for subproject packages #205

Description

@chrisdpurcell

Outcome

source_layout = "explicit" documents how declared roots reach Ruff/basedpyright/coverage scopes, but not how Python at the root can import a package that lives in a subproject directory. The managed pytest/coverage gate fails with ModuleNotFoundError until the consumer independently wires a uv workspace plus a dev dependency.

Evidence

  • Fresh adoption, project-standards 5.26.0 (v5.26.0), Linux, Python 3.14.7, uv 0.11.6.
  • python-tooling 1.16 with build_backend = "none", source_layout = "explicit", additional_source_roots = ["subproj/src"], pytest.test_paths = ["subproj/tests"].
  • After apply, uv run coverage run -m pytest fails:
subproj/tests/conftest.py:9: in <module>
    from subproj.content.loader import Content
E   ModuleNotFoundError: No module named 'subproj'

The declared roots reach the checker include, Ruff src, and coverage.run.source as documented — but nothing puts the package on the root environment's import path.

Expected behavior

The adopt guide (or troubleshooting table) should state the import prerequisite and the supported wiring, e.g. a uv workspace with the subproject as a member plus a dev dependency on it:

[tool.uv.workspace]
members = ["subproj"]

[tool.uv.sources]
subproj = { workspace = true }

with additional_dev_dependencies = ["subproj"] (and a note that additional_dev_dependencies is the intended channel for this).

Consumer consequence

Multiple failed gate cycles; the fix is discoverable only from uv workspace knowledge, not from the standards documentation.

Blocks progress: no (workaround found).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions