Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to pass multiple source directories #381

Merged

Conversation

mkniewallner
Copy link
Collaborator

Resolves #177.

Note: This PR is based on #380, so first commit is not part of this PR.

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

While not that common, some projects have multiple source directories, for instance if they define code used inside a web server in a dedicated directory, and code used in a dedicated Kubernetes job like a CRON in another dedicated directory.

In order to give more flexibility to developers, this PR updates ROOT argument so that multiple paths can be passed on the CLI, like so:

deptry a_directory another_directory

This won't break existing usages, since developers can still pass one directory as they are used to.

@mkniewallner mkniewallner force-pushed the feat/handle-multiple-src-paths branch from 795b2a6 to 9aeac27 Compare May 9, 2023 19:58
@mkniewallner mkniewallner marked this pull request as ready for review May 9, 2023 19:58
@mkniewallner mkniewallner requested a review from fpgmaas May 9, 2023 19:58
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #381 (ce46162) into main (640d45b) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #381   +/-   ##
=====================================
  Coverage   96.0%   96.0%           
=====================================
  Files         37      37           
  Lines       1042    1044    +2     
  Branches     207     208    +1     
=====================================
+ Hits        1001    1003    +2     
  Misses        25      25           
  Partials      16      16           
Impacted Files Coverage Δ
deptry/cli.py 91.6% <100.0%> (ø)
deptry/core.py 98.0% <100.0%> (ø)
deptry/python_file_finder.py 100.0% <100.0%> (ø)

@mkniewallner mkniewallner force-pushed the feat/handle-multiple-src-paths branch from 9aeac27 to cc47574 Compare May 10, 2023 09:39
Co-authored-by: Florian Maas <fpgmaas@gmail.com>
@mkniewallner mkniewallner merged commit c85681c into fpgmaas:main May 10, 2023
@mkniewallner mkniewallner deleted the feat/handle-multiple-src-paths branch May 10, 2023 09:48
@mkniewallner mkniewallner modified the milestone: 0.11 May 10, 2023
@mkniewallner mkniewallner mentioned this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the source paths configurable
2 participants