tonybaloney / wily

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

Fix aggregation in Windows (fix #210) #211

Closed devdanzin closed 1 year ago

devdanzin commented 1 year ago

In Windows, aggregation is broken in two ways:

This happens because revision.tracked_files and revision.tracked_dirs store paths with forward slashes, but the paths in result use backslashes in Windows. This PR fixes that by converting entries in those lists to Paths and back to str.

This fixes the root cause of #210, which initially had a wrong analysis but documents the issue.

codecov-commenter commented 1 year ago

Codecov Report

Merging #211 (4149e8b) into master (b342a1c) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #211   +/-   ##
=======================================
  Coverage   95.83%   95.84%           
=======================================
  Files          25       25           
  Lines        1346     1349    +3     
  Branches      287      289    +2     
=======================================
+ Hits         1290     1293    +3     
  Misses         32       32           
  Partials       24       24           
Files Changed Coverage Δ
src/wily/commands/build.py 92.78% <100.00%> (+1.29%) :arrow_up:

... and 1 file with indirect coverage changes

devdanzin commented 1 year ago

Sorry about the noise, I couldn't get codecov to pass without adding tests, and I couldn't make the tests fail locally the same way they did on CI.