https://github.com/betaboon/copier-python
A Copier template for Python projects managed by PDM.
https://github.com/betaboon/copier-python
copier copier-template pdm pre-commit pypi python ruff sphinx
Last synced: 3 months ago
JSON representation
A Copier template for Python projects managed by PDM.
- Host: GitHub
- URL: https://github.com/betaboon/copier-python
- Owner: betaboon
- Created: 2024-01-25T13:08:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-07T13:06:49.000Z (about 1 year ago)
- Last Synced: 2025-02-03T12:50:38.835Z (5 months ago)
- Topics: copier, copier-template, pdm, pre-commit, pypi, python, ruff, sphinx
- Language: Jinja
- Homepage:
- Size: 55.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Copier Python Template
A [Copier](https://github.com/copier-org/copier) template for Python projects managed by [PDM](https://github.com/pdm-project/pdm).
## Features
| | |
|-|-|
| Package management | [](https://pdm-project.org) |
| Linting and Formatting | [](https://astral.sh/ruff) [](https://jorisroovers.com/gitlint/latest/)|
| Testing | [](https://pytest.org) |
| Git hooks | [](https://pre-commit.com/) |
| Documenting | [](https://www.sphinx-doc.org) |
| Documentation hosting | [](https://pages.github.com) |
| CI/CD | [](https://github.com/features/actions) |
| Releasing | [](https://pypi.org) [](https://github.com/python-semantic-release/python-semantic-release)|
| Container image | [](https://docker.com)|## Installation
To install Copier use [`pipx`](https://pipx.pypa.io):
```
pip install --user pipx
pipx install copier
```As this template uses custom extensions you have to install [`copier-templates-extensions`](https://github.com/copier-org/copier-templates-extensions):
```
pipx inject copier copier-templates-extensions
```## Usage
To create a project from this template:
```
copier copy --trust "gh:betaboon/copier-python" /path/to/project
```## PDM scripts
This template provides some [pdm scripts](https://pdm-project.org/latest/usage/scripts/)
Get a full list with `pdm run --list`:
| Name | Description |
|-------------------|--------------------------|
| test | Run tests |
| lint | Run pre-commit |
| docs-build | Build docs |
| docs-serve | Build and serve docs |
| install-git-hooks | Install pre-commit hooks |## GitHub configuration
It is suggested to [create a branch-protection rule for `main`](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches).
For GitHub pages publishing, you need to [enable publishing with custom action](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow).
## PyPI configuration
For PyPI publishing, you need to [create a pypi project with a trusted publisher](https://docs.pypi.org/trusted-publishers/).