pezin 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.
pezin-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,225 @@
1
+ Metadata-Version: 2.4
2
+ Name: pezin
3
+ Version: 0.1.0
4
+ Summary: Automated version bumping and changelog management using conventional commits
5
+ Author-email: Tatus9 <rafael@rro.one>
6
+ Requires-Python: >=3.12
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: packaging>=25.0
9
+ Requires-Dist: rich>=14.0.0
10
+ Requires-Dist: typer>=0.16.0
11
+ Requires-Dist: tomli>=2.0.0
12
+ Requires-Dist: tomli-w>=1.0.0
13
+ Requires-Dist: loguru>=0.7.3
14
+ Requires-Dist: pre-commit>=3.0.0
15
+
16
+ # 🚀 Pezin
17
+
18
+ [![CI](https://github.com/tatus9/pezin/workflows/CI/badge.svg)](https://github.com/tatus9/pezin/actions/workflows/ci.yml)
19
+ [![PyPI version](https://badge.fury.io/py/pezin.svg)](https://badge.fury.io/py/pezin)
20
+ [![Python versions](https://img.shields.io/pypi/pyversions/pezin.svg)](https://pypi.org/project/pezin/)
21
+ [![License](https://img.shields.io/github/license/tatus9/pezin.svg)](https://github.com/tatus9/pezin/blob/main/LICENSE)
22
+ [![Downloads](https://img.shields.io/pypi/dm/pezin.svg)](https://pypi.org/project/pezin/)
23
+
24
+ A tool that care about versions, you could you manually or it could be used as a pre-commit hook to automate version bumping and changelog management using conventional commits.
25
+
26
+ <img src="static/img/icon.png" alt="Pump it UP" style="width:50%; height:auto;">
27
+
28
+ ## Features
29
+
30
+ - 🔄 **Automatic version bumping** based on conventional commits
31
+ - 🌍 **Universal language support** - Python, Node.js, C/C++, Rust, PHP, Go, Java, .NET, and any custom patterns
32
+ - 📁 **Multi-file version management** - Update multiple version files simultaneously
33
+ - 🎨 **Advanced pattern system** - Component-level version control with rich template formatting
34
+ - 📝 **Automated changelog generation** with comparison links
35
+ - 🎣 **Git pre-commit hook integration** with reliable amend detection
36
+ - ⚡ **CLI tool** for manual version management
37
+ - 🏷️ **Pre-release version support** (alpha, beta, rc)
38
+ - 🔧 **Flexible version formats** - Support any prefix/suffix pattern (v1.2.3, 1.2.3v, release-1.2.3)
39
+
40
+ ## Quick Start
41
+
42
+ ### Installation
43
+
44
+ Install from PyPI:
45
+
46
+ ```bash
47
+ pip install pezin
48
+ ```
49
+
50
+ Or install the latest development version:
51
+
52
+ ```bash
53
+ pip install git+https://github.com/tatus9/pezin.git
54
+ ```
55
+
56
+ ### Setup Git Hook
57
+
58
+ Add to your `.pre-commit-config.yaml`:
59
+
60
+ ```yaml
61
+ repos:
62
+ - repo: https://github.com/tatus9/pezin
63
+ rev: v1.1.0 # Use the latest version
64
+ hooks:
65
+ - id: pezin
66
+ ```
67
+
68
+ Install the hooks:
69
+
70
+ ```bash
71
+ pip install pre-commit pezin
72
+ pre-commit install --hook-type commit-msg
73
+ ```
74
+
75
+ ### Start Using
76
+
77
+ Just commit with conventional commit format:
78
+
79
+ ```bash
80
+ git commit -m "feat: add user authentication" # 1.0.0 → 1.1.0
81
+ git commit -m "fix: resolve login bug" # 1.1.0 → 1.1.1
82
+ git commit -m "feat!: redesign API" # 1.1.1 → 2.0.0
83
+ ```
84
+
85
+ Your version files will be automatically updated!
86
+
87
+ ## Conventional Commits
88
+
89
+ | Type | Version Bump | Example |
90
+ |------|--------------|---------|
91
+ | `feat:` | Minor (1.0.0 → 1.1.0) | `feat: add user dashboard` |
92
+ | `fix:` | Patch (1.0.0 → 1.0.1) | `fix: resolve login issue` |
93
+ | `feat!:` | Major (1.0.0 → 2.0.0) | `feat!: redesign API` |
94
+ | `docs:`, `chore:`, etc. | No bump | `docs: update readme` |
95
+
96
+ **Special tokens:**
97
+ - `[skip-bump]` - Skip version bump
98
+ - `[force-major]` - Force major bump
99
+ - `[pre-release=beta]` - Add pre-release label
100
+
101
+ ## CLI Usage
102
+
103
+ ```bash
104
+ # Check versions
105
+ pezin -v # Shows current project + pezin versions
106
+ pezin version # Same as above
107
+
108
+ # Manual version bumping
109
+ pezin minor # Bump minor version
110
+ pezin patch --dry-run # Preview changes
111
+ pezin major --pre-release rc # Pre-release version
112
+
113
+ # Custom configuration
114
+ pezin patch --config package.json
115
+ pezin minor --skip-changelog
116
+
117
+ # Multi-language project example
118
+ # Updates pyproject.toml, package.json, version.h simultaneously
119
+ git commit -m "feat: add multi-platform support"
120
+ ```
121
+
122
+ ## Python API
123
+
124
+ ```python
125
+ from pezin import Version, ConventionalCommit, ChangelogManager
126
+
127
+ # Parse and bump version
128
+ version = Version.parse("1.2.3")
129
+ new_version = version.bump("minor")
130
+ print(str(new_version)) # "1.3.0"
131
+
132
+ # Parse commit message
133
+ commit = ConventionalCommit.parse(
134
+ "feat(api)!: add new endpoint\n\nBREAKING CHANGE: new auth"
135
+ )
136
+ print(commit.breaking) # True
137
+
138
+ # Update changelog
139
+ config = ChangelogConfig(repo_url="https://github.com/tatus9/pezin.git")
140
+ manager = ChangelogManager(config)
141
+ manager.update_changelog(
142
+ Path("CHANGELOG.md"),
143
+ str(new_version),
144
+ [commit]
145
+ )
146
+ ```
147
+
148
+ ## Conventional Commits Guide
149
+
150
+ Pezin follows the [Conventional Commits](https://www.conventionalcommits.org/) specification:
151
+
152
+ ### Basic Format
153
+ ```
154
+ <type>[optional scope]: <description>
155
+
156
+ [optional body]
157
+
158
+ [optional footer(s)]
159
+ ```
160
+
161
+ ### Version Bump Rules
162
+ - `feat`: Minor version bump (1.0.0 → 1.1.0) - New features
163
+ - `fix`: Patch version bump (1.0.0 → 1.0.1) - Bug fixes
164
+ - `!` or `BREAKING CHANGE`: Major version bump (1.0.0 → 2.0.0) - Breaking changes
165
+
166
+ ### Other Commit Types (no version bump)
167
+ - `docs`: Documentation changes
168
+ - `style`: Code style/formatting changes
169
+ - `refactor`: Code refactoring without functional changes
170
+ - `perf`: Performance improvements
171
+ - `test`: Adding or updating tests
172
+ - `chore`: Maintenance tasks, dependency updates
173
+ - `ci`: CI/CD configuration changes
174
+ - `build`: Build system changes
175
+
176
+ ### Special Footer Tokens
177
+ Control version bumping behavior with footer tokens:
178
+
179
+ ```bash
180
+ # Skip version bump entirely
181
+ git commit -m "feat: new feature
182
+
183
+ [skip-bump]"
184
+
185
+ # Force specific bump type
186
+ git commit -m "docs: update readme
187
+
188
+ [force-patch]"
189
+
190
+ # Add pre-release label
191
+ git commit -m "feat: beta feature
192
+
193
+ [pre-release=beta]"
194
+ ```
195
+
196
+ Available tokens:
197
+ - `[skip-bump]`: Skip version bump
198
+ - `[force-major]`: Force major bump (1.0.0 → 2.0.0)
199
+ - `[force-minor]`: Force minor bump (1.0.0 → 1.1.0)
200
+ - `[force-patch]`: Force patch bump (1.0.0 → 1.0.1)
201
+ - `[pre-release=label]`: Add pre-release label (alpha, beta, rc)
202
+
203
+ ## Documentation
204
+
205
+ - 📖 **[Quick Start Guide](docs/quick-start.md)** - Get started in minutes
206
+ - 📖 **[Installation Guide](docs/installation.md)** - Detailed setup instructions
207
+ - 🌍 **[Multi-Language Support](docs/multi-language-support.md)** - Python, Node.js, C++, Rust, and more
208
+ - 🎨 **[Advanced Patterns](docs/advanced-patterns.md)** - Custom version formats and templates
209
+ - 📋 **[Conventional Commits](docs/conventional-commits.md)** - Complete commit format guide
210
+ - ⚙️ **[Configuration](docs/configuration.md)** - Customize Pezin behavior
211
+ - 💻 **[CLI Usage](docs/cli-usage.md)** - Manual version management
212
+ - 🐍 **[Python API](docs/python-api.md)** - Programmatic usage
213
+ - 🔧 **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions
214
+
215
+ ### Examples
216
+
217
+ - 🌍 **[Multi-Language Examples](examples/multi-language-setup.md)** - Complete project setups
218
+
219
+ ## Contributing
220
+
221
+ We welcome contributions!
222
+
223
+ ## License
224
+
225
+ MIT License - feel free to use this project for any purpose.
pezin-0.1.0/README.md ADDED
@@ -0,0 +1,210 @@
1
+ # 🚀 Pezin
2
+
3
+ [![CI](https://github.com/tatus9/pezin/workflows/CI/badge.svg)](https://github.com/tatus9/pezin/actions/workflows/ci.yml)
4
+ [![PyPI version](https://badge.fury.io/py/pezin.svg)](https://badge.fury.io/py/pezin)
5
+ [![Python versions](https://img.shields.io/pypi/pyversions/pezin.svg)](https://pypi.org/project/pezin/)
6
+ [![License](https://img.shields.io/github/license/tatus9/pezin.svg)](https://github.com/tatus9/pezin/blob/main/LICENSE)
7
+ [![Downloads](https://img.shields.io/pypi/dm/pezin.svg)](https://pypi.org/project/pezin/)
8
+
9
+ A tool that care about versions, you could you manually or it could be used as a pre-commit hook to automate version bumping and changelog management using conventional commits.
10
+
11
+ <img src="static/img/icon.png" alt="Pump it UP" style="width:50%; height:auto;">
12
+
13
+ ## Features
14
+
15
+ - 🔄 **Automatic version bumping** based on conventional commits
16
+ - 🌍 **Universal language support** - Python, Node.js, C/C++, Rust, PHP, Go, Java, .NET, and any custom patterns
17
+ - 📁 **Multi-file version management** - Update multiple version files simultaneously
18
+ - 🎨 **Advanced pattern system** - Component-level version control with rich template formatting
19
+ - 📝 **Automated changelog generation** with comparison links
20
+ - 🎣 **Git pre-commit hook integration** with reliable amend detection
21
+ - ⚡ **CLI tool** for manual version management
22
+ - 🏷️ **Pre-release version support** (alpha, beta, rc)
23
+ - 🔧 **Flexible version formats** - Support any prefix/suffix pattern (v1.2.3, 1.2.3v, release-1.2.3)
24
+
25
+ ## Quick Start
26
+
27
+ ### Installation
28
+
29
+ Install from PyPI:
30
+
31
+ ```bash
32
+ pip install pezin
33
+ ```
34
+
35
+ Or install the latest development version:
36
+
37
+ ```bash
38
+ pip install git+https://github.com/tatus9/pezin.git
39
+ ```
40
+
41
+ ### Setup Git Hook
42
+
43
+ Add to your `.pre-commit-config.yaml`:
44
+
45
+ ```yaml
46
+ repos:
47
+ - repo: https://github.com/tatus9/pezin
48
+ rev: v1.1.0 # Use the latest version
49
+ hooks:
50
+ - id: pezin
51
+ ```
52
+
53
+ Install the hooks:
54
+
55
+ ```bash
56
+ pip install pre-commit pezin
57
+ pre-commit install --hook-type commit-msg
58
+ ```
59
+
60
+ ### Start Using
61
+
62
+ Just commit with conventional commit format:
63
+
64
+ ```bash
65
+ git commit -m "feat: add user authentication" # 1.0.0 → 1.1.0
66
+ git commit -m "fix: resolve login bug" # 1.1.0 → 1.1.1
67
+ git commit -m "feat!: redesign API" # 1.1.1 → 2.0.0
68
+ ```
69
+
70
+ Your version files will be automatically updated!
71
+
72
+ ## Conventional Commits
73
+
74
+ | Type | Version Bump | Example |
75
+ |------|--------------|---------|
76
+ | `feat:` | Minor (1.0.0 → 1.1.0) | `feat: add user dashboard` |
77
+ | `fix:` | Patch (1.0.0 → 1.0.1) | `fix: resolve login issue` |
78
+ | `feat!:` | Major (1.0.0 → 2.0.0) | `feat!: redesign API` |
79
+ | `docs:`, `chore:`, etc. | No bump | `docs: update readme` |
80
+
81
+ **Special tokens:**
82
+ - `[skip-bump]` - Skip version bump
83
+ - `[force-major]` - Force major bump
84
+ - `[pre-release=beta]` - Add pre-release label
85
+
86
+ ## CLI Usage
87
+
88
+ ```bash
89
+ # Check versions
90
+ pezin -v # Shows current project + pezin versions
91
+ pezin version # Same as above
92
+
93
+ # Manual version bumping
94
+ pezin minor # Bump minor version
95
+ pezin patch --dry-run # Preview changes
96
+ pezin major --pre-release rc # Pre-release version
97
+
98
+ # Custom configuration
99
+ pezin patch --config package.json
100
+ pezin minor --skip-changelog
101
+
102
+ # Multi-language project example
103
+ # Updates pyproject.toml, package.json, version.h simultaneously
104
+ git commit -m "feat: add multi-platform support"
105
+ ```
106
+
107
+ ## Python API
108
+
109
+ ```python
110
+ from pezin import Version, ConventionalCommit, ChangelogManager
111
+
112
+ # Parse and bump version
113
+ version = Version.parse("1.2.3")
114
+ new_version = version.bump("minor")
115
+ print(str(new_version)) # "1.3.0"
116
+
117
+ # Parse commit message
118
+ commit = ConventionalCommit.parse(
119
+ "feat(api)!: add new endpoint\n\nBREAKING CHANGE: new auth"
120
+ )
121
+ print(commit.breaking) # True
122
+
123
+ # Update changelog
124
+ config = ChangelogConfig(repo_url="https://github.com/tatus9/pezin.git")
125
+ manager = ChangelogManager(config)
126
+ manager.update_changelog(
127
+ Path("CHANGELOG.md"),
128
+ str(new_version),
129
+ [commit]
130
+ )
131
+ ```
132
+
133
+ ## Conventional Commits Guide
134
+
135
+ Pezin follows the [Conventional Commits](https://www.conventionalcommits.org/) specification:
136
+
137
+ ### Basic Format
138
+ ```
139
+ <type>[optional scope]: <description>
140
+
141
+ [optional body]
142
+
143
+ [optional footer(s)]
144
+ ```
145
+
146
+ ### Version Bump Rules
147
+ - `feat`: Minor version bump (1.0.0 → 1.1.0) - New features
148
+ - `fix`: Patch version bump (1.0.0 → 1.0.1) - Bug fixes
149
+ - `!` or `BREAKING CHANGE`: Major version bump (1.0.0 → 2.0.0) - Breaking changes
150
+
151
+ ### Other Commit Types (no version bump)
152
+ - `docs`: Documentation changes
153
+ - `style`: Code style/formatting changes
154
+ - `refactor`: Code refactoring without functional changes
155
+ - `perf`: Performance improvements
156
+ - `test`: Adding or updating tests
157
+ - `chore`: Maintenance tasks, dependency updates
158
+ - `ci`: CI/CD configuration changes
159
+ - `build`: Build system changes
160
+
161
+ ### Special Footer Tokens
162
+ Control version bumping behavior with footer tokens:
163
+
164
+ ```bash
165
+ # Skip version bump entirely
166
+ git commit -m "feat: new feature
167
+
168
+ [skip-bump]"
169
+
170
+ # Force specific bump type
171
+ git commit -m "docs: update readme
172
+
173
+ [force-patch]"
174
+
175
+ # Add pre-release label
176
+ git commit -m "feat: beta feature
177
+
178
+ [pre-release=beta]"
179
+ ```
180
+
181
+ Available tokens:
182
+ - `[skip-bump]`: Skip version bump
183
+ - `[force-major]`: Force major bump (1.0.0 → 2.0.0)
184
+ - `[force-minor]`: Force minor bump (1.0.0 → 1.1.0)
185
+ - `[force-patch]`: Force patch bump (1.0.0 → 1.0.1)
186
+ - `[pre-release=label]`: Add pre-release label (alpha, beta, rc)
187
+
188
+ ## Documentation
189
+
190
+ - 📖 **[Quick Start Guide](docs/quick-start.md)** - Get started in minutes
191
+ - 📖 **[Installation Guide](docs/installation.md)** - Detailed setup instructions
192
+ - 🌍 **[Multi-Language Support](docs/multi-language-support.md)** - Python, Node.js, C++, Rust, and more
193
+ - 🎨 **[Advanced Patterns](docs/advanced-patterns.md)** - Custom version formats and templates
194
+ - 📋 **[Conventional Commits](docs/conventional-commits.md)** - Complete commit format guide
195
+ - ⚙️ **[Configuration](docs/configuration.md)** - Customize Pezin behavior
196
+ - 💻 **[CLI Usage](docs/cli-usage.md)** - Manual version management
197
+ - 🐍 **[Python API](docs/python-api.md)** - Programmatic usage
198
+ - 🔧 **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions
199
+
200
+ ### Examples
201
+
202
+ - 🌍 **[Multi-Language Examples](examples/multi-language-setup.md)** - Complete project setups
203
+
204
+ ## Contributing
205
+
206
+ We welcome contributions!
207
+
208
+ ## License
209
+
210
+ MIT License - feel free to use this project for any purpose.
@@ -0,0 +1,55 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools>=61.0",
4
+ ]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ name = "pezin"
9
+ version = "0.1.0"
10
+ description = "Automated version bumping and changelog management using conventional commits"
11
+ authors = [
12
+ { name = "Tatus9", email = "rafael@rro.one" },
13
+ ]
14
+ readme = "README.md"
15
+ requires-python = ">=3.12"
16
+ dependencies = [
17
+ "packaging>=25.0",
18
+ "rich>=14.0.0",
19
+ "typer>=0.16.0",
20
+ "tomli>=2.0.0",
21
+ "tomli-w>=1.0.0",
22
+ "loguru>=0.7.3",
23
+ "pre-commit>=3.0.0",
24
+ ]
25
+
26
+ [project.scripts]
27
+ pezin = "pezin.cli.main:run"
28
+
29
+ [dependency-groups]
30
+ dev = [
31
+ "pdbpp>=0.11.6",
32
+ "pytest>=8.4.0",
33
+ "pytest-cov>=6.0.0",
34
+ "ruff>=0.8.0",
35
+ ]
36
+
37
+ [tool.setuptools.package-dir]
38
+ "" = "src"
39
+
40
+ [tool.setuptools.packages.find]
41
+ where = [
42
+ "src",
43
+ ]
44
+ include = [
45
+ "pezin",
46
+ "pezin.*",
47
+ ]
48
+ namespaces = true
49
+
50
+ [tool.pytest.ini_options]
51
+ testpaths = [
52
+ "tests",
53
+ ]
54
+ python_files = "test_*.py"
55
+ addopts = "-v"
pezin-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,27 @@
1
+ """Automated version bumping and changelog management.
2
+
3
+ Example:
4
+ ```bash
5
+ # Install pre-commit hook
6
+ pre-commit install --hook-type commit-msg
7
+
8
+ # Run manually
9
+ pezin bump minor
10
+ ```
11
+ """
12
+
13
+ from .core.changelog import ChangelogConfig, ChangelogManager
14
+ from .core.commit import BumpType, CommitType, ConventionalCommit
15
+ from .core.version import Version, VersionBumpType
16
+
17
+ __version__ = "0.1.0"
18
+
19
+ __all__ = [
20
+ "Version",
21
+ "VersionBumpType",
22
+ "ConventionalCommit",
23
+ "CommitType",
24
+ "BumpType",
25
+ "ChangelogConfig",
26
+ "ChangelogManager",
27
+ ]
@@ -0,0 +1,13 @@
1
+ """CLI package for pezin."""
2
+
3
+ from .commands import bump_version, get_commits_since_last_tag, update_changelog
4
+ from .main import app
5
+ from .utils import find_project_root
6
+
7
+ __all__ = [
8
+ "app",
9
+ "bump_version",
10
+ "update_changelog",
11
+ "get_commits_since_last_tag",
12
+ "find_project_root",
13
+ ]