You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of my python projects have the source code in a src folder. Other repos I've cloned and am working on do not (some have source in the root, some have multiple source folders, etc). In my projects tests are in a test folder (for Pytest). stubs in a stubs folder (for Mypy). I'd like to make it so I can run deptry as "deptry ." and have a way to tell it which folders to scan configured in pyproject.toml. Is there a configuration for pyproject.toml to specify the source folder(s), like source_folders = ["src"] or source_directories = ["src"]? I know I can run "deptry src" (or for those projects with multiple source folders I can run "deptry a b c") instead of "deptry .", but it's sometimes hard to remember which projects have src folders and which do not.
And when integrating with standard tooling (CI/CD piplines) it sure is nice not to have separate commands for separte projects, just a pipeline step to run "deptry ." on the any project going through the pipeline. It would be nice to just have it speicfied in the pyproject.toml and never have to think about the differences betweent the project's source strutures.
I know I can exclude/ignore files and folders, that's nice, but the problem is, that first-party modules are not properly detected unles you either run deptry src, or confiure a list of kown first-party modules in the pyproject.toml, which is much harder to maintain than a list of source directories would be.
If the feature doesn't exist yet, maybe it could be added? It seems rather intuitive that if you can do something from the command-line, that you should be able to also configure that same thing in the pyproject.toml configuration file so you don't have to type the long command line over and over again. Thoughts? Is it already possible and I'm just missing it in the documentation somewhere (or an undocumented feature)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Some of my python projects have the source code in a src folder. Other repos I've cloned and am working on do not (some have source in the root, some have multiple source folders, etc). In my projects tests are in a test folder (for Pytest). stubs in a stubs folder (for Mypy). I'd like to make it so I can run deptry as "deptry ." and have a way to tell it which folders to scan configured in pyproject.toml. Is there a configuration for pyproject.toml to specify the source folder(s), like source_folders = ["src"] or source_directories = ["src"]? I know I can run "deptry src" (or for those projects with multiple source folders I can run "deptry a b c") instead of "deptry .", but it's sometimes hard to remember which projects have src folders and which do not.
And when integrating with standard tooling (CI/CD piplines) it sure is nice not to have separate commands for separte projects, just a pipeline step to run "deptry ." on the any project going through the pipeline. It would be nice to just have it speicfied in the pyproject.toml and never have to think about the differences betweent the project's source strutures.
I know I can exclude/ignore files and folders, that's nice, but the problem is, that first-party modules are not properly detected unles you either run deptry src, or confiure a list of kown first-party modules in the pyproject.toml, which is much harder to maintain than a list of source directories would be.
If the feature doesn't exist yet, maybe it could be added? It seems rather intuitive that if you can do something from the command-line, that you should be able to also configure that same thing in the pyproject.toml configuration file so you don't have to type the long command line over and over again. Thoughts? Is it already possible and I'm just missing it in the documentation somewhere (or an undocumented feature)?
Beta Was this translation helpful? Give feedback.
All reactions