Skip to content

Get config and dependencies from different pyproject.tomls #1292

@austin-bingham-4ss

Description

@austin-bingham-4ss

I have a a uv-workspace-based monorepo. I'd like to be able to express my deptry configuration in exactly one place, the top-level pyproject.toml; the --config option almost lets me do that. Unfortunately, --config tells deptry where to get config and dependencies, and of course the dependencies for each package are stored in the pyproject.toml for each package in the workspace.

So I'd like some way to tell deptry to get just the configuration details from one pyproject.toml and the dependencies from the root (or perhaps from another arbitrary pyproject.toml). That is, I'd like to be able to do something like this:

cd packages/my-nested-package
deptry --config-only ../../pyproject.toml .

This would read the tool.deptry info from "../../pyproject.toml" and everything else from the current directory's pyproject.toml.

Perhaps there's a way to do this already, but I haven't found it. In any event, a feature like this would make it significantly easier to run deptry on this kind of monorepo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions