fpgmaas/deptry

Make the source paths configurable

mkniewallner opened this issue · 3 comments

Is your feature request related to a problem? Please describe.

Python projects use different structures to organise their modules.

Libraries nowadays tend to have an src directory holding the applicative code, while other projects might play with PYTHONPATH to consider some specific packages as source directories discoverable by Python.

deptry doesn't provide any way to account for this flexibility today, preventing those projects from using the library.

Describe the solution you would like

A way to solve both issues could be to allow setting the source paths for the code as an array, similarly to what isort does.

While this is not exactly the solution highlighted in this issue, #244 at least make it possible to specify a source directory other than . while still reading pyproject.toml from where deptry is run, which should serve projects using src layouts, partially resolving this issue.

I still think that being able to define multiple source paths might be convenient for some projects, so let's keep this issue open.

Which popular libraries prefer to have src? I see an entirely different pattern.

Which popular libraries prefer to have src? I see an entirely different pattern.

Sorry for the late reply, I missed your comment somehow.

Out of my head, here are some popular repositories that use src: