@@ -33,6 +33,7 @@ classifiers = [
3333]
3434dependencies = [
3535 " babel>=2.18.0" ,
36+ " keyring>=25.7.0" ,
3637 " platformdirs>=4.9.6" ,
3738 " pygit2>=1.19.2" ,
3839 " pygithub>=2.9.1" ,
@@ -59,9 +60,10 @@ dev = [
5960 " polib>=1.2.0" ,
6061 " pre-commit>=4.6.0" ,
6162 " pytest>=9.0.3" ,
63+ " pytest-asyncio>=1.3.0" ,
6264 " pytest-cov>=7.1.0" ,
6365 " ruff>=0.15.14" ,
64- " tbump>=6.11.0 " ,
66+ " commitizen>=4.8.3 " ,
6567 " textual-dev>=1.8.0" ,
6668 " tomli-w>=1.2.0" ,
6769 " ty>=0.0.39" ,
@@ -72,27 +74,29 @@ requires = ["uv_build>=0.9.18,<0.10.0"]
7274build-backend = " uv_build"
7375
7476[tool .poe .tasks ]
75- "lint:update" = " uv run pre-commit autoupdate"
76- "lint" = " uv run pre-commit run --all"
77+ "lint" = " uv run ruff check --fix"
78+ "lint:format" = " uv run ruff format"
79+ "lint:types" = " uv run ty check"
7780"test" = " uv run pytest --cov edit_python_pe --cov-report xml:cobertura.xml --cov-report term --junitxml report.xml"
7881"freeze" = " uv export --format requirements.txt --no-group dev --no-hashes --no-annotate --no-header --output-file requirements.txt"
7982"freeze:dev" = " uv export --format requirements.txt --all-groups --no-hashes --no-annotate --no-header --output-file requirements.dev.txt"
8083"changelog:draft" = { shell = " cat .diff.txt | gemini < prompts/changelog_generator.txt > .CHANGELOG_DRAFT.md" }
8184
82- [tool .poe .tasks ."version:update" ]
83- sequence = [
84- { cmd = " uv run tbump --no-push --no-tag --non-interactive ${version}" },
85- ]
86- args = [{ name = " version" , positional = true }]
85+ [tool .poe .tasks ."release" ]
86+ cmd = " uv run cz bump --changelog"
8787
88- [tool .poe .tasks ."messages:extract " ]
89- cmd = " uv run pybabel extract -F babel.cfg -o src/edit_python_pe/locale/messages.pot src/edit_python_pe "
88+ [tool .poe .tasks ."release:changelog " ]
89+ cmd = " uv run cz changelog "
9090
9191[tool .poe .tasks ."messages:init" ]
9292sequence = [
9393 " messages:extract" ,
9494 { cmd = " uv run pybabel init -i src/edit_python_pe/locale/messages.pot -d src/edit_python_pe/locale -l ${lang}" }
9595]
96+
97+ [tool .poe .tasks ."messages:extract" ]
98+ cmd = " uv run pybabel extract -F babel.cfg -o src/edit_python_pe/locale/messages.pot src/edit_python_pe"
99+
96100args = [{ name = " lang" , options = [" --lang" ], required = true }]
97101
98102[tool .poe .tasks ."messages:update" ]
@@ -101,18 +105,11 @@ sequence = [
101105 { cmd = " uv run pybabel update -i src/edit_python_pe/locale/messages.pot -d src/edit_python_pe/locale" }
102106]
103107
104- [tool .poe .tasks ."messages:translate" ]
105- cmd = " uv run python scripts/translate.py src/edit_python_pe/locale/${lang}/LC_MESSAGES/messages.po ${lang}"
106- args = [{ name = " lang" , options = [" --lang" ], required = true }]
107-
108- [tool .poe .tasks .makemessages ]
109- ref = " messages:update"
110-
111- [tool .poe .tasks .compilemessages ]
108+ [tool .poe .tasks ."messages:compile" ]
112109cmd = " uv run pybabel compile -d src/edit_python_pe/locale"
113110
114111[tool .ruff ]
115- line-length = 79
112+ line-length = 88
116113target-version = " py314"
117114
118115[tool .ruff .lint ]
@@ -140,11 +137,16 @@ ignore = [
140137 " D203" , # 1 blank line required before class docstring
141138 " D213" , # Multi-line docstring summary should start at the second line
142139 " D407" , # Missing dashed underline after section
143- " S101" , # Use of assert detected (often used in tests)
144140]
145141
146142[tool .ruff .lint .per-file-ignores ]
147- "tests/*" = [" S105" , " S108" , " E501" ]
143+ "tests/*" = [
144+ " S101" , # Use of assert detected
145+ " S105" , # Use of hardcoded password string
146+ " S106" , # Use of hardcoded password function args
147+ " S108" , # Use of hardcoded temp files
148+ " E501" , # Too long lines
149+ ]
148150
149151[tool .ruff .lint .isort ]
150152known-first-party = [" edit_python_pe" ]
@@ -168,6 +170,32 @@ line-ending = "auto"
168170# inconsistent-mro = "ignore"
169171# unresolved-attribute = "ignore"
170172
173+ [tool .commitizen ]
174+ name = " cz_conventional_commits"
175+ version_provider = " pep621"
176+ version_scheme = " semver"
177+ tag_format = " v$version"
178+ update_changelog_on_bump = true
179+ major_version_zero = true
180+ changelog_file = " CHANGELOG.md"
181+ changelog_incremental = true
182+ version_files = [
183+ " src/edit_python_pe/__version__.py:__version__ = \" $version\" " ,
184+ " pyproject.toml:tags/v$version.tar.gz" ,
185+ ]
186+
187+ [[tool .commitizen .change_type_map ]]
188+ "feat" = " Features"
189+ "fix" = " Bug Fixes"
190+ "docs" = " Documentation"
191+ "style" = " Styles"
192+ "refactor" = " Code Refactoring"
193+ "perf" = " Performance Improvements"
194+ "test" = " Tests"
195+ "build" = " Build System"
196+ "ci" = " Continuous Integration"
197+ "chore" = " Chores"
198+
171199[tool .uv .build-backend ]
172200module-name = " edit_python_pe"
173201module-root = " src"
0 commit comments