copier icon indicating copy to clipboard operation
copier copied to clipboard

Precommix

Open yajo opened this issue 2 years ago • 1 comments

Add precommix for linting and formatting.

yajo avatar Jun 13 '22 09:06 yajo

FTR I added a poll for Copier contributors in https://github.com/copier-org/copier/discussions/757.

yajo avatar Aug 28 '22 07:08 yajo

Codecov Report

Merging #696 (c08455f) into master (dae3198) will increase coverage by 0.06%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #696      +/-   ##
==========================================
+ Coverage   96.58%   96.65%   +0.06%     
==========================================
  Files          41       41              
  Lines        3019     3018       -1     
==========================================
+ Hits         2916     2917       +1     
+ Misses        103      101       -2     
Flag Coverage Δ
unittests 96.65% <100.00%> (+0.06%) :arrow_up:

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

Impacted Files Coverage Δ
copier/cli.py 97.59% <ø> (+1.07%) :arrow_up:
copier/main.py 94.41% <ø> (ø)
copier/subproject.py 97.56% <ø> (ø)
copier/template.py 96.26% <ø> (ø)
copier/types.py 85.41% <ø> (ø)
copier/user_data.py 94.52% <ø> (ø)
copier/vcs.py 97.67% <ø> (ø)
devtasks.py 0.00% <ø> (ø)
tests/test_migrations.py 100.00% <ø> (ø)
copier/__main__.py 100.00% <100.00%> (ø)
... and 6 more

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

codecov-commenter avatar Nov 07 '22 12:11 codecov-commenter

Cool! This is now working! To try it out:

nix shell github:copier-org/copier/precommix

That will load copier installed with nix in your shell. Now go play with it.

Pending: docs, fix CI (all should break right now), provide more arches.

yajo avatar Nov 08 '22 16:11 yajo

Cool! This is now working! To try it out:

nix shell github:copier-org/copier/precommix

That will load copier installed with nix in your shell. Now go play with it.

Pending: docs, fix CI (all should break right now), provide more arches.

Thank you for packaging copier! Using the exact flake you provided worked at first but I believe the inputs used some GitHub nomenclature related to pull requests so they stopped working (the inputs with # hack comments afterwards). I packaged it using exact git hashes here (https://github.com/nialov/nialov-py-template) and added git into the path of the copier executable as it seemed to error without it. Should work with nix run github:nialov/nialov-py-template#copier.

nialov avatar Dec 08 '22 10:12 nialov

@yajo FYI there is a project that integrates pre-commit with Nix: https://github.com/cachix/pre-commit-hooks.nix

rszamszur avatar Dec 15 '22 14:12 rszamszur