Skip to content

add custom source roots or namespace packages to analyze graph? #20701

@gwdekker

Description

@gwdekker

ruff analyze graph is a great potential way to quickly get a projects' dependency tree which could be very useful in many different ways.

I found that in my monorepo, using the polylith setup, it is not able to find the dependencies correctly.

This is due to the fact that the structure is non-standard - it uses custom source roots bases and components, which are not detected correctly by rufffor this use case.

More precisely, the polylith setup builds the package in a special way, and the imports I have across my code are of the type from monorepo_name.component_name import X. This is not recognized by ruff analyze to be an internal dependency it seems, so it does not list this as a dependency.

Curious to hear if this is something that is easily fixable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    great writeupA wonderful example of a quality contributionquestionAsking for support or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions