Closed devdanzin closed 1 year ago
Merging #206 (3a62254) into master (acf39d2) will increase coverage by
0.01%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #206 +/- ##
==========================================
+ Coverage 95.46% 95.48% +0.01%
==========================================
Files 26 26
Lines 1346 1351 +5
Branches 287 287
==========================================
+ Hits 1285 1290 +5
Misses 37 37
Partials 24 24
Files Changed | Coverage Δ | |
---|---|---|
src/wily/__main__.py | 95.69% <100.00%> (ø) |
|
src/wily/commands/graph.py | 100.00% <100.00%> (ø) |
This PR addresses a TODO comment in graph.py: "Add multiple lines for multiple files". It turns
path
from a single argument into a variadic argument and plots lines for each file passed (and for those files in any directories passed too). If--aggregate
is used, it aggregates the data for any directories passed, but also displays individual lines for any files passed (we can't easily aggregate those, as the aggregated data is recorded on build).To achieve this, an incompatible change is needed:
metrics
, which previously was a variadic argument, now is a required option instead (which means it's always necessary to pass-m metric_name
). To pass two metrics, users need to provide them as comma-separated values (same as indiff
). Another way to go about this would be to add an explicitz_axis
option, so when users want a metric in Z axis they provide it as this option.Listing multiple file names in the graphs title simply doesn't work after a handful of files. So this PR avoids printing file names altogether when more than one path is supplied.
I like the comma-separated option because it matches
diff
and also because I'd like to introduce a new command using the same solution (it takes arbitrary number of paths and metrics, so it'll need a way to pass multiple metrics as non-variadic argument or option).