cudf icon indicating copy to clipboard operation
cudf copied to clipboard

Fix copyright check issues in pre-commit

Open bdice opened this issue 3 years ago • 2 comments

Description

This PR resolves #10323 and phases out the gitutils.py module in favor of a dependency on GitPython that is managed by pre-commit. It fixes the pre-commit check for copyright years so that only modifications between the target branch (branch-X.Y) and the current git stage will trigger copyright changes (years will not be updated for unmodified files, or for changes that have not been staged). Additionally, it changes the return code to 1 if changes are requested and applied (if modifications were required, that should be considered a failure).

This is the last step to making our entire style check pipeline friendly to pre-commit.

Checklist

  • [x] I am familiar with the Contributing Guidelines.
  • [x] New or existing tests cover these changes.
  • [x] The documentation is up to date with these changes.

bdice avatar Sep 14 '22 23:09 bdice

Codecov Report

:exclamation: No coverage uploaded for pull request base (branch-22.10@4681bdc). Click here to learn what that means. Patch has no changes to coverable lines.

:exclamation: Current head c844b55 differs from pull request most recent head 1f9d28f. Consider uploading reports for the commit 1f9d28f to get more accurate results

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-22.10   #11711   +/-   ##
===============================================
  Coverage                ?   85.90%           
===============================================
  Files                   ?      151           
  Lines                   ?    23532           
  Branches                ?        0           
===============================================
  Hits                    ?    20214           
  Misses                  ?     3318           
  Partials                ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 15 '22 05:09 codecov[bot]

@vyasr @galipremsagar I tagged you both for review because of your experience with the copyright scripts and pre-commit. Thanks!

bdice avatar Sep 19 '22 12:09 bdice

Once merged, could you also copy over the changes to cuml: https://github.com/rapidsai/cuml/blob/branch-22.10/ci/checks/copyright.py, These scripts have been copied over from there actually.

galipremsagar avatar Sep 23 '22 17:09 galipremsagar

Is this good to go?

ttnghia avatar Sep 28 '22 05:09 ttnghia

Is this good to go?

I’d like a final approval from @vyasr to make sure there wasn’t anything else he wanted to address. Then please feel free to merge!

bdice avatar Sep 28 '22 05:09 bdice

@gpucibot merge

vyasr avatar Sep 29 '22 20:09 vyasr