copier-python 0.23.1__tar.gz → 0.24.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. {copier_python-0.23.1 → copier_python-0.24.1}/CONTRIBUTING.md +4 -0
  2. {copier_python-0.23.1 → copier_python-0.24.1}/PKG-INFO +1 -1
  3. copier_python-0.24.1/tests/template/__snapshots__/test_commit_check.ambr +55 -0
  4. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_contributing.ambr +68 -0
  5. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_mise_toml.ambr +16 -16
  6. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_commit_check.py +12 -6
  7. {copier_python-0.23.1 → copier_python-0.24.1}/tests/test_update.py +13 -4
  8. {copier_python-0.23.1 → copier_python-0.24.1}/.gitignore +0 -0
  9. {copier_python-0.23.1 → copier_python-0.24.1}/AGENTS.md +0 -0
  10. {copier_python-0.23.1 → copier_python-0.24.1}/LICENSE +0 -0
  11. {copier_python-0.23.1 → copier_python-0.24.1}/README.md +0 -0
  12. {copier_python-0.23.1 → copier_python-0.24.1}/copier_python/__init__.py +0 -0
  13. {copier_python-0.23.1 → copier_python-0.24.1}/copier_python/__main__.py +0 -0
  14. {copier_python-0.23.1 → copier_python-0.24.1}/copier_python/py.typed +0 -0
  15. {copier_python-0.23.1 → copier_python-0.24.1}/copier_python/repo.py +0 -0
  16. {copier_python-0.23.1 → copier_python-0.24.1}/copier_python/update.py +0 -0
  17. {copier_python-0.23.1 → copier_python-0.24.1}/docs/contributing.md +0 -0
  18. {copier_python-0.23.1 → copier_python-0.24.1}/docs/development/requirements.md +0 -0
  19. {copier_python-0.23.1 → copier_python-0.24.1}/docs/development/updates.md +0 -0
  20. {copier_python-0.23.1 → copier_python-0.24.1}/docs/development/workflow.md +0 -0
  21. {copier_python-0.23.1 → copier_python-0.24.1}/docs/index.md +0 -0
  22. {copier_python-0.23.1 → copier_python-0.24.1}/docs/license.md +0 -0
  23. {copier_python-0.23.1 → copier_python-0.24.1}/docs/project-creation.md +0 -0
  24. {copier_python-0.23.1 → copier_python-0.24.1}/docs/project-development.md +0 -0
  25. {copier_python-0.23.1 → copier_python-0.24.1}/docs/project-release.md +0 -0
  26. {copier_python-0.23.1 → copier_python-0.24.1}/docs/project-setup.md +0 -0
  27. {copier_python-0.23.1 → copier_python-0.24.1}/docs/project-updates.md +0 -0
  28. {copier_python-0.23.1 → copier_python-0.24.1}/docs/releasing.md +0 -0
  29. {copier_python-0.23.1 → copier_python-0.24.1}/docs/requirements.md +0 -0
  30. {copier_python-0.23.1 → copier_python-0.24.1}/docs/setup.md +0 -0
  31. {copier_python-0.23.1 → copier_python-0.24.1}/pyproject.toml +0 -0
  32. {copier_python-0.23.1 → copier_python-0.24.1}/tests/__init__.py +0 -0
  33. {copier_python-0.23.1 → copier_python-0.24.1}/tests/conftest.py +0 -0
  34. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__init__.py +0 -0
  35. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_agents.ambr +0 -0
  36. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_compose.ambr +0 -0
  37. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_dockerfile.ambr +0 -0
  38. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_docs.ambr +0 -0
  39. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_license.ambr +0 -0
  40. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_pre_commit.ambr +0 -0
  41. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_pyproject.ambr +0 -0
  42. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_readme.ambr +0 -0
  43. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_workflows.ambr +0 -0
  44. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/__snapshots__/test_zensical.ambr +0 -0
  45. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_agents.py +0 -0
  46. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_compose.py +0 -0
  47. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_contributing.py +0 -0
  48. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_dockerfile.py +0 -0
  49. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_docs.py +0 -0
  50. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_license.py +0 -0
  51. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_mise_toml.py +0 -0
  52. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_pre_commit.py +0 -0
  53. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_pyproject.py +0 -0
  54. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_readme.py +0 -0
  55. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_structure.py +0 -0
  56. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_template.py +0 -0
  57. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_workflows.py +0 -0
  58. {copier_python-0.23.1 → copier_python-0.24.1}/tests/template/test_zensical.py +0 -0
  59. {copier_python-0.23.1 → copier_python-0.24.1}/tests/test_version.py +0 -0
  60. {copier_python-0.23.1 → copier_python-0.24.1}/tests/utils.py +0 -0
@@ -27,9 +27,13 @@ and that you have the right to submit it under that license.
27
27
  A contributor is always the author of their contributions.
28
28
  You must read, review, and understand everything you submit, including
29
29
  LLM-generated code or text, and be able to explain it on request.
30
+ Contributions must be submitted by a person, not autonomously by a bot or
31
+ LLM agent.
30
32
 
31
33
  If a commit contains code or text largely generated by an LLM, add an
32
34
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
33
35
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
34
36
 
35
37
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
38
+ Do not include LLM session URLs, or promotional lines such as
39
+ "Generated with [...]."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: copier-python
3
- Version: 0.23.1
3
+ Version: 0.24.1
4
4
  Summary: Copier template for Python projects with modern tooling
5
5
  Project-URL: Homepage, https://smkent.github.io/copier-python
6
6
  Project-URL: Repository, https://github.com/smkent/copier-python
@@ -0,0 +1,55 @@
1
+ # serializer version: 1
2
+ # name: test_commit_check_config[private-commit-check.toml-accepted-with-disclosure]
3
+ '''
4
+ [commit]
5
+ conventional_commits = false
6
+ subject_max_length = 72
7
+ subject_min_length = 1
8
+ # Reject LLM session URL trailers and promotional "Generated with" lines
9
+ message_pattern = '(?ims)(?!.*^(?:[\w-]+-session:\s|\W*generated (?:with|by) \S))'
10
+ ai_attribution = "disclose"
11
+ ai_disclosure_trailers = ["Assisted-by"]
12
+ # Assisted-by: values must not be email addresses or URLs
13
+ ai_disclosure_pattern = '^(?!.*(@|://)).*\S'
14
+
15
+ '''
16
+ # ---
17
+ # name: test_commit_check_config[private-commit-check.toml-not-accepted]
18
+ '''
19
+ [commit]
20
+ conventional_commits = false
21
+ subject_max_length = 72
22
+ subject_min_length = 1
23
+ # Reject LLM session URL trailers and promotional "Generated with" lines
24
+ message_pattern = '(?ims)(?!.*^(?:[\w-]+-session:\s|\W*generated (?:with|by) \S))'
25
+ ai_attribution = "forbid"
26
+
27
+ '''
28
+ # ---
29
+ # name: test_commit_check_config[public-.github/commit-check.toml-accepted-with-disclosure]
30
+ '''
31
+ [commit]
32
+ conventional_commits = false
33
+ subject_max_length = 72
34
+ subject_min_length = 1
35
+ # Reject LLM session URL trailers and promotional "Generated with" lines
36
+ message_pattern = '(?ims)(?!.*^(?:[\w-]+-session:\s|\W*generated (?:with|by) \S))'
37
+ ai_attribution = "disclose"
38
+ ai_disclosure_trailers = ["Assisted-by"]
39
+ # Assisted-by: values must not be email addresses or URLs
40
+ ai_disclosure_pattern = '^(?!.*(@|://)).*\S'
41
+
42
+ '''
43
+ # ---
44
+ # name: test_commit_check_config[public-.github/commit-check.toml-not-accepted]
45
+ '''
46
+ [commit]
47
+ conventional_commits = false
48
+ subject_max_length = 72
49
+ subject_min_length = 1
50
+ # Reject LLM session URL trailers and promotional "Generated with" lines
51
+ message_pattern = '(?ims)(?!.*^(?:[\w-]+-session:\s|\W*generated (?:with|by) \S))'
52
+ ai_attribution = "forbid"
53
+
54
+ '''
55
+ # ---
@@ -183,12 +183,16 @@
183
183
  A contributor is always the author of their contributions.
184
184
  You must read, review, and understand everything you submit, including
185
185
  LLM-generated code or text, and be able to explain it on request.
186
+ Contributions must be submitted by a person, not autonomously by a bot or
187
+ LLM agent.
186
188
 
187
189
  If a commit contains code or text largely generated by an LLM, add an
188
190
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
189
191
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
190
192
 
191
193
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
194
+ Do not include LLM session URLs, or promotional lines such as
195
+ "Generated with [...]."
192
196
 
193
197
  '''
194
198
  # ---
@@ -221,12 +225,16 @@
221
225
  A contributor is always the author of their contributions.
222
226
  You must read, review, and understand everything you submit, including
223
227
  LLM-generated code or text, and be able to explain it on request.
228
+ Contributions must be submitted by a person, not autonomously by a bot or
229
+ LLM agent.
224
230
 
225
231
  If a commit contains code or text largely generated by an LLM, add an
226
232
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
227
233
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
228
234
 
229
235
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
236
+ Do not include LLM session URLs, or promotional lines such as
237
+ "Generated with [...]."
230
238
 
231
239
  ## Development documentation
232
240
 
@@ -350,6 +358,10 @@
350
358
  work. However, code and text you submit must be authored by you, not generated
351
359
  by an LLM.
352
360
 
361
+ Commits with LLM attribution are rejected. This includes `Assisted-by:` or
362
+ `Co-authored-by:` trailers, LLM session URLs, and promotional lines such as
363
+ "Generated with [...]".
364
+
353
365
  '''
354
366
  # ---
355
367
  # name: test_contributing_features[not-accepted-no_docs]
@@ -383,6 +395,10 @@
383
395
  work. However, code and text you submit must be authored by you, not generated
384
396
  by an LLM.
385
397
 
398
+ Commits with LLM attribution are rejected. This includes `Assisted-by:` or
399
+ `Co-authored-by:` trailers, LLM session URLs, and promotional lines such as
400
+ "Generated with [...]".
401
+
386
402
  ## Development documentation
387
403
 
388
404
  ### Prerequisites
@@ -503,12 +519,16 @@
503
519
  A contributor is always the author of their contributions.
504
520
  You must read, review, and understand everything you submit, including
505
521
  LLM-generated code or text, and be able to explain it on request.
522
+ Contributions must be submitted by a person, not autonomously by a bot or
523
+ LLM agent.
506
524
 
507
525
  If a commit contains code or text largely generated by an LLM, add an
508
526
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
509
527
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
510
528
 
511
529
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
530
+ Do not include LLM session URLs, or promotional lines such as
531
+ "Generated with [...]."
512
532
 
513
533
  '''
514
534
  # ---
@@ -543,12 +563,16 @@
543
563
  A contributor is always the author of their contributions.
544
564
  You must read, review, and understand everything you submit, including
545
565
  LLM-generated code or text, and be able to explain it on request.
566
+ Contributions must be submitted by a person, not autonomously by a bot or
567
+ LLM agent.
546
568
 
547
569
  If a commit contains code or text largely generated by an LLM, add an
548
570
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
549
571
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
550
572
 
551
573
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
574
+ Do not include LLM session URLs, or promotional lines such as
575
+ "Generated with [...]."
552
576
 
553
577
  '''
554
578
  # ---
@@ -583,12 +607,16 @@
583
607
  A contributor is always the author of their contributions.
584
608
  You must read, review, and understand everything you submit, including
585
609
  LLM-generated code or text, and be able to explain it on request.
610
+ Contributions must be submitted by a person, not autonomously by a bot or
611
+ LLM agent.
586
612
 
587
613
  If a commit contains code or text largely generated by an LLM, add an
588
614
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
589
615
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
590
616
 
591
617
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
618
+ Do not include LLM session URLs, or promotional lines such as
619
+ "Generated with [...]."
592
620
 
593
621
  '''
594
622
  # ---
@@ -623,12 +651,16 @@
623
651
  A contributor is always the author of their contributions.
624
652
  You must read, review, and understand everything you submit, including
625
653
  LLM-generated code or text, and be able to explain it on request.
654
+ Contributions must be submitted by a person, not autonomously by a bot or
655
+ LLM agent.
626
656
 
627
657
  If a commit contains code or text largely generated by an LLM, add an
628
658
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
629
659
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
630
660
 
631
661
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
662
+ Do not include LLM session URLs, or promotional lines such as
663
+ "Generated with [...]."
632
664
 
633
665
  '''
634
666
  # ---
@@ -663,12 +695,16 @@
663
695
  A contributor is always the author of their contributions.
664
696
  You must read, review, and understand everything you submit, including
665
697
  LLM-generated code or text, and be able to explain it on request.
698
+ Contributions must be submitted by a person, not autonomously by a bot or
699
+ LLM agent.
666
700
 
667
701
  If a commit contains code or text largely generated by an LLM, add an
668
702
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
669
703
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
670
704
 
671
705
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
706
+ Do not include LLM session URLs, or promotional lines such as
707
+ "Generated with [...]."
672
708
 
673
709
  '''
674
710
  # ---
@@ -703,12 +739,16 @@
703
739
  A contributor is always the author of their contributions.
704
740
  You must read, review, and understand everything you submit, including
705
741
  LLM-generated code or text, and be able to explain it on request.
742
+ Contributions must be submitted by a person, not autonomously by a bot or
743
+ LLM agent.
706
744
 
707
745
  If a commit contains code or text largely generated by an LLM, add an
708
746
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
709
747
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
710
748
 
711
749
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
750
+ Do not include LLM session URLs, or promotional lines such as
751
+ "Generated with [...]."
712
752
 
713
753
  '''
714
754
  # ---
@@ -743,12 +783,16 @@
743
783
  A contributor is always the author of their contributions.
744
784
  You must read, review, and understand everything you submit, including
745
785
  LLM-generated code or text, and be able to explain it on request.
786
+ Contributions must be submitted by a person, not autonomously by a bot or
787
+ LLM agent.
746
788
 
747
789
  If a commit contains code or text largely generated by an LLM, add an
748
790
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
749
791
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
750
792
 
751
793
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
794
+ Do not include LLM session URLs, or promotional lines such as
795
+ "Generated with [...]."
752
796
 
753
797
  '''
754
798
  # ---
@@ -783,12 +827,16 @@
783
827
  A contributor is always the author of their contributions.
784
828
  You must read, review, and understand everything you submit, including
785
829
  LLM-generated code or text, and be able to explain it on request.
830
+ Contributions must be submitted by a person, not autonomously by a bot or
831
+ LLM agent.
786
832
 
787
833
  If a commit contains code or text largely generated by an LLM, add an
788
834
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
789
835
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
790
836
 
791
837
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
838
+ Do not include LLM session URLs, or promotional lines such as
839
+ "Generated with [...]."
792
840
 
793
841
  '''
794
842
  # ---
@@ -823,12 +871,16 @@
823
871
  A contributor is always the author of their contributions.
824
872
  You must read, review, and understand everything you submit, including
825
873
  LLM-generated code or text, and be able to explain it on request.
874
+ Contributions must be submitted by a person, not autonomously by a bot or
875
+ LLM agent.
826
876
 
827
877
  If a commit contains code or text largely generated by an LLM, add an
828
878
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
829
879
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
830
880
 
831
881
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
882
+ Do not include LLM session URLs, or promotional lines such as
883
+ "Generated with [...]."
832
884
 
833
885
  '''
834
886
  # ---
@@ -863,12 +915,16 @@
863
915
  A contributor is always the author of their contributions.
864
916
  You must read, review, and understand everything you submit, including
865
917
  LLM-generated code or text, and be able to explain it on request.
918
+ Contributions must be submitted by a person, not autonomously by a bot or
919
+ LLM agent.
866
920
 
867
921
  If a commit contains code or text largely generated by an LLM, add an
868
922
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
869
923
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
870
924
 
871
925
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
926
+ Do not include LLM session URLs, or promotional lines such as
927
+ "Generated with [...]."
872
928
 
873
929
  '''
874
930
  # ---
@@ -903,12 +959,16 @@
903
959
  A contributor is always the author of their contributions.
904
960
  You must read, review, and understand everything you submit, including
905
961
  LLM-generated code or text, and be able to explain it on request.
962
+ Contributions must be submitted by a person, not autonomously by a bot or
963
+ LLM agent.
906
964
 
907
965
  If a commit contains code or text largely generated by an LLM, add an
908
966
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
909
967
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
910
968
 
911
969
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
970
+ Do not include LLM session URLs, or promotional lines such as
971
+ "Generated with [...]."
912
972
 
913
973
  '''
914
974
  # ---
@@ -943,12 +1003,16 @@
943
1003
  A contributor is always the author of their contributions.
944
1004
  You must read, review, and understand everything you submit, including
945
1005
  LLM-generated code or text, and be able to explain it on request.
1006
+ Contributions must be submitted by a person, not autonomously by a bot or
1007
+ LLM agent.
946
1008
 
947
1009
  If a commit contains code or text largely generated by an LLM, add an
948
1010
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
949
1011
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
950
1012
 
951
1013
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
1014
+ Do not include LLM session URLs, or promotional lines such as
1015
+ "Generated with [...]."
952
1016
 
953
1017
  '''
954
1018
  # ---
@@ -983,12 +1047,16 @@
983
1047
  A contributor is always the author of their contributions.
984
1048
  You must read, review, and understand everything you submit, including
985
1049
  LLM-generated code or text, and be able to explain it on request.
1050
+ Contributions must be submitted by a person, not autonomously by a bot or
1051
+ LLM agent.
986
1052
 
987
1053
  If a commit contains code or text largely generated by an LLM, add an
988
1054
  `Assisted-by: <tool>:<model>` trailer to its message. This can be done
989
1055
  automatically with `git commit --trailer="Assisted-by: <tool>:<model>"`.
990
1056
 
991
1057
  Do not use `Co-authored-by:` for LLM attribution. LLMs are tools, not authors.
1058
+ Do not include LLM session URLs, or promotional lines such as
1059
+ "Generated with [...]."
992
1060
 
993
1061
  '''
994
1062
  # ---
@@ -6,7 +6,7 @@
6
6
  [hooks]
7
7
  postinstall = [
8
8
  "uv sync",
9
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
9
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
10
10
  ]
11
11
 
12
12
  [tools]
@@ -123,7 +123,7 @@
123
123
  [hooks]
124
124
  postinstall = [
125
125
  "uv sync",
126
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
126
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
127
127
  ]
128
128
 
129
129
  [tools]
@@ -247,7 +247,7 @@
247
247
  [hooks]
248
248
  postinstall = [
249
249
  "uv sync",
250
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
250
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
251
251
  ]
252
252
 
253
253
  [tools]
@@ -350,7 +350,7 @@
350
350
  [hooks]
351
351
  postinstall = [
352
352
  "uv sync",
353
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
353
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
354
354
  ]
355
355
 
356
356
  [tools]
@@ -460,7 +460,7 @@
460
460
  [hooks]
461
461
  postinstall = [
462
462
  "uv sync",
463
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
463
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
464
464
  ]
465
465
 
466
466
  [tools]
@@ -582,7 +582,7 @@
582
582
  [hooks]
583
583
  postinstall = [
584
584
  "uv sync",
585
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
585
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
586
586
  ]
587
587
 
588
588
  [tools]
@@ -711,7 +711,7 @@
711
711
  [hooks]
712
712
  postinstall = [
713
713
  "uv sync",
714
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
714
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
715
715
  ]
716
716
 
717
717
  [tools]
@@ -819,7 +819,7 @@
819
819
  [hooks]
820
820
  postinstall = [
821
821
  "uv sync",
822
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
822
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
823
823
  ]
824
824
 
825
825
  [tools]
@@ -934,7 +934,7 @@
934
934
  [hooks]
935
935
  postinstall = [
936
936
  "uv sync",
937
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
937
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
938
938
  ]
939
939
 
940
940
  [tools]
@@ -1051,7 +1051,7 @@
1051
1051
  [hooks]
1052
1052
  postinstall = [
1053
1053
  "uv sync",
1054
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1054
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1055
1055
  ]
1056
1056
 
1057
1057
  [tools]
@@ -1175,7 +1175,7 @@
1175
1175
  [hooks]
1176
1176
  postinstall = [
1177
1177
  "uv sync",
1178
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1178
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1179
1179
  ]
1180
1180
 
1181
1181
  [tools]
@@ -1278,7 +1278,7 @@
1278
1278
  [hooks]
1279
1279
  postinstall = [
1280
1280
  "uv sync",
1281
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1281
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1282
1282
  ]
1283
1283
 
1284
1284
  [tools]
@@ -1388,7 +1388,7 @@
1388
1388
  [hooks]
1389
1389
  postinstall = [
1390
1390
  "uv sync",
1391
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1391
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1392
1392
  ]
1393
1393
 
1394
1394
  [tools]
@@ -1510,7 +1510,7 @@
1510
1510
  [hooks]
1511
1511
  postinstall = [
1512
1512
  "uv sync",
1513
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1513
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1514
1514
  ]
1515
1515
 
1516
1516
  [tools]
@@ -1639,7 +1639,7 @@
1639
1639
  [hooks]
1640
1640
  postinstall = [
1641
1641
  "uv sync",
1642
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1642
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1643
1643
  ]
1644
1644
 
1645
1645
  [tools]
@@ -1747,7 +1747,7 @@
1747
1747
  [hooks]
1748
1748
  postinstall = [
1749
1749
  "uv sync",
1750
- "[ -d .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1750
+ "[ -e .git ] && prek --quiet install || { echo \"No git repository found. If this is a new project, run \\`mise run init\\` to create it.\"; }",
1751
1751
  ]
1752
1752
 
1753
1753
  [tools]
@@ -4,13 +4,16 @@ from typing import TYPE_CHECKING
4
4
 
5
5
  import pytest
6
6
 
7
- from tests.utils import template
8
-
9
7
  if TYPE_CHECKING:
10
8
  from collections.abc import Callable
11
9
  from pathlib import Path
12
10
 
11
+ from syrupy.assertion import SnapshotAssertion
12
+
13
13
 
14
+ @pytest.mark.parametrize(
15
+ "llm_contribution_policy", ["accepted-with-disclosure", "not-accepted"]
16
+ )
14
17
  @pytest.mark.parametrize(
15
18
  ("project_visibility", "config_path"),
16
19
  [
@@ -20,10 +23,13 @@ if TYPE_CHECKING:
20
23
  )
21
24
  def test_commit_check_config(
22
25
  render_template: Callable[..., Path],
26
+ snapshot: SnapshotAssertion,
23
27
  project_visibility: str,
24
28
  config_path: str,
29
+ llm_contribution_policy: str,
25
30
  ) -> None:
26
- rendered = render_template(project_visibility=project_visibility)
27
- assert (rendered / config_path).read_text() == (
28
- template.dir / "includes" / "commit-check.toml"
29
- ).read_text()
31
+ rendered = render_template(
32
+ project_visibility=project_visibility,
33
+ llm_contribution_policy=llm_contribution_policy,
34
+ )
35
+ assert (rendered / config_path).read_text() == snapshot
@@ -18,6 +18,7 @@ import pytest
18
18
  import yaml
19
19
 
20
20
  from copier_python.__main__ import main, update
21
+ from tests.utils import template
21
22
 
22
23
  if TYPE_CHECKING:
23
24
  from collections.abc import Callable, Generator, Sequence
@@ -29,7 +30,7 @@ DEFAULT_BRANCH_NAME = "fhqwhgads"
29
30
  DEFAULT_END_REF = "v0.22.2"
30
31
 
31
32
 
32
- @pytest.fixture(params=["v0.16.0"])
33
+ @pytest.fixture(params=["v0.16.2"])
33
34
  def start_ref(request: pytest.FixtureRequest) -> str:
34
35
  return request.param
35
36
 
@@ -86,7 +87,7 @@ def create_project(
86
87
  postcreate: Callable[[Path], None] | None = None,
87
88
  **kwargs: Any,
88
89
  ) -> Path:
89
- project = render_template(vcs_ref=vcs_ref)
90
+ project = render_template(vcs_ref=vcs_ref, **kwargs)
90
91
  timestamp = _vcs_ref_timestamp(vcs_ref)
91
92
  for cmd in (
92
93
  ["git", "init", "-b", DEFAULT_BRANCH_NAME],
@@ -223,15 +224,19 @@ def test_main_help(monkeypatch: pytest.MonkeyPatch) -> None:
223
224
  main()
224
225
 
225
226
 
227
+ @pytest.mark.parametrize(
228
+ "project_visibility", template.choices.project_visibility
229
+ )
226
230
  def test_main_update_with_project_current(
227
231
  worktree: Path,
228
232
  expect_run: ExpectRun,
229
233
  create_project: Callable[..., Path],
234
+ project_visibility: str,
230
235
  end_ref: str,
231
236
  *,
232
237
  dry_run: bool,
233
238
  ) -> None:
234
- create_project(vcs_ref=end_ref)
239
+ create_project(vcs_ref=end_ref, project_visibility=project_visibility)
235
240
  expect_run.expect(
236
241
  ["git", "clone", "https://github.com/ness/pkfire", str(worktree)]
237
242
  )
@@ -364,16 +369,20 @@ def test_main_update_repo_arguments(
364
369
  update([arg], dry_run=True)
365
370
 
366
371
 
372
+ @pytest.mark.parametrize(
373
+ "project_visibility", template.choices.project_visibility
374
+ )
367
375
  def test_main_update_with_project(
368
376
  worktree: Path,
369
377
  expect_run: ExpectRun,
370
378
  create_project: Callable[..., Path],
379
+ project_visibility: str,
371
380
  end_ref: str,
372
381
  start_ref: str,
373
382
  *,
374
383
  dry_run: bool,
375
384
  ) -> None:
376
- create_project(vcs_ref=start_ref)
385
+ create_project(vcs_ref=start_ref, project_visibility=project_visibility)
377
386
  commit_message = os.linesep.join(
378
387
  (
379
388
  "Apply template updates",
File without changes
File without changes
File without changes