CMakePP / CMinx

Generates API documentation for CMake functions and macros
https://cmakepp.github.io/CMinx/
Apache License 2.0
14 stars 5 forks source link

Action for Formatting to PEP8 #96

Closed ryanmrichard closed 2 years ago

ryanmrichard commented 2 years ago

Is this pull request associated with an issue(s)? No

Description PEP8 is arguably the de facto way to format Python scripts. This PR adds a workflow which will run on this (and every PR). The workflow:

TODOs None. This is r2g assuming it works as intended.

codecov[bot] commented 2 years ago

Codecov Report

Merging #96 (2c1c3ea) into master (c77a096) will not change coverage. The diff coverage is 91.66%.

@@           Coverage Diff           @@
##           master      #96   +/-   ##
=======================================
  Coverage   95.68%   95.68%           
=======================================
  Files           6        6           
  Lines         765      765           
=======================================
  Hits          732      732           
  Misses         33       33           
Flag Coverage Δ
unittests 95.68% <91.66%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cminx/documenter.py 98.23% <75.00%> (ø)
cminx/rstwriter.py 98.25% <92.85%> (ø)
cminx/__init__.py 91.45% <94.11%> (ø)
cminx/config.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fbf6323...2c1c3ea. Read the comment docs.

ryanmrichard commented 2 years ago

This is r2g. The commit with CI notes uses the formatted code to make sure the formatting didn't break anything.

AutonomicPerfectionist commented 2 years ago

@ryanmrichard something funky is going on with coverage, it thinks coverage dropped down to 0%. I think it's because the last commit, 9b1b4046e5b196f034bf2832c762d8d060d81c65, didn't upload anything because it skipped all the other checks, and that's confusing Coverage

ryanmrichard commented 2 years ago

@AutonomicPerfectionist My guess is it has something to do with the automatic commit. I just merged master (and the formatted version of this branch), let's see what CI say.

ryanmrichard commented 2 years ago

Based on the CI logs, there's a warning about no data being collected, which is presumably why it's getting 0%. Not sure why no data has been collected; looking into that now...

ryanmrichard commented 2 years ago

@AutonomicPerfectionist I fixed it. It looks like applying PEP8 formatting to test_parser.py was the problem. For the time being I disabled formatting the tests/ directory. I'm not sure what's causing the drop in coverage (maybe just more lines?), but I'm not too worried about it for the purposes of this PR. You okay merging it?

AutonomicPerfectionist commented 2 years ago

@ryanmrichard looks good to me