test-python-package-release 0.3.1__tar.gz → 0.4.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 (31) hide show
  1. test_python_package_release-0.4.0/.github/.release-please-manifest.json +3 -0
  2. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/CHANGELOG.md +23 -0
  3. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/PKG-INFO +38 -7
  4. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/README.md +37 -6
  5. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/pyproject.toml +1 -1
  6. test_python_package_release-0.4.0/src/test_python_package_release/__init__.py +37 -0
  7. test_python_package_release-0.4.0/src/test_python_package_release/calculator.py +38 -0
  8. test_python_package_release-0.4.0/src/test_python_package_release/strings.py +26 -0
  9. test_python_package_release-0.4.0/tests/test_calculator.py +80 -0
  10. test_python_package_release-0.4.0/tests/test_strings.py +59 -0
  11. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/uv.lock +1 -1
  12. test_python_package_release-0.3.1/.github/.release-please-manifest.json +0 -3
  13. test_python_package_release-0.3.1/src/test_python_package_release/__init__.py +0 -16
  14. test_python_package_release-0.3.1/src/test_python_package_release/calculator.py +0 -20
  15. test_python_package_release-0.3.1/src/test_python_package_release/strings.py +0 -7
  16. test_python_package_release-0.3.1/tests/test_calculator.py +0 -36
  17. test_python_package_release-0.3.1/tests/test_strings.py +0 -17
  18. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.github/dependabot.yml +0 -0
  19. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.github/release-please-config.json +0 -0
  20. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.github/workflows/ci.yml +0 -0
  21. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.github/workflows/claude-review.yml +0 -0
  22. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.github/workflows/publish.yml +0 -0
  23. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.github/workflows/release-please.yml +0 -0
  24. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.gitignore +0 -0
  25. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.pre-commit-config.yaml +0 -0
  26. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/.python-version +0 -0
  27. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/LICENSE +0 -0
  28. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/commitlint.config.cjs +0 -0
  29. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/docs/superpowers/plans/2026-05-30-python-package-release-template.md +0 -0
  30. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/docs/superpowers/specs/2026-05-30-python-package-release-template-design.md +0 -0
  31. {test_python_package_release-0.3.1 → test_python_package_release-0.4.0}/tests/__init__.py +0 -0
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.0](https://github.com/wozniakos10/test_python_package_release/compare/test-python-package-release-v0.3.2...test-python-package-release-v0.4.0) (2026-05-31)
4
+
5
+
6
+ ### Features
7
+
8
+ * **calculator:** add modulo, sqrt, and is_divisible functions ([5c5d4b1](https://github.com/wozniakos10/test_python_package_release/commit/5c5d4b14d72f9d2cfebe515a52d1f02e22f2dfcf))
9
+ * **calculator:** add modulo, sqrt, and is_divisible functions ([6f0e60a](https://github.com/wozniakos10/test_python_package_release/commit/6f0e60a8e6c95eaf755a2e225ecab4e9b6d4f5e6))
10
+ * **strings:** add count_words, camel_to_snake, and truncate functions ([ce969a5](https://github.com/wozniakos10/test_python_package_release/commit/ce969a5bdc25d59ba805ed79bccb000e84d64bcf))
11
+ * **strings:** add count_words, camel_to_snake, and truncate functions ([9600b2c](https://github.com/wozniakos10/test_python_package_release/commit/9600b2c6171d93ce77e4b5929f05422b924dd7ba))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **init:** resolve duplicate imports after calculator-extras merge ([5313c13](https://github.com/wozniakos10/test_python_package_release/commit/5313c130f0918733aae5a8e34fc55ab86fe1c54d))
17
+
18
+ ## [0.3.2](https://github.com/wozniakos10/test_python_package_release/compare/test-python-package-release-v0.3.1...test-python-package-release-v0.3.2) (2026-05-30)
19
+
20
+
21
+ ### Documentation
22
+
23
+ * add development tooling table to README ([41a3e31](https://github.com/wozniakos10/test_python_package_release/commit/41a3e31ba0dfcec3da01b1bb1d5d9c5ad06c4f74))
24
+ * add development tooling table to README ([d112e33](https://github.com/wozniakos10/test_python_package_release/commit/d112e333ef4b51e03c5b5cfdcf8725c21a2e1345))
25
+
3
26
  ## [0.3.1](https://github.com/wozniakos10/test_python_package_release/compare/test-python-package-release-v0.3.0...test-python-package-release-v0.3.1) (2026-05-30)
4
27
 
5
28
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: test-python-package-release
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: Template library demonstrating Python package release CI/CD
5
5
  Author-email: Dawid Wozniak <wozniakos10@gmail.com>
6
6
  License: MIT License
@@ -57,22 +57,53 @@ uv run pytest
57
57
  └── CHANGELOG.md # managed by release-please
58
58
  ```
59
59
 
60
- ## Development
60
+ ## Development tooling
61
+
62
+ The template ships with an opinionated, modern Python toolchain — all
63
+ configured in `pyproject.toml` (no scattered config files).
64
+
65
+ | Tool | Purpose | Where it runs |
66
+ |---|---|---|
67
+ | [**uv**](https://docs.astral.sh/uv/) | Package manager, virtualenv handler, Python installer, build tool. Replaces `pip` + `venv` + `pip-tools` + `pyenv`. | Local + CI |
68
+ | [**ruff**](https://docs.astral.sh/ruff/) | Linter + formatter (replaces flake8, isort, black, pyupgrade). | pre-commit + CI lint job |
69
+ | [**ty**](https://github.com/astral-sh/ty) | Static type checker by Astral (faster mypy alternative). | CI lint job + `tox -e type` |
70
+ | [**pytest**](https://docs.pytest.org/) | Test runner. | Local + CI test matrix |
71
+ | [**pytest-cov**](https://pytest-cov.readthedocs.io/) | Coverage reporting via `coverage.py`. | On-demand (`pytest --cov`) |
72
+ | [**tox**](https://tox.wiki/) + [**tox-uv**](https://github.com/tox-dev/tox-uv) | Isolated test environments per Python version (3.11, 3.12, 3.13) backed by uv for speed. | Local + CI test matrix |
73
+ | [**pre-commit**](https://pre-commit.com/) | Git hook framework — runs ruff and conventional-commit checks before every commit. | Local |
74
+ | [**conventional-pre-commit**](https://github.com/compilerla/conventional-pre-commit) | Pure-Python validator for [Conventional Commits](https://www.conventionalcommits.org/) commit messages. | pre-commit (commit-msg stage) |
75
+ | [**commitlint**](https://commitlint.js.org/) | Node-based validator that re-checks every commit on a PR. | CI `commitlint` job |
76
+ | [**hatchling**](https://hatch.pypa.io/) | PEP 517 build backend used by `uv build` to produce wheel/sdist. | Build / publish |
77
+ | [**release-please**](https://github.com/googleapis/release-please) | Parses Conventional Commits → bumps version → updates CHANGELOG → tags releases. | CI on push to `main` |
78
+ | [**claude-code-action**](https://github.com/anthropics/claude-code-action) | Claude reviews PRs on demand when you comment `@claude`. | CI on PR comment |
79
+ | [**Dependabot**](https://docs.github.com/en/code-security/dependabot) | Weekly grouped PRs updating GitHub Actions and uv dev-dependencies. | GitHub native |
80
+
81
+ ## Development commands
61
82
 
62
83
  ```bash
63
- # Install hooks (runs ruff + ty pre-commit, conventional commit-msg)
84
+ # Install all dev deps + create .venv
85
+ uv sync --group dev
86
+
87
+ # Install hooks (runs ruff and conventional commit-msg validation)
64
88
  uv run pre-commit install --hook-type pre-commit --hook-type commit-msg
65
89
 
66
- # Run the full test matrix (3.11, 3.12, 3.13)
90
+ # Full test matrix (3.11, 3.12, 3.13) — tox spawns isolated uv envs per version
67
91
  uv run tox
68
92
 
69
- # Single env
70
- uv run tox -e py313 -- -k calculator
93
+ # Single env (fastest iteration)
94
+ uv run tox -e py313 -- -k calculator # only tests matching "calculator"
71
95
 
72
- # Lint / format check / type check
96
+ # Lint / format / type check (one-off, without tox)
73
97
  uv run ruff check .
74
98
  uv run ruff format --check .
75
99
  uv run ty check src
100
+
101
+ # Build the distribution locally
102
+ uv build
103
+
104
+ # Add a new dependency (auto-updates uv.lock — commit both files)
105
+ uv add httpx
106
+ uv add --group dev pytest-mock
76
107
  ```
77
108
 
78
109
  ## Commits
@@ -23,22 +23,53 @@ uv run pytest
23
23
  └── CHANGELOG.md # managed by release-please
24
24
  ```
25
25
 
26
- ## Development
26
+ ## Development tooling
27
+
28
+ The template ships with an opinionated, modern Python toolchain — all
29
+ configured in `pyproject.toml` (no scattered config files).
30
+
31
+ | Tool | Purpose | Where it runs |
32
+ |---|---|---|
33
+ | [**uv**](https://docs.astral.sh/uv/) | Package manager, virtualenv handler, Python installer, build tool. Replaces `pip` + `venv` + `pip-tools` + `pyenv`. | Local + CI |
34
+ | [**ruff**](https://docs.astral.sh/ruff/) | Linter + formatter (replaces flake8, isort, black, pyupgrade). | pre-commit + CI lint job |
35
+ | [**ty**](https://github.com/astral-sh/ty) | Static type checker by Astral (faster mypy alternative). | CI lint job + `tox -e type` |
36
+ | [**pytest**](https://docs.pytest.org/) | Test runner. | Local + CI test matrix |
37
+ | [**pytest-cov**](https://pytest-cov.readthedocs.io/) | Coverage reporting via `coverage.py`. | On-demand (`pytest --cov`) |
38
+ | [**tox**](https://tox.wiki/) + [**tox-uv**](https://github.com/tox-dev/tox-uv) | Isolated test environments per Python version (3.11, 3.12, 3.13) backed by uv for speed. | Local + CI test matrix |
39
+ | [**pre-commit**](https://pre-commit.com/) | Git hook framework — runs ruff and conventional-commit checks before every commit. | Local |
40
+ | [**conventional-pre-commit**](https://github.com/compilerla/conventional-pre-commit) | Pure-Python validator for [Conventional Commits](https://www.conventionalcommits.org/) commit messages. | pre-commit (commit-msg stage) |
41
+ | [**commitlint**](https://commitlint.js.org/) | Node-based validator that re-checks every commit on a PR. | CI `commitlint` job |
42
+ | [**hatchling**](https://hatch.pypa.io/) | PEP 517 build backend used by `uv build` to produce wheel/sdist. | Build / publish |
43
+ | [**release-please**](https://github.com/googleapis/release-please) | Parses Conventional Commits → bumps version → updates CHANGELOG → tags releases. | CI on push to `main` |
44
+ | [**claude-code-action**](https://github.com/anthropics/claude-code-action) | Claude reviews PRs on demand when you comment `@claude`. | CI on PR comment |
45
+ | [**Dependabot**](https://docs.github.com/en/code-security/dependabot) | Weekly grouped PRs updating GitHub Actions and uv dev-dependencies. | GitHub native |
46
+
47
+ ## Development commands
27
48
 
28
49
  ```bash
29
- # Install hooks (runs ruff + ty pre-commit, conventional commit-msg)
50
+ # Install all dev deps + create .venv
51
+ uv sync --group dev
52
+
53
+ # Install hooks (runs ruff and conventional commit-msg validation)
30
54
  uv run pre-commit install --hook-type pre-commit --hook-type commit-msg
31
55
 
32
- # Run the full test matrix (3.11, 3.12, 3.13)
56
+ # Full test matrix (3.11, 3.12, 3.13) — tox spawns isolated uv envs per version
33
57
  uv run tox
34
58
 
35
- # Single env
36
- uv run tox -e py313 -- -k calculator
59
+ # Single env (fastest iteration)
60
+ uv run tox -e py313 -- -k calculator # only tests matching "calculator"
37
61
 
38
- # Lint / format check / type check
62
+ # Lint / format / type check (one-off, without tox)
39
63
  uv run ruff check .
40
64
  uv run ruff format --check .
41
65
  uv run ty check src
66
+
67
+ # Build the distribution locally
68
+ uv build
69
+
70
+ # Add a new dependency (auto-updates uv.lock — commit both files)
71
+ uv add httpx
72
+ uv add --group dev pytest-mock
42
73
  ```
43
74
 
44
75
  ## Commits
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "test-python-package-release"
3
- version = "0.3.1"
3
+ version = "0.4.0"
4
4
  description = "Template library demonstrating Python package release CI/CD"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -0,0 +1,37 @@
1
+ """Test Python package release — template library."""
2
+
3
+ __version__ = "0.4.0" # managed by release-please
4
+
5
+ from test_python_package_release.calculator import (
6
+ add,
7
+ divide,
8
+ is_divisible,
9
+ modulo,
10
+ multiply,
11
+ power,
12
+ sqrt,
13
+ subtract,
14
+ )
15
+ from test_python_package_release.strings import (
16
+ camel_to_snake,
17
+ count_words,
18
+ reverse_string,
19
+ snake_to_camel,
20
+ truncate,
21
+ )
22
+
23
+ __all__ = [
24
+ "add",
25
+ "camel_to_snake",
26
+ "count_words",
27
+ "divide",
28
+ "is_divisible",
29
+ "modulo",
30
+ "multiply",
31
+ "power",
32
+ "reverse_string",
33
+ "snake_to_camel",
34
+ "sqrt",
35
+ "subtract",
36
+ "truncate",
37
+ ]
@@ -0,0 +1,38 @@
1
+ def add(a: float, b: float) -> float:
2
+ return a + b
3
+
4
+
5
+ def subtract(a: float, b: float) -> float:
6
+ return a - b
7
+
8
+
9
+ def multiply(a: float, b: float) -> float:
10
+ return a * b
11
+
12
+
13
+ def divide(a: float, b: float) -> float:
14
+ if b == 0:
15
+ raise ZeroDivisionError("Cannot divide by zero")
16
+ return a / b
17
+
18
+
19
+ def power(base: float, exponent: float) -> float:
20
+ return base**exponent
21
+
22
+
23
+ def modulo(a: float, b: float) -> float:
24
+ if b == 0:
25
+ raise ZeroDivisionError("Cannot modulo by zero")
26
+ return a % b
27
+
28
+
29
+ def sqrt(x: float) -> float:
30
+ if x < 0:
31
+ raise ValueError("Cannot take square root of a negative number")
32
+ return x**0.5
33
+
34
+
35
+ def is_divisible(a: float, b: float) -> bool:
36
+ if b == 0:
37
+ raise ZeroDivisionError("Cannot divide by zero")
38
+ return a % b == 0
@@ -0,0 +1,26 @@
1
+ def reverse_string(s: str) -> str:
2
+ return s[::-1]
3
+
4
+
5
+ def snake_to_camel(s: str) -> str:
6
+ parts = s.split("_")
7
+ return parts[0] + "".join(p.title() for p in parts[1:])
8
+
9
+
10
+ def count_words(s: str) -> int:
11
+ return len(s.split()) if s.strip() else 0
12
+
13
+
14
+ def camel_to_snake(s: str) -> str:
15
+ result = []
16
+ for i, ch in enumerate(s):
17
+ if ch.isupper() and i > 0:
18
+ result.append("_")
19
+ result.append(ch.lower())
20
+ return "".join(result)
21
+
22
+
23
+ def truncate(s: str, max_length: int, suffix: str = "...") -> str:
24
+ if len(s) <= max_length:
25
+ return s
26
+ return s[: max_length - len(suffix)] + suffix
@@ -0,0 +1,80 @@
1
+ import pytest
2
+
3
+ from test_python_package_release import (
4
+ add,
5
+ divide,
6
+ is_divisible,
7
+ modulo,
8
+ multiply,
9
+ power,
10
+ sqrt,
11
+ subtract,
12
+ )
13
+
14
+
15
+ def test_add():
16
+ assert add(2, 3) == 5
17
+
18
+
19
+ def test_subtract():
20
+ assert subtract(5, 3) == 2
21
+
22
+
23
+ def test_multiply():
24
+ assert multiply(3, 4) == 12
25
+
26
+
27
+ def test_divide():
28
+ assert divide(10, 2) == 5.0
29
+
30
+
31
+ def test_divide_by_zero():
32
+ with pytest.raises(ZeroDivisionError):
33
+ divide(1, 0)
34
+
35
+
36
+ def test_power():
37
+ assert power(2, 10) == 1024
38
+
39
+
40
+ def test_power_zero_exponent():
41
+ assert power(5, 0) == 1
42
+
43
+
44
+ def test_power_negative_exponent():
45
+ assert power(2, -2) == 0.25
46
+
47
+
48
+ def test_modulo():
49
+ assert modulo(10, 3) == 1
50
+
51
+
52
+ def test_modulo_by_zero():
53
+ with pytest.raises(ZeroDivisionError):
54
+ modulo(5, 0)
55
+
56
+
57
+ def test_sqrt():
58
+ assert sqrt(9) == 3.0
59
+
60
+
61
+ def test_sqrt_zero():
62
+ assert sqrt(0) == 0.0
63
+
64
+
65
+ def test_sqrt_negative():
66
+ with pytest.raises(ValueError):
67
+ sqrt(-1)
68
+
69
+
70
+ def test_is_divisible_true():
71
+ assert is_divisible(10, 2) is True
72
+
73
+
74
+ def test_is_divisible_false():
75
+ assert is_divisible(10, 3) is False
76
+
77
+
78
+ def test_is_divisible_by_zero():
79
+ with pytest.raises(ZeroDivisionError):
80
+ is_divisible(5, 0)
@@ -0,0 +1,59 @@
1
+ from test_python_package_release import (
2
+ camel_to_snake,
3
+ count_words,
4
+ reverse_string,
5
+ snake_to_camel,
6
+ truncate,
7
+ )
8
+
9
+
10
+ def test_reverse_string():
11
+ assert reverse_string("abc") == "cba"
12
+
13
+
14
+ def test_reverse_string_empty():
15
+ assert reverse_string("") == ""
16
+
17
+
18
+ def test_snake_to_camel():
19
+ assert snake_to_camel("hello_world_foo") == "helloWorldFoo"
20
+
21
+
22
+ def test_snake_to_camel_single_word():
23
+ assert snake_to_camel("single") == "single"
24
+
25
+
26
+ def test_count_words():
27
+ assert count_words("hello world foo") == 3
28
+
29
+
30
+ def test_count_words_empty():
31
+ assert count_words("") == 0
32
+
33
+
34
+ def test_count_words_whitespace_only():
35
+ assert count_words(" ") == 0
36
+
37
+
38
+ def test_camel_to_snake():
39
+ assert camel_to_snake("helloWorldFoo") == "hello_world_foo"
40
+
41
+
42
+ def test_camel_to_snake_single_word():
43
+ assert camel_to_snake("hello") == "hello"
44
+
45
+
46
+ def test_truncate_short():
47
+ assert truncate("hello", 10) == "hello"
48
+
49
+
50
+ def test_truncate_exact():
51
+ assert truncate("hello", 5) == "hello"
52
+
53
+
54
+ def test_truncate_long():
55
+ assert truncate("hello world", 8) == "hello..."
56
+
57
+
58
+ def test_truncate_custom_suffix():
59
+ assert truncate("hello world", 7, suffix="!") == "hello !"
@@ -367,7 +367,7 @@ wheels = [
367
367
 
368
368
  [[package]]
369
369
  name = "test-python-package-release"
370
- version = "0.3.1"
370
+ version = "0.4.0"
371
371
  source = { editable = "." }
372
372
 
373
373
  [package.dev-dependencies]
@@ -1,16 +0,0 @@
1
- """Test Python package release — template library."""
2
-
3
- __version__ = "0.3.1" # managed by release-please
4
-
5
- from test_python_package_release.calculator import add, divide, multiply, power, subtract
6
- from test_python_package_release.strings import reverse_string, snake_to_camel
7
-
8
- __all__ = [
9
- "add",
10
- "divide",
11
- "multiply",
12
- "power",
13
- "reverse_string",
14
- "snake_to_camel",
15
- "subtract",
16
- ]
@@ -1,20 +0,0 @@
1
- def add(a: float, b: float) -> float:
2
- return a + b
3
-
4
-
5
- def subtract(a: float, b: float) -> float:
6
- return a - b
7
-
8
-
9
- def multiply(a: float, b: float) -> float:
10
- return a * b
11
-
12
-
13
- def divide(a: float, b: float) -> float:
14
- if b == 0:
15
- raise ZeroDivisionError("Cannot divide by zero")
16
- return a / b
17
-
18
-
19
- def power(base: float, exponent: float) -> float:
20
- return base**exponent
@@ -1,7 +0,0 @@
1
- def reverse_string(s: str) -> str:
2
- return s[::-1]
3
-
4
-
5
- def snake_to_camel(s: str) -> str:
6
- parts = s.split("_")
7
- return parts[0] + "".join(p.title() for p in parts[1:])
@@ -1,36 +0,0 @@
1
- import pytest
2
-
3
- from test_python_package_release import add, divide, multiply, power, subtract
4
-
5
-
6
- def test_add():
7
- assert add(2, 3) == 5
8
-
9
-
10
- def test_subtract():
11
- assert subtract(5, 3) == 2
12
-
13
-
14
- def test_multiply():
15
- assert multiply(3, 4) == 12
16
-
17
-
18
- def test_divide():
19
- assert divide(10, 2) == 5.0
20
-
21
-
22
- def test_divide_by_zero():
23
- with pytest.raises(ZeroDivisionError):
24
- divide(1, 0)
25
-
26
-
27
- def test_power():
28
- assert power(2, 10) == 1024
29
-
30
-
31
- def test_power_zero_exponent():
32
- assert power(5, 0) == 1
33
-
34
-
35
- def test_power_negative_exponent():
36
- assert power(2, -2) == 0.25
@@ -1,17 +0,0 @@
1
- from test_python_package_release import reverse_string, snake_to_camel
2
-
3
-
4
- def test_reverse_string():
5
- assert reverse_string("abc") == "cba"
6
-
7
-
8
- def test_reverse_string_empty():
9
- assert reverse_string("") == ""
10
-
11
-
12
- def test_snake_to_camel():
13
- assert snake_to_camel("hello_world_foo") == "helloWorldFoo"
14
-
15
-
16
- def test_snake_to_camel_single_word():
17
- assert snake_to_camel("single") == "single"