pypkgkit 0.1.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.
pypkgkit-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pypkgkit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A template for python packages
|
|
5
|
+
Author: Michael Ellis
|
|
6
|
+
Author-email: Michael Ellis <michaelellis003@gmail.com>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# pypkgkit
|
|
21
|
+
|
|
22
|
+
A minimal, opinionated template for Python packages.
|
|
23
|
+
|
|
24
|
+
The goal is straightforward: provide a single starting point that
|
|
25
|
+
assembles modern Python tooling into a coherent whole, so that new
|
|
26
|
+
projects begin with CI, documentation, and release automation already
|
|
27
|
+
in place — rather than reinventing this infrastructure each time.
|
|
28
|
+
|
|
29
|
+
## What is included
|
|
30
|
+
|
|
31
|
+
| Concern | Tool |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Package management | [uv](https://docs.astral.sh/uv/) |
|
|
34
|
+
| Linting & formatting | [Ruff](https://docs.astral.sh/ruff/) |
|
|
35
|
+
| Type checking | [ty](https://github.com/astral-sh/ty) |
|
|
36
|
+
| Testing | [pytest](https://docs.pytest.org/) |
|
|
37
|
+
| Documentation | [ProperDocs](https://properdocs.dev/) ([MkDocs Material](https://squidfunk.github.io/mkdocs-material/) + [mkdocstrings](https://mkdocstrings.github.io/)) |
|
|
38
|
+
| Versioning & releases | [python-semantic-release](https://python-semantic-release.readthedocs.io/) with [Conventional Commits](https://www.conventionalcommits.org/) |
|
|
39
|
+
| CI/CD | GitHub Actions (lint, type check, test across 3.10 – 3.13, build, release to PyPI, deploy docs) |
|
|
40
|
+
| Dependency updates | [Dependabot](https://docs.github.com/en/code-security/dependabot) (weekly, for both Actions and pip) |
|
|
41
|
+
| Pre-commit hooks | Ruff, ty, license headers, conventional commit validation |
|
|
42
|
+
|
|
43
|
+
## Requirements
|
|
44
|
+
|
|
45
|
+
- Python 3.10 or later
|
|
46
|
+
- [uv](https://docs.astral.sh/uv/) installed
|
|
47
|
+
|
|
48
|
+
## Getting started
|
|
49
|
+
|
|
50
|
+
Clone the repository and install dependencies:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git clone https://github.com/michaelellis003/pypkgkit.git
|
|
54
|
+
cd pypkgkit
|
|
55
|
+
uv sync
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Install the pre-commit hooks:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
uv run pre-commit install
|
|
62
|
+
uv run pre-commit install --hook-type commit-msg
|
|
63
|
+
uv run pre-commit install --hook-type pre-push
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Development
|
|
67
|
+
|
|
68
|
+
A `Makefile` is provided for common tasks:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
make test # lint + pytest
|
|
72
|
+
make lint # ruff check, format check, license headers, ty
|
|
73
|
+
make format # add license headers, ruff format, ruff fix
|
|
74
|
+
make license # add missing license headers
|
|
75
|
+
make docs # build documentation
|
|
76
|
+
make serve-docs # serve documentation locally
|
|
77
|
+
make install # uv sync
|
|
78
|
+
make clean # git clean (preserves .venv)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or invoke tools directly:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
uv run pytest -v
|
|
85
|
+
uv run ruff check .
|
|
86
|
+
uv run ruff format .
|
|
87
|
+
uv run ty check
|
|
88
|
+
uv run properdocs serve
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## How releases work
|
|
92
|
+
|
|
93
|
+
Releases are fully automated. When a commit lands on `main` and CI
|
|
94
|
+
passes, `python-semantic-release` inspects the commit history to
|
|
95
|
+
determine whether a version bump is warranted:
|
|
96
|
+
|
|
97
|
+
- `fix: ...` produces a patch release (0.1.0 → 0.1.1)
|
|
98
|
+
- `feat: ...` produces a minor release (0.1.0 → 0.2.0)
|
|
99
|
+
- A `BREAKING CHANGE` footer or `!` suffix produces a major release (0.1.0 → 1.0.0)
|
|
100
|
+
|
|
101
|
+
If a bump is triggered, the pipeline updates the version in
|
|
102
|
+
`pyproject.toml` and `src/pypkgkit/__init__.py`, creates a Git tag and
|
|
103
|
+
GitHub release, generates the changelog, builds the package, and
|
|
104
|
+
publishes it to PyPI via trusted publishing. Documentation is deployed
|
|
105
|
+
to GitHub Pages immediately after.
|
|
106
|
+
|
|
107
|
+
Commit messages that do not follow the
|
|
108
|
+
[Conventional Commits](https://www.conventionalcommits.org/) spec are
|
|
109
|
+
rejected by a pre-commit hook, so the release process stays
|
|
110
|
+
well-defined.
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
Apache 2.0. See [LICENSE](LICENSE) for the full text.
|
pypkgkit-0.1.0/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# pypkgkit
|
|
2
|
+
|
|
3
|
+
A minimal, opinionated template for Python packages.
|
|
4
|
+
|
|
5
|
+
The goal is straightforward: provide a single starting point that
|
|
6
|
+
assembles modern Python tooling into a coherent whole, so that new
|
|
7
|
+
projects begin with CI, documentation, and release automation already
|
|
8
|
+
in place — rather than reinventing this infrastructure each time.
|
|
9
|
+
|
|
10
|
+
## What is included
|
|
11
|
+
|
|
12
|
+
| Concern | Tool |
|
|
13
|
+
|---|---|
|
|
14
|
+
| Package management | [uv](https://docs.astral.sh/uv/) |
|
|
15
|
+
| Linting & formatting | [Ruff](https://docs.astral.sh/ruff/) |
|
|
16
|
+
| Type checking | [ty](https://github.com/astral-sh/ty) |
|
|
17
|
+
| Testing | [pytest](https://docs.pytest.org/) |
|
|
18
|
+
| Documentation | [ProperDocs](https://properdocs.dev/) ([MkDocs Material](https://squidfunk.github.io/mkdocs-material/) + [mkdocstrings](https://mkdocstrings.github.io/)) |
|
|
19
|
+
| Versioning & releases | [python-semantic-release](https://python-semantic-release.readthedocs.io/) with [Conventional Commits](https://www.conventionalcommits.org/) |
|
|
20
|
+
| CI/CD | GitHub Actions (lint, type check, test across 3.10 – 3.13, build, release to PyPI, deploy docs) |
|
|
21
|
+
| Dependency updates | [Dependabot](https://docs.github.com/en/code-security/dependabot) (weekly, for both Actions and pip) |
|
|
22
|
+
| Pre-commit hooks | Ruff, ty, license headers, conventional commit validation |
|
|
23
|
+
|
|
24
|
+
## Requirements
|
|
25
|
+
|
|
26
|
+
- Python 3.10 or later
|
|
27
|
+
- [uv](https://docs.astral.sh/uv/) installed
|
|
28
|
+
|
|
29
|
+
## Getting started
|
|
30
|
+
|
|
31
|
+
Clone the repository and install dependencies:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git clone https://github.com/michaelellis003/pypkgkit.git
|
|
35
|
+
cd pypkgkit
|
|
36
|
+
uv sync
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Install the pre-commit hooks:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
uv run pre-commit install
|
|
43
|
+
uv run pre-commit install --hook-type commit-msg
|
|
44
|
+
uv run pre-commit install --hook-type pre-push
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
A `Makefile` is provided for common tasks:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
make test # lint + pytest
|
|
53
|
+
make lint # ruff check, format check, license headers, ty
|
|
54
|
+
make format # add license headers, ruff format, ruff fix
|
|
55
|
+
make license # add missing license headers
|
|
56
|
+
make docs # build documentation
|
|
57
|
+
make serve-docs # serve documentation locally
|
|
58
|
+
make install # uv sync
|
|
59
|
+
make clean # git clean (preserves .venv)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or invoke tools directly:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
uv run pytest -v
|
|
66
|
+
uv run ruff check .
|
|
67
|
+
uv run ruff format .
|
|
68
|
+
uv run ty check
|
|
69
|
+
uv run properdocs serve
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## How releases work
|
|
73
|
+
|
|
74
|
+
Releases are fully automated. When a commit lands on `main` and CI
|
|
75
|
+
passes, `python-semantic-release` inspects the commit history to
|
|
76
|
+
determine whether a version bump is warranted:
|
|
77
|
+
|
|
78
|
+
- `fix: ...` produces a patch release (0.1.0 → 0.1.1)
|
|
79
|
+
- `feat: ...` produces a minor release (0.1.0 → 0.2.0)
|
|
80
|
+
- A `BREAKING CHANGE` footer or `!` suffix produces a major release (0.1.0 → 1.0.0)
|
|
81
|
+
|
|
82
|
+
If a bump is triggered, the pipeline updates the version in
|
|
83
|
+
`pyproject.toml` and `src/pypkgkit/__init__.py`, creates a Git tag and
|
|
84
|
+
GitHub release, generates the changelog, builds the package, and
|
|
85
|
+
publishes it to PyPI via trusted publishing. Documentation is deployed
|
|
86
|
+
to GitHub Pages immediately after.
|
|
87
|
+
|
|
88
|
+
Commit messages that do not follow the
|
|
89
|
+
[Conventional Commits](https://www.conventionalcommits.org/) spec are
|
|
90
|
+
rejected by a pre-commit hook, so the release process stays
|
|
91
|
+
well-defined.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
Apache 2.0. See [LICENSE](LICENSE) for the full text.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "pypkgkit"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A template for python packages"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "Michael Ellis", email = "michaelellis003@gmail.com" }
|
|
8
|
+
]
|
|
9
|
+
license = "Apache-2.0"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 3 - Alpha",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
14
|
+
"License :: OSI Approved :: Apache Software License",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.10",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Typing :: Typed",
|
|
21
|
+
]
|
|
22
|
+
dependencies = []
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
pypkgkit = "pypkgkit:main"
|
|
26
|
+
|
|
27
|
+
[build-system]
|
|
28
|
+
requires = ["uv_build>=0.9.5,<0.12.0"]
|
|
29
|
+
build-backend = "uv_build"
|
|
30
|
+
|
|
31
|
+
[dependency-groups]
|
|
32
|
+
dev = [
|
|
33
|
+
"mkdocs-gen-files>=0.6.1",
|
|
34
|
+
"mkdocs-literate-nav>=0.6.3",
|
|
35
|
+
"mkdocs-material>=9.7.6",
|
|
36
|
+
"mkdocstrings[python]>=1.0.3",
|
|
37
|
+
"pre-commit>=4.5.1",
|
|
38
|
+
"properdocs>=1.6.7",
|
|
39
|
+
"pytest>=9.0.3",
|
|
40
|
+
"pytest-cov>=7.1.0",
|
|
41
|
+
"ruff>=0.15.9",
|
|
42
|
+
"ty>=0.0.29",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[tool.ruff]
|
|
46
|
+
# Target version enables modern syntax upgrades where possible
|
|
47
|
+
target-version = "py310"
|
|
48
|
+
preview = true
|
|
49
|
+
line-length = 80
|
|
50
|
+
indent-width = 4
|
|
51
|
+
|
|
52
|
+
[tool.ruff.lint]
|
|
53
|
+
select = [
|
|
54
|
+
"E", "W", "F", "I", "D", # Core errors, warnings, isort, and docstrings
|
|
55
|
+
"UP", # pyupgrade (modernizes syntax)
|
|
56
|
+
"B", # flake8-bugbear (catches design flaws/bugs)
|
|
57
|
+
"SIM", # flake8-simplify (cleans up messy logic)
|
|
58
|
+
"RUF", # Ruff's custom advanced rules
|
|
59
|
+
]
|
|
60
|
+
ignore = []
|
|
61
|
+
|
|
62
|
+
[tool.ruff.lint.pydocstyle]
|
|
63
|
+
# Enforce Google-style docstrings
|
|
64
|
+
convention = "google"
|
|
65
|
+
|
|
66
|
+
[tool.semantic_release]
|
|
67
|
+
allow_zero_version = true
|
|
68
|
+
version_toml = ["pyproject.toml:project.version"]
|
|
69
|
+
version_variables = ["src/pypkgkit/__init__.py:__version__"]
|
|
70
|
+
commit_message = "chore(release): {version}"
|
|
71
|
+
|
|
72
|
+
[tool.semantic_release.changelog.default_templates]
|
|
73
|
+
changelog_file = "CHANGELOG.md"
|
|
74
|
+
|
|
75
|
+
[tool.semantic_release.remote]
|
|
76
|
+
type = "github"
|
|
77
|
+
|
|
78
|
+
[tool.semantic_release.publish]
|
|
79
|
+
upload_to_vcs_release = true
|
|
80
|
+
|
|
81
|
+
[tool.pytest.ini_options]
|
|
82
|
+
minversion = "7.0"
|
|
83
|
+
addopts = "-ra -q"
|
|
84
|
+
testpaths = [
|
|
85
|
+
"tests",
|
|
86
|
+
]
|
|
File without changes
|