tonybaloney / wily

A Python application for tracking, reporting on timing and complexity in Python code
Apache License 2.0
1.21k stars 59 forks source link

Only analyze files that are children of the targets in build() #225

Open devdanzin opened 1 year ago

devdanzin commented 1 year ago

When building, wily creates lists of target files to scan based on added and modified files from the git repository. It's possible to pass a path to wily build, but it won't currently avoid scanning files outside of the path.

This PR makes wily only scan files that are children of the chosen path during build. This is an improvement for building in repositories that contains large files that aren't interesting to analyze. The behavior remains unchanged if no path is passed to wily build.

This addresses a TODO in build.py, adapting some commented out code: https://github.com/tonybaloney/wily/blob/2590691d5d29a2872cc175bdb773b1dbf5fde202/src/wily/commands/build.py#L103

codecov-commenter commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.81%. Comparing base (2590691) to head (4761779).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #225 +/- ## ========================================== - Coverage 95.86% 94.81% -1.06% ========================================== Files 25 25 Lines 1403 1407 +4 Branches 296 297 +1 ========================================== - Hits 1345 1334 -11 - Misses 33 48 +15 Partials 25 25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.