copier-python 0.1.4__tar.gz → 0.2.0__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 (50) hide show
  1. copier_python-0.2.0/CONTRIBUTING.md +15 -0
  2. copier_python-0.2.0/PKG-INFO +104 -0
  3. copier_python-0.2.0/README.md +78 -0
  4. {copier_python-0.1.4 → copier_python-0.2.0}/docs/contributing.md +1 -0
  5. copier_python-0.2.0/docs/development/requirements.md +24 -0
  6. copier_python-0.2.0/docs/development/updates.md +33 -0
  7. copier_python-0.2.0/docs/development/workflow.md +49 -0
  8. {copier_python-0.1.4 → copier_python-0.2.0}/docs/index.md +3 -0
  9. {copier_python-0.1.4 → copier_python-0.2.0}/docs/license.md +1 -0
  10. copier_python-0.2.0/docs/project-creation.md +72 -0
  11. copier_python-0.2.0/docs/project-development.md +39 -0
  12. copier_python-0.2.0/docs/project-release.md +25 -0
  13. copier_python-0.2.0/docs/project-setup.md +87 -0
  14. copier_python-0.2.0/docs/project-updates.md +33 -0
  15. copier_python-0.2.0/docs/releasing.md +31 -0
  16. copier_python-0.2.0/docs/requirements.md +24 -0
  17. copier_python-0.1.4/MAINTAINING.md → copier_python-0.2.0/docs/setup.md +12 -16
  18. {copier_python-0.1.4 → copier_python-0.2.0}/pyproject.toml +6 -4
  19. copier_python-0.2.0/tests/__snapshots__/test_contributing.ambr +116 -0
  20. copier_python-0.2.0/tests/__snapshots__/test_docs.ambr +624 -0
  21. {copier_python-0.1.4 → copier_python-0.2.0}/tests/__snapshots__/test_pyproject.ambr +42 -34
  22. {copier_python-0.1.4 → copier_python-0.2.0}/tests/__snapshots__/test_readme.ambr +7 -7
  23. copier_python-0.2.0/tests/__snapshots__/test_workflows.ambr +481 -0
  24. {copier_python-0.1.4 → copier_python-0.2.0}/tests/__snapshots__/test_zensical.ambr +46 -30
  25. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_contributing.py +1 -1
  26. copier_python-0.2.0/tests/test_docs.py +49 -0
  27. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_pyproject.py +1 -1
  28. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_structure.py +31 -11
  29. copier_python-0.2.0/tests/test_workflows.py +53 -0
  30. copier_python-0.1.4/CONTRIBUTING.md +0 -30
  31. copier_python-0.1.4/PKG-INFO +0 -56
  32. copier_python-0.1.4/README.md +0 -30
  33. copier_python-0.1.4/docs/maintaining.md +0 -5
  34. copier_python-0.1.4/tests/__snapshots__/test_contributing.ambr +0 -68
  35. copier_python-0.1.4/tests/__snapshots__/test_maintaining.ambr +0 -505
  36. copier_python-0.1.4/tests/test_maintaining.py +0 -38
  37. {copier_python-0.1.4 → copier_python-0.2.0}/.gitignore +0 -0
  38. {copier_python-0.1.4 → copier_python-0.2.0}/LICENSE +0 -0
  39. {copier_python-0.1.4 → copier_python-0.2.0}/copier_python/__init__.py +0 -0
  40. {copier_python-0.1.4 → copier_python-0.2.0}/copier_python/py.typed +0 -0
  41. {copier_python-0.1.4 → copier_python-0.2.0}/tests/__init__.py +0 -0
  42. {copier_python-0.1.4 → copier_python-0.2.0}/tests/__snapshots__/test_compose.ambr +0 -0
  43. {copier_python-0.1.4 → copier_python-0.2.0}/tests/__snapshots__/test_license.ambr +0 -0
  44. {copier_python-0.1.4 → copier_python-0.2.0}/tests/conftest.py +0 -0
  45. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_compose.py +0 -0
  46. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_license.py +0 -0
  47. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_readme.py +0 -0
  48. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_template.py +0 -0
  49. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_version.py +0 -0
  50. {copier_python-0.1.4 → copier_python-0.2.0}/tests/test_zensical.py +0 -0
@@ -0,0 +1,15 @@
1
+ # Contributing to copier-python
2
+
3
+ **Contributions are welcome!**
4
+
5
+ Thank you for your time and interest in improving
6
+ **copier-python**!
7
+
8
+ ## Contribution resources
9
+
10
+ * **Web site**: **<https://smkent.github.io/copier-python>**
11
+ for general project information, usage, and development documentation
12
+ * **Repository**: <https://github.com/smkent/copier-python>
13
+ for submitting pull requests
14
+ * **Issue tracker**: <https://github.com/smkent/copier-python/issues>
15
+ for questions or bug reports
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: copier-python
3
+ Version: 0.2.0
4
+ Summary: Copier template for Python projects with modern tooling
5
+ Project-URL: Homepage, https://smkent.github.io/copier-python
6
+ Project-URL: Repository, https://github.com/smkent/copier-python
7
+ Project-URL: Issues, https://github.com/smkent/copier-python/issues
8
+ Author-email: Stephen Kent <smkent@smkent.net>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Documentation
21
+ Classifier: Topic :: Software Development
22
+ Classifier: Topic :: Utilities
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+
27
+ # copier-python
28
+
29
+ [Copier][copier] template for Python projects with modern tooling
30
+
31
+ [![Copier][copier-badge]][copier]
32
+ [![License](https://img.shields.io/github/license/smkent/copier-python)](https://github.com/smkent/copier-python/blob/main/LICENSE)
33
+ [![PyPI](https://img.shields.io/pypi/v/copier-python)](https://pypi.org/project/copier-python/)
34
+ [![Python](https://img.shields.io/pypi/pyversions/copier-python)](https://pypi.org/project/copier-python/)
35
+ [![GitHub stars](https://img.shields.io/github/stars/smkent/copier-python?style=social)](https://github.com/smkent/copier-python)
36
+
37
+ ## Quick start
38
+
39
+ With [Astral's **uv**][uv] and [**Copier**][copier] (`uv tool install copier`)
40
+ installed:
41
+
42
+ ```sh
43
+ copier copy "gh:smkent/copier-python" /new/project/path
44
+ ```
45
+
46
+ **[For more details, see the documentation!][docs-usage]**
47
+
48
+ ## Features
49
+
50
+ * [Astral][astral] toolset: [**uv**][uv], [**ruff**][ruff], and [**ty**][ty]
51
+
52
+ [![uv][uv-badge]][uv]
53
+ [![ruff][ruff-badge]][ruff]
54
+ [![ty][ty-badge]][ty]
55
+
56
+ * [**prek**][prek] for [pre-commit][pre-commit] compatible git hooks
57
+
58
+ [![prek][prek-badge]][prek]
59
+
60
+ * Update automation with [**Renovate**][renovate] and
61
+ [**`copier update`**][copier-update]
62
+
63
+ [![Copier][copier-badge]][copier-update]
64
+ [![renovate][renovate-badge]][renovate]
65
+
66
+ * [**PyPI package**][pypi] and [**container image**][ghcr-docs] release
67
+ automation via [**GitHub Actions**][github-actions]
68
+ * [**pytest**][pytest] test framework with [**codecov.io**][codecovio] support
69
+ * [**Zensical**][zensical] project documentation with automatic deployment to
70
+ [**GitHub Pages**][github-pages]
71
+ * [**Poe the Poet**][poethepoet] for task shortcuts such as
72
+ `poe lint`, `poe test`
73
+
74
+ ## Credits
75
+
76
+ This template was inspired by [pawamoy/copier-uv][copier-uv] and
77
+ [ritwiktiwari/copier-astral][copier-astral] -- Thanks!
78
+
79
+ [astral]: https://astral.sh
80
+ [codecovio]: https://codecov.io
81
+ [copier-astral]: https://ritwiktiwari.github.io/copier-astral/
82
+ [copier-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json
83
+ [copier-update]: https://copier.readthedocs.io/en/stable/updating/
84
+ [copier-uv]: https://pawamoy.github.io/copier-uv/
85
+ [copier]: https://copier.readthedocs.io
86
+ [docs-usage]: https://smkent.github.io/copier-python/requirements/
87
+ [ghcr-docs]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
88
+ [github-actions]: https://github.com/features/actions
89
+ [github-pages]: https://pages.github.com
90
+ [poethepoet]: https://poethepoet.natn.io/
91
+ [pre-commit]: https://pre-commit.com/
92
+ [prek-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json
93
+ [prek]: https://prek.j178.dev/
94
+ [pypi]: https://pypi.org
95
+ [pytest]: https://docs.pytest.org
96
+ [renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot
97
+ [renovate]: https://docs.renovatebot.com/
98
+ [ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
99
+ [ruff]: https://docs.astral.sh/ruff/
100
+ [ty-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json
101
+ [ty]: https://docs.astral.sh/ty/
102
+ [uv-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json
103
+ [uv]: https://docs.astral.sh/uv/
104
+ [zensical]: https://zensical.org/
@@ -0,0 +1,78 @@
1
+ # copier-python
2
+
3
+ [Copier][copier] template for Python projects with modern tooling
4
+
5
+ [![Copier][copier-badge]][copier]
6
+ [![License](https://img.shields.io/github/license/smkent/copier-python)](https://github.com/smkent/copier-python/blob/main/LICENSE)
7
+ [![PyPI](https://img.shields.io/pypi/v/copier-python)](https://pypi.org/project/copier-python/)
8
+ [![Python](https://img.shields.io/pypi/pyversions/copier-python)](https://pypi.org/project/copier-python/)
9
+ [![GitHub stars](https://img.shields.io/github/stars/smkent/copier-python?style=social)](https://github.com/smkent/copier-python)
10
+
11
+ ## Quick start
12
+
13
+ With [Astral's **uv**][uv] and [**Copier**][copier] (`uv tool install copier`)
14
+ installed:
15
+
16
+ ```sh
17
+ copier copy "gh:smkent/copier-python" /new/project/path
18
+ ```
19
+
20
+ **[For more details, see the documentation!][docs-usage]**
21
+
22
+ ## Features
23
+
24
+ * [Astral][astral] toolset: [**uv**][uv], [**ruff**][ruff], and [**ty**][ty]
25
+
26
+ [![uv][uv-badge]][uv]
27
+ [![ruff][ruff-badge]][ruff]
28
+ [![ty][ty-badge]][ty]
29
+
30
+ * [**prek**][prek] for [pre-commit][pre-commit] compatible git hooks
31
+
32
+ [![prek][prek-badge]][prek]
33
+
34
+ * Update automation with [**Renovate**][renovate] and
35
+ [**`copier update`**][copier-update]
36
+
37
+ [![Copier][copier-badge]][copier-update]
38
+ [![renovate][renovate-badge]][renovate]
39
+
40
+ * [**PyPI package**][pypi] and [**container image**][ghcr-docs] release
41
+ automation via [**GitHub Actions**][github-actions]
42
+ * [**pytest**][pytest] test framework with [**codecov.io**][codecovio] support
43
+ * [**Zensical**][zensical] project documentation with automatic deployment to
44
+ [**GitHub Pages**][github-pages]
45
+ * [**Poe the Poet**][poethepoet] for task shortcuts such as
46
+ `poe lint`, `poe test`
47
+
48
+ ## Credits
49
+
50
+ This template was inspired by [pawamoy/copier-uv][copier-uv] and
51
+ [ritwiktiwari/copier-astral][copier-astral] -- Thanks!
52
+
53
+ [astral]: https://astral.sh
54
+ [codecovio]: https://codecov.io
55
+ [copier-astral]: https://ritwiktiwari.github.io/copier-astral/
56
+ [copier-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json
57
+ [copier-update]: https://copier.readthedocs.io/en/stable/updating/
58
+ [copier-uv]: https://pawamoy.github.io/copier-uv/
59
+ [copier]: https://copier.readthedocs.io
60
+ [docs-usage]: https://smkent.github.io/copier-python/requirements/
61
+ [ghcr-docs]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
62
+ [github-actions]: https://github.com/features/actions
63
+ [github-pages]: https://pages.github.com
64
+ [poethepoet]: https://poethepoet.natn.io/
65
+ [pre-commit]: https://pre-commit.com/
66
+ [prek-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json
67
+ [prek]: https://prek.j178.dev/
68
+ [pypi]: https://pypi.org
69
+ [pytest]: https://docs.pytest.org
70
+ [renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?logo=renovatebot
71
+ [renovate]: https://docs.renovatebot.com/
72
+ [ruff-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
73
+ [ruff]: https://docs.astral.sh/ruff/
74
+ [ty-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json
75
+ [ty]: https://docs.astral.sh/ty/
76
+ [uv-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json
77
+ [uv]: https://docs.astral.sh/uv/
78
+ [zensical]: https://zensical.org/
@@ -1,4 +1,5 @@
1
1
  ---
2
+ title: Contributing
2
3
  icon: lucide/code
3
4
  ---
4
5
 
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: Required software
3
+ icon: lucide/bookmark-check
4
+ ---
5
+
6
+ # Required software
7
+
8
+ - [x] A [supported version][python-versions] of [**Python**][python]
9
+ - [x] [**git** for verson control][git]
10
+ - [x] [Astral's **uv** Python project manager][uv]: `pip install uv` or
11
+ [other supported method][uv-installation]
12
+ - [x] [**Copier**][copier]: `uv tool install copier`
13
+ - [x] [Poe the Poet][poethepoet] (recommended): `uv tool install poethepoet`
14
+
15
+ This provides `poe` without the `uv run` prefix,
16
+ e.g. `poe test` instead of `uv run poe test`
17
+
18
+ [copier]: https://copier.readthedocs.io
19
+ [git]: https://git-scm.com
20
+ [poethepoet]: https://poethepoet.natn.io/
21
+ [python-versions]: https://devguide.python.org/versions/
22
+ [python]: https://python.org
23
+ [uv-installation]: https://docs.astral.sh/uv/getting-started/installation/
24
+ [uv]: https://docs.astral.sh/uv/
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: Template updates
3
+ icon: lucide/git-merge
4
+ ---
5
+
6
+ # Applying copier-python template updates
7
+
8
+ Copier can update your project with template changes that have occurred since
9
+ the project was created.
10
+
11
+ To apply updates, simply run in your project directory:
12
+
13
+ ```sh
14
+ copier update
15
+ ```
16
+
17
+ This will repeat the setup prompts, in case any prompts have been added or
18
+ changed.
19
+
20
+ !!! tip
21
+ To change template-provided features in your project, simply change your
22
+ answers in the update prompts.
23
+
24
+ To apply updates without being prompted (reusing all previous answers), run:
25
+
26
+ ```sh
27
+ copier update -l
28
+ ```
29
+
30
+ When `copier update` is finished, view changes with `git status` and `git diff`.
31
+ Resolve any conflicts, and then commit the result.
32
+
33
+ [copier-update]: https://copier.readthedocs.io/en/stable/updating/
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Development workflow
3
+ icon: lucide/braces
4
+ ---
5
+
6
+ # Project development workflow
7
+
8
+ ## Cloning the repository
9
+
10
+ Run `poe setup` in new repository clones to enable git hooks:
11
+
12
+ ```sh
13
+ git clone https://github.com/smkent/copier-python
14
+ cd copier-python
15
+ poe setup # Enables git hooks
16
+ ```
17
+
18
+ ## Development tools
19
+
20
+ * `poe lint`: Run formatters and static checks
21
+ * `poe test`: Run tests
22
+
23
+ The `lint` and `test` tasks can also be run as a single combined command with:
24
+
25
+ ```sh
26
+ poe lt
27
+ ```
28
+
29
+ ### Test snapshots
30
+
31
+ Many copier-python tests compare template-rendered files with saved snapshots.
32
+ When templates are modified, the snapshots need to be updated. Update test
33
+ snapshots by running:
34
+
35
+ ```sh
36
+ poe snapup
37
+ ```
38
+
39
+ ## Documentation server
40
+
41
+ Start the development server with:
42
+
43
+ ```sh
44
+ poe docs
45
+ ```
46
+
47
+ The documentation site will be served at **<http://localhost:8000>**.
48
+
49
+ To use a different bind host/port, run `poe --help docs` for arguments info.
@@ -1,5 +1,8 @@
1
1
  ---
2
+ title: Overview
2
3
  icon: lucide/book-open
4
+ hide:
5
+ - path
3
6
  ---
4
7
 
5
8
  --8<-- "README.md"
@@ -1,4 +1,5 @@
1
1
  ---
2
+ title: License
2
3
  icon: lucide/scale
3
4
  ---
4
5
 
@@ -0,0 +1,72 @@
1
+ ---
2
+ title: Creating a project
3
+ icon: lucide/wand-sparkles
4
+ ---
5
+
6
+ # Creating a new project
7
+
8
+ ## Choose a project name
9
+
10
+ Select a name for your project that meets the
11
+ [Python package naming criteria][pyproject-name]. This name will be used for
12
+ `pip install` if you choose to [publish your project on PyPI][pypi].
13
+
14
+ !!! tip
15
+ If you plan to publish your project on PyPI, ensure:
16
+
17
+ 1. You have an [active PyPI account][pypi-login]
18
+ 2. Your desired package name is available!
19
+
20
+ ## Create a GitHub repository
21
+
22
+ [Create a repository on GitHub for your new project][github-new].
23
+ Set **Repository name** to your chosen project name.
24
+
25
+ ## Generate new project from template
26
+
27
+ 1. In the directory where the new project should be created, run Copier:
28
+
29
+ ```sh
30
+ copier copy "gh:smkent/copier-python" ./project_name
31
+ ```
32
+
33
+ Copier will prompt for project information.
34
+ Answer the prompts to configure your project.
35
+ When complete, Copier will create your new project in `./project_name`.
36
+
37
+ 2. Change to the new project directory:
38
+
39
+ ```
40
+ cd ./project_name
41
+ ```
42
+
43
+ ## Initialize the project
44
+
45
+ To complete project initialization, run:
46
+
47
+ ```sh
48
+ poe init
49
+ ```
50
+
51
+ This will:
52
+
53
+ 1. Create the local git repository
54
+ 2. Install dependencies and git hooks (same as `poe setup`)
55
+ 3. Create an initial commit with the newly created project contents
56
+ 4. Add your GitHub repository as the `origin` remote
57
+ (when `project_visibility: public`)
58
+
59
+ ## Push repository to GitHub
60
+
61
+ Push your new project to your GitHub repository:
62
+
63
+ ```sh
64
+ git push -u origin main
65
+ ```
66
+
67
+ Your project's contents should now be visible on GitHub!
68
+
69
+ [github-new]: https://github.com/new
70
+ [pypi-login]: https://pypi.org/account/login/
71
+ [pypi]: https://pypi.org
72
+ [pyproject-name]: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#name
@@ -0,0 +1,39 @@
1
+ ---
2
+ title: Development workflow
3
+ icon: lucide/braces
4
+ ---
5
+
6
+ # Project development workflow
7
+
8
+ ## Cloning the repository
9
+
10
+ Run `poe setup` in new repository clones to enable git hooks:
11
+
12
+ ```sh
13
+ git clone https://github.com/<github_user>/<project_name>
14
+ cd project_name
15
+ poe setup # Enables git hooks
16
+ ```
17
+
18
+ ## Development tools
19
+
20
+ * `poe lint`: Run formatters and static checks
21
+ * `poe test`: Run tests
22
+
23
+ The `lint` and `test` tasks can also be run as a single combined command with:
24
+
25
+ ```sh
26
+ poe lt
27
+ ```
28
+
29
+ ## Documentation server
30
+
31
+ Start the development server with:
32
+
33
+ ```sh
34
+ poe docs
35
+ ```
36
+
37
+ The documentation site will be served at **<http://localhost:8000>**.
38
+
39
+ To use a different bind host/port, run `poe --help docs` for arguments info.
@@ -0,0 +1,25 @@
1
+ ---
2
+ title: Releasing a project
3
+ icon: lucide/rocket
4
+ ---
5
+
6
+ # Releasing a project
7
+
8
+ Release version numbers should follow [Semantic Versioning][semver].
9
+
10
+ To create a new release, simply create and push a tag with the new release
11
+ version number:
12
+
13
+ ```sh
14
+ git tag vX.Y.Z # for example, v1.2.3
15
+ git push --tags
16
+ ```
17
+
18
+ * A corresponding GitHub release will be created automatically.
19
+ * If PyPI publishing is enabled, a release package will be built and uploaded to
20
+ PyPI.
21
+ * If container image build and publishing is enabled, a container image will be
22
+ built and published to the [GitHub Container Registry (GHCR)][ghcr-docs].
23
+
24
+ [ghcr-docs]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
25
+ [semver]: https://semver.org/
@@ -0,0 +1,87 @@
1
+ ---
2
+ title: Completing setup
3
+ icon: lucide/settings
4
+ ---
5
+
6
+ # Completing project setup
7
+
8
+ !!! tip
9
+ If you selected **Enable documentation site** during project creation,
10
+ these instructions are also present in your new project along with links
11
+ directly to your project's specific settings pages! To view:
12
+
13
+ 1. Start the local documentation server: `poe docs`
14
+ 2. In your browser:
15
+
16
+ 1. Open **<http://localhost:8000>**
17
+ 2. Navigate to **Project Operations** → **One time setup**
18
+
19
+
20
+ ## GitHub repository
21
+
22
+ [Repository Settings → General][github-settings-docs]:
23
+
24
+ - [x] Allow merge commits
25
+ - [ ] Allow squash merging
26
+ - [ ] Allow rebase merging
27
+ - [x] Automatically delete head branches
28
+
29
+ Repository Settings → Branches → Add branch protection rule for the default branch
30
+ (`main`):
31
+
32
+ - [x] Restrict deletions
33
+ - [x] Require a pull request before merging
34
+ - [x] Block force pushes
35
+
36
+ ## Renovate
37
+
38
+ Ensure the [Renovate app][renovate] is installed on your account, then enable
39
+ it for your repository.
40
+
41
+ ## PyPI publishing
42
+
43
+ !!! info "Only needed if your project will publish packages to PyPI"
44
+
45
+ This template uses [trusted publishing][pypi-trusted-publishing] so no API
46
+ tokens need to be stored as secrets.
47
+
48
+ 1. On PyPI, add a (pending) trusted publisher in your
49
+ [Trusted Publisher Management][pypi-publishing-settings] settings:
50
+ - Publisher: GitHub Actions
51
+ - Owner: `<your-github-user>`
52
+ - Repository: `<your-project-name>`
53
+ - Workflow: `release.yaml`
54
+ - Environment: `pypi`
55
+ 2. Create the `pypi` environment in the GitHub repository:
56
+ Repository Settings → Environments → New environment → `pypi`
57
+ 3. Publish a release by pushing a tag:
58
+ ```sh
59
+ git tag v0.1.0 # or your desired first version number
60
+ git push --tags
61
+ ```
62
+
63
+ ## Container registry (ghcr.io)
64
+
65
+ !!! info "Only needed if your project will build and publish container images"
66
+
67
+ Enable write access for Actions:
68
+
69
+ Repository Settings → Actions → General → Workflow permissions
70
+ → Read and write permissions
71
+
72
+ ## GitHub Pages
73
+
74
+ !!! info "Only needed if your project will publish the documentation site"
75
+
76
+ Repository Settings → Pages → Source → GitHub Actions
77
+
78
+ [copier]: https://copier.readthedocs.io
79
+ [github-new]: https://github.com/new
80
+ [github-settings-docs]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features
81
+ [pypi-publishing-settings]: https://pypi.org/manage/account/publishing/
82
+ [pypi-trusted-publishing]: https://docs.pypi.org/trusted-publishers/
83
+ [pypi]: https://pypi.org
84
+ [pypi-login]: https://pypi.org/account/login/
85
+ [pyproject-name]: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#name
86
+ [renovate]: https://github.com/apps/renovate
87
+ [uv]: https://docs.astral.sh/uv/
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: Template updates
3
+ icon: lucide/git-merge
4
+ ---
5
+
6
+ # Applying copier-python template updates
7
+
8
+ Copier can update your project with template changes that have occurred since
9
+ the project was created.
10
+
11
+ To apply updates, simply run in your project directory:
12
+
13
+ ```sh
14
+ copier update
15
+ ```
16
+
17
+ This will repeat the setup prompts, in case any prompts have been added or
18
+ changed.
19
+
20
+ !!! tip
21
+ To change template-provided features in your project, simply change your
22
+ answers in the update prompts.
23
+
24
+ To apply updates without being prompted (reusing all previous answers), run:
25
+
26
+ ```sh
27
+ copier update -l
28
+ ```
29
+
30
+ When `copier update` is finished, view changes with `git status` and `git diff`.
31
+ Resolve any conflicts, and then commit the result.
32
+
33
+ [copier-update]: https://copier.readthedocs.io/en/stable/updating/
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: Releasing a new version
3
+ icon: lucide/rocket
4
+ ---
5
+
6
+ # Releasing a new version
7
+
8
+ Release version numbers should follow [Semantic Versioning][semver].
9
+
10
+ To create a new release, simply create and push a tag with the new release
11
+ version number:
12
+
13
+ ```sh
14
+ git tag vX.Y.Z # for example, v1.2.3
15
+ git push --tags
16
+ ```
17
+
18
+ * A corresponding [GitHub release][github-releases]
19
+ will be created automatically.
20
+
21
+ [![GitHub Release][github-release-badge]][github-release-latest]
22
+
23
+ * A release package will be built and [uploaded to PyPI][pypi-project].
24
+
25
+ [![PyPI][pypi-badge]][pypi-project]
26
+
27
+ [github-release-latest]: https://github.com/smkent/copier-python/releases/latest
28
+ [github-releases]: https://github.com/smkent/copier-python/releases
29
+ [github-release-badge]: https://img.shields.io/github/v/release/smkent/copier-python
30
+ [pypi-badge]: https://img.shields.io/pypi/v/copier-python
31
+ [pypi-project]: https://pypi.org/project/copier-python/
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: Required software
3
+ icon: lucide/bookmark-check
4
+ ---
5
+
6
+ # Required software
7
+
8
+ - [x] A [supported version][python-versions] of [**Python**][python]
9
+ - [x] [**git** for verson control][git]
10
+ - [x] [Astral's **uv** Python project manager][uv]: `pip install uv` or
11
+ [other supported method][uv-installation]
12
+ - [x] [**Copier**][copier]: `uv tool install copier`
13
+ - [x] [Poe the Poet][poethepoet] (recommended): `uv tool install poethepoet`
14
+
15
+ This provides `poe` without the `uv run` prefix,
16
+ e.g. `poe test` instead of `uv run poe test`
17
+
18
+ [copier]: https://copier.readthedocs.io
19
+ [git]: https://git-scm.com
20
+ [poethepoet]: https://poethepoet.natn.io/
21
+ [python-versions]: https://devguide.python.org/versions/
22
+ [python]: https://python.org
23
+ [uv-installation]: https://docs.astral.sh/uv/getting-started/installation/
24
+ [uv]: https://docs.astral.sh/uv/