From 7e23626055328f00c3582cf78c6e64913e95621a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 01:27:09 +0000 Subject: [PATCH 001/159] build(deps-dev): bump ruff from 0.7.4 to 0.8.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.4 to 0.8.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.4...0.8.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 46 +++++++++++++++++++++++----------------------- pyproject.toml | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/poetry.lock b/poetry.lock index ad3607415b..05909045e3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1432,29 +1432,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.7.4" +version = "0.8.0" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.7.4-py3-none-linux_armv6l.whl", hash = "sha256:a4919925e7684a3f18e18243cd6bea7cfb8e968a6eaa8437971f681b7ec51478"}, - {file = "ruff-0.7.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:cfb365c135b830778dda8c04fb7d4280ed0b984e1aec27f574445231e20d6c63"}, - {file = "ruff-0.7.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:63a569b36bc66fbadec5beaa539dd81e0527cb258b94e29e0531ce41bacc1f20"}, - {file = "ruff-0.7.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d06218747d361d06fd2fdac734e7fa92df36df93035db3dc2ad7aa9852cb109"}, - {file = "ruff-0.7.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e0cea28d0944f74ebc33e9f934238f15c758841f9f5edd180b5315c203293452"}, - {file = "ruff-0.7.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:80094ecd4793c68b2571b128f91754d60f692d64bc0d7272ec9197fdd09bf9ea"}, - {file = "ruff-0.7.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:997512325c6620d1c4c2b15db49ef59543ef9cd0f4aa8065ec2ae5103cedc7e7"}, - {file = "ruff-0.7.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00b4cf3a6b5fad6d1a66e7574d78956bbd09abfd6c8a997798f01f5da3d46a05"}, - {file = "ruff-0.7.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7dbdc7d8274e1422722933d1edddfdc65b4336abf0b16dfcb9dedd6e6a517d06"}, - {file = "ruff-0.7.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e92dfb5f00eaedb1501b2f906ccabfd67b2355bdf117fea9719fc99ac2145bc"}, - {file = "ruff-0.7.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3bd726099f277d735dc38900b6a8d6cf070f80828877941983a57bca1cd92172"}, - {file = "ruff-0.7.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:2e32829c429dd081ee5ba39aef436603e5b22335c3d3fff013cd585806a6486a"}, - {file = "ruff-0.7.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:662a63b4971807623f6f90c1fb664613f67cc182dc4d991471c23c541fee62dd"}, - {file = "ruff-0.7.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:876f5e09eaae3eb76814c1d3b68879891d6fde4824c015d48e7a7da4cf066a3a"}, - {file = "ruff-0.7.4-py3-none-win32.whl", hash = "sha256:75c53f54904be42dd52a548728a5b572344b50d9b2873d13a3f8c5e3b91f5cac"}, - {file = "ruff-0.7.4-py3-none-win_amd64.whl", hash = "sha256:745775c7b39f914238ed1f1b0bebed0b9155a17cd8bc0b08d3c87e4703b990d6"}, - {file = "ruff-0.7.4-py3-none-win_arm64.whl", hash = "sha256:11bff065102c3ae9d3ea4dc9ecdfe5a5171349cdd0787c1fc64761212fc9cf1f"}, - {file = "ruff-0.7.4.tar.gz", hash = "sha256:cd12e35031f5af6b9b93715d8c4f40360070b2041f81273d0527683d5708fce2"}, + {file = "ruff-0.8.0-py3-none-linux_armv6l.whl", hash = "sha256:fcb1bf2cc6706adae9d79c8d86478677e3bbd4ced796ccad106fd4776d395fea"}, + {file = "ruff-0.8.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:295bb4c02d58ff2ef4378a1870c20af30723013f441c9d1637a008baaf928c8b"}, + {file = "ruff-0.8.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7b1f1c76b47c18fa92ee78b60d2d20d7e866c55ee603e7d19c1e991fad933a9a"}, + {file = "ruff-0.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb0d4f250a7711b67ad513fde67e8870109e5ce590a801c3722580fe98c33a99"}, + {file = "ruff-0.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e55cce9aa93c5d0d4e3937e47b169035c7e91c8655b0974e61bb79cf398d49c"}, + {file = "ruff-0.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f4cd64916d8e732ce6b87f3f5296a8942d285bbbc161acee7fe561134af64f9"}, + {file = "ruff-0.8.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c5c1466be2a2ebdf7c5450dd5d980cc87c8ba6976fb82582fea18823da6fa362"}, + {file = "ruff-0.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2dabfd05b96b7b8f2da00d53c514eea842bff83e41e1cceb08ae1966254a51df"}, + {file = "ruff-0.8.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:facebdfe5a5af6b1588a1d26d170635ead6892d0e314477e80256ef4a8470cf3"}, + {file = "ruff-0.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87a8e86bae0dbd749c815211ca11e3a7bd559b9710746c559ed63106d382bd9c"}, + {file = "ruff-0.8.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:85e654f0ded7befe2d61eeaf3d3b1e4ef3894469cd664ffa85006c7720f1e4a2"}, + {file = "ruff-0.8.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:83a55679c4cb449fa527b8497cadf54f076603cc36779b2170b24f704171ce70"}, + {file = "ruff-0.8.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:812e2052121634cf13cd6fddf0c1871d0ead1aad40a1a258753c04c18bb71bbd"}, + {file = "ruff-0.8.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:780d5d8523c04202184405e60c98d7595bdb498c3c6abba3b6d4cdf2ca2af426"}, + {file = "ruff-0.8.0-py3-none-win32.whl", hash = "sha256:5fdb6efecc3eb60bba5819679466471fd7d13c53487df7248d6e27146e985468"}, + {file = "ruff-0.8.0-py3-none-win_amd64.whl", hash = "sha256:582891c57b96228d146725975fbb942e1f30a0c4ba19722e692ca3eb25cc9b4f"}, + {file = "ruff-0.8.0-py3-none-win_arm64.whl", hash = "sha256:ba93e6294e9a737cd726b74b09a6972e36bb511f9a102f1d9a7e1ce94dd206a6"}, + {file = "ruff-0.8.0.tar.gz", hash = "sha256:a7ccfe6331bf8c8dad715753e157457faf7351c2b69f62f32c165c2dbcbacd44"}, ] [[package]] @@ -1612,13 +1612,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "virtualenv" -version = "20.27.1" +version = "20.27.2" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" files = [ - {file = "virtualenv-20.27.1-py3-none-any.whl", hash = "sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4"}, - {file = "virtualenv-20.27.1.tar.gz", hash = "sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba"}, + {file = "virtualenv-20.27.2-py3-none-any.whl", hash = "sha256:a9ebd6adbf08c99583133b61e7491f8a4bc8d5fb34361abaa5ede3fff903a0f0"}, + {file = "virtualenv-20.27.2.tar.gz", hash = "sha256:99c89daeeaf15918880c73c99f41dc05eb39055e43231a4d76fc6b9fc2cf019d"}, ] [package.dependencies] @@ -1779,4 +1779,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.9" -content-hash = "a26dd45789ef8d0cc79465fe620060d29bde139d45a70885a80c413dd668dc81" +content-hash = "7e04dd9aa4799765e49b74f26cd66a1d5a8cf334d9b3eabf35d89c4660d518c2" diff --git a/pyproject.toml b/pyproject.toml index b15581952e..2662b80040 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ pytest-regressions = "^2.4.0" pytest-freezer = "^0.4.6" pytest-xdist = "^3.1.0" # linter -ruff = ">=0.5.0,<0.8.0" +ruff = ">=0.5.0,<0.9.0" pre-commit = ">=2.18,<4.0" mypy = "^1.4" types-PyYAML = ">=5.4.3,<7.0.0" From bb2f8a79afc586f782f3728aa09665dcc509fbb3 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Tue, 26 Nov 2024 09:36:45 +0800 Subject: [PATCH 002/159] style: fix ruff warned style --- commitizen/changelog.py | 3 ++- commitizen/changelog_formats/restructuredtext.py | 4 ++-- commitizen/cli.py | 3 ++- commitizen/cz/__init__.py | 2 +- commitizen/cz/base.py | 3 ++- commitizen/defaults.py | 3 ++- commitizen/version_schemes.py | 3 +-- tests/conftest.py | 2 +- tests/providers/conftest.py | 2 +- 9 files changed, 14 insertions(+), 11 deletions(-) diff --git a/commitizen/changelog.py b/commitizen/changelog.py index 32a66c47eb..7f300354b6 100644 --- a/commitizen/changelog.py +++ b/commitizen/changelog.py @@ -29,9 +29,10 @@ import re from collections import OrderedDict, defaultdict +from collections.abc import Iterable from dataclasses import dataclass from datetime import date -from typing import TYPE_CHECKING, Iterable +from typing import TYPE_CHECKING from jinja2 import ( BaseLoader, diff --git a/commitizen/changelog_formats/restructuredtext.py b/commitizen/changelog_formats/restructuredtext.py index 09d032400c..8bcf9a4a4f 100644 --- a/commitizen/changelog_formats/restructuredtext.py +++ b/commitizen/changelog_formats/restructuredtext.py @@ -3,7 +3,7 @@ import re import sys from itertools import zip_longest -from typing import IO, TYPE_CHECKING, Any, Tuple, Union +from typing import IO, TYPE_CHECKING, Any, Union from commitizen.changelog import Metadata @@ -18,7 +18,7 @@ # Can't use `|` operator and native type because of https://bugs.python.org/issue42233 only fixed in 3.10 -TitleKind: TypeAlias = Union[str, Tuple[str, str]] +TitleKind: TypeAlias = Union[str, tuple[str, str]] class RestructuredText(BaseFormat): diff --git a/commitizen/cli.py b/commitizen/cli.py index 1e0b1c6276..2ee7d41eba 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -3,11 +3,12 @@ import argparse import logging import sys +from collections.abc import Sequence from copy import deepcopy from functools import partial from pathlib import Path from types import TracebackType -from typing import Any, Sequence +from typing import Any import argcomplete from decli import cli diff --git a/commitizen/cz/__init__.py b/commitizen/cz/__init__.py index 04603a9ec4..cb17fe32cd 100644 --- a/commitizen/cz/__init__.py +++ b/commitizen/cz/__init__.py @@ -4,7 +4,7 @@ import pkgutil import sys import warnings -from typing import Iterable +from collections.abc import Iterable if sys.version_info >= (3, 10): from importlib import metadata diff --git a/commitizen/cz/base.py b/commitizen/cz/base.py index 70929e2f83..43455a74ca 100644 --- a/commitizen/cz/base.py +++ b/commitizen/cz/base.py @@ -1,7 +1,8 @@ from __future__ import annotations from abc import ABCMeta, abstractmethod -from typing import Any, Callable, Iterable, Protocol +from collections.abc import Iterable +from typing import Any, Callable, Protocol from jinja2 import BaseLoader, PackageLoader from prompt_toolkit.styles import Style, merge_styles diff --git a/commitizen/defaults.py b/commitizen/defaults.py index 996c243196..d776e38d7a 100644 --- a/commitizen/defaults.py +++ b/commitizen/defaults.py @@ -2,7 +2,8 @@ import pathlib from collections import OrderedDict -from typing import Any, Iterable, MutableMapping, TypedDict +from collections.abc import Iterable, MutableMapping +from typing import Any, TypedDict # Type Questions = Iterable[MutableMapping[str, Any]] diff --git a/commitizen/version_schemes.py b/commitizen/version_schemes.py index 346287a065..554864e3bf 100644 --- a/commitizen/version_schemes.py +++ b/commitizen/version_schemes.py @@ -10,7 +10,6 @@ ClassVar, Literal, Protocol, - Type, cast, runtime_checkable, ) @@ -150,7 +149,7 @@ def bump( # With PEP 440 and SemVer semantic, Scheme is the type, Version is an instance Version: TypeAlias = VersionProtocol -VersionScheme: TypeAlias = Type[VersionProtocol] +VersionScheme: TypeAlias = type[VersionProtocol] class BaseVersion(_BaseVersion): diff --git a/tests/conftest.py b/tests/conftest.py index 95f3df3b20..1e6bc15f0c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,8 +3,8 @@ import os import re import tempfile +from collections.abc import Iterator from pathlib import Path -from typing import Iterator import pytest from pytest_mock import MockerFixture diff --git a/tests/providers/conftest.py b/tests/providers/conftest.py index b4432ca524..f73cdb72a5 100644 --- a/tests/providers/conftest.py +++ b/tests/providers/conftest.py @@ -1,8 +1,8 @@ from __future__ import annotations import os +from collections.abc import Iterator from pathlib import Path -from typing import Iterator import pytest From 42e639902a341d2db39c9fdd6dc2020240b2e7f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:54:32 +0000 Subject: [PATCH 003/159] build(deps-dev): bump pytest-cov from 5.0.0 to 6.0.0 Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 5.0.0 to 6.0.0. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-cov/compare/v5.0.0...v6.0.0) --- updated-dependencies: - dependency-name: pytest-cov dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- poetry.lock | 18 +++++++++--------- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/poetry.lock b/poetry.lock index 05909045e3..fec1cca1c4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1079,17 +1079,17 @@ dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments [[package]] name = "pytest-cov" -version = "5.0.0" +version = "6.0.0" description = "Pytest plugin for measuring coverage." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"}, - {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"}, + {file = "pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0"}, + {file = "pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35"}, ] [package.dependencies] -coverage = {version = ">=5.2.1", extras = ["toml"]} +coverage = {version = ">=7.5", extras = ["toml"]} pytest = ">=4.6" [package.extras] @@ -1612,13 +1612,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "virtualenv" -version = "20.27.2" +version = "20.27.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" files = [ - {file = "virtualenv-20.27.2-py3-none-any.whl", hash = "sha256:a9ebd6adbf08c99583133b61e7491f8a4bc8d5fb34361abaa5ede3fff903a0f0"}, - {file = "virtualenv-20.27.2.tar.gz", hash = "sha256:99c89daeeaf15918880c73c99f41dc05eb39055e43231a4d76fc6b9fc2cf019d"}, + {file = "virtualenv-20.27.1-py3-none-any.whl", hash = "sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4"}, + {file = "virtualenv-20.27.1.tar.gz", hash = "sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba"}, ] [package.dependencies] @@ -1779,4 +1779,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.9" -content-hash = "7e04dd9aa4799765e49b74f26cd66a1d5a8cf334d9b3eabf35d89c4660d518c2" +content-hash = "67d0ae972c7570988ffe085a48e959f140575f959535bc087e0ea57dc74d83c3" diff --git a/pyproject.toml b/pyproject.toml index 2662b80040..3153af36ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ importlib_metadata = { version = ">=8.0.0,<9", python = "<3.10"} ipython = "^8.0" # test pytest = ">=7.2,<9.0" -pytest-cov = ">=4,<6" +pytest-cov = ">=4,<7" pytest-mock = "^3.10" pytest-regressions = "^2.4.0" pytest-freezer = "^0.4.6" From a6b84d101a202a8225d6c9824e6308021b0fb141 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:54:52 +0000 Subject: [PATCH 004/159] build(deps-dev): bump pre-commit from 3.8.0 to 4.0.1 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 3.8.0 to 4.0.1. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v3.8.0...v4.0.1) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 +++--- pyproject.toml | 77 +++++++++++++++++++++++--------------------------- 2 files changed, 39 insertions(+), 46 deletions(-) diff --git a/poetry.lock b/poetry.lock index fec1cca1c4..0f146aba25 100644 --- a/poetry.lock +++ b/poetry.lock @@ -968,13 +968,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.8.0" +version = "4.0.1" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" files = [ - {file = "pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f"}, - {file = "pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af"}, + {file = "pre_commit-4.0.1-py2.py3-none-any.whl", hash = "sha256:efde913840816312445dc98787724647c65473daefe420785f885e8ed9a06878"}, + {file = "pre_commit-4.0.1.tar.gz", hash = "sha256:80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2"}, ] [package.dependencies] @@ -1779,4 +1779,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.9" -content-hash = "67d0ae972c7570988ffe085a48e959f140575f959535bc087e0ea57dc74d83c3" +content-hash = "36ac305c62f5139da82126a1b3bc71f86320af1abab5c473b3c0d21c81e214bd" diff --git a/pyproject.toml b/pyproject.toml index 3153af36ca..8737b86f28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,9 +2,9 @@ version = "4.0.0" tag_format = "v$version" version_files = [ - "pyproject.toml:version", - "commitizen/__version__.py", - ".pre-commit-config.yaml:rev:.+Commitizen", + "pyproject.toml:version", + "commitizen/__version__.py", + ".pre-commit-config.yaml:rev:.+Commitizen", ] [tool.poetry] @@ -32,10 +32,7 @@ classifiers = [ "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", ] -packages = [ - {include = "commitizen"}, - {include = "commitizen/py.typed"}, -] +packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }] [tool.poetry.dependencies] python = ">=3.9" @@ -51,7 +48,7 @@ argcomplete = ">=1.12.1,<3.6" typing-extensions = { version = "^4.0.1", python = "<3.11" } charset-normalizer = ">=2.1.0,<4" # Use the Python 3.11 and 3.12 compatible API: https://github.com/python/importlib_metadata#compatibility -importlib_metadata = { version = ">=8.0.0,<9", python = "<3.10"} +importlib_metadata = { version = ">=8.0.0,<9", python = "<3.10" } [tool.poetry.group.dev.dependencies] # dev tool @@ -65,7 +62,7 @@ pytest-freezer = "^0.4.6" pytest-xdist = "^3.1.0" # linter ruff = ">=0.5.0,<0.9.0" -pre-commit = ">=2.18,<4.0" +pre-commit = ">=2.18,<5.0" mypy = "^1.4" types-PyYAML = ">=5.4.3,<7.0.0" types-termcolor = "^0.1.1" @@ -108,33 +105,33 @@ semver = "commitizen.version_schemes:SemVer" semver2 = "commitizen.version_schemes:SemVer2" [tool.coverage] - [tool.coverage.report] - show_missing = true - exclude_lines = [ - # Have to re-enable the standard pragma - 'pragma: no cover', - - # Don't complain about missing debug-only code: - 'def __repr__', - 'if self\.debug', - - # Don't complain if tests don't hit defensive assertion code: - 'raise AssertionError', - 'raise NotImplementedError', - - # Don't complain if non-runnable code isn't run: - 'if 0:', - 'if __name__ == .__main__.:', - 'if TYPE_CHECKING:', - ] - omit = [ - 'env/*', - 'venv/*', - '.venv/*', - '*/virtualenv/*', - '*/virtualenvs/*', - '*/tests/*', - ] +[tool.coverage.report] +show_missing = true +exclude_lines = [ + # Have to re-enable the standard pragma + 'pragma: no cover', + + # Don't complain about missing debug-only code: + 'def __repr__', + 'if self\.debug', + + # Don't complain if tests don't hit defensive assertion code: + 'raise AssertionError', + 'raise NotImplementedError', + + # Don't complain if non-runnable code isn't run: + 'if 0:', + 'if __name__ == .__main__.:', + 'if TYPE_CHECKING:', +] +omit = [ + 'env/*', + 'venv/*', + '.venv/*', + '*/virtualenv/*', + '*/virtualenvs/*', + '*/tests/*', +] [build-system] requires = ["poetry_core>=1.0.0"] @@ -157,11 +154,7 @@ select = [ # isort "I", ] -ignore = [ - "E501", - "D1", - "D415" -] +ignore = ["E501", "D1", "D415"] [tool.ruff.lint.isort] known-first-party = ["commitizen", "tests"] @@ -179,7 +172,7 @@ warn_unused_ignores = true warn_unused_configs = true [[tool.mypy.overrides]] -module = "py.*" # Legacy pytest dependencies +module = "py.*" # Legacy pytest dependencies ignore_missing_imports = true [tool.codespell] From 69403dd9ccacc3e7bdce3a43d6e77a80ab41be41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 01:36:39 +0000 Subject: [PATCH 005/159] build(deps-dev): bump mkdocs-material from 9.5.46 to 9.5.47 Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.46 to 9.5.47. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.46...9.5.47) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0f146aba25..116dfbaa3b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "argcomplete" @@ -756,13 +756,13 @@ pyyaml = ">=5.1" [[package]] name = "mkdocs-material" -version = "9.5.46" +version = "9.5.47" description = "Documentation that simply works" optional = false python-versions = ">=3.8" files = [ - {file = "mkdocs_material-9.5.46-py3-none-any.whl", hash = "sha256:98f0a2039c62e551a68aad0791a8d41324ff90c03a6e6cea381a384b84908b83"}, - {file = "mkdocs_material-9.5.46.tar.gz", hash = "sha256:ae2043f4238e572f9a40e0b577f50400d6fc31e2fef8ea141800aebf3bd273d7"}, + {file = "mkdocs_material-9.5.47-py3-none-any.whl", hash = "sha256:53fb9c9624e7865da6ec807d116cd7be24b3cb36ab31b1d1d1a9af58c56009a2"}, + {file = "mkdocs_material-9.5.47.tar.gz", hash = "sha256:fc3b7a8e00ad896660bd3a5cc12ca0cb28bdc2bcbe2a946b5714c23ac91b0ede"}, ] [package.dependencies] From 6436b155b735c6f6f5a40ff99b4beee1eb0481b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 01:36:59 +0000 Subject: [PATCH 006/159] build(deps-dev): bump pytest from 8.3.3 to 8.3.4 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.3 to 8.3.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.3...8.3.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 116dfbaa3b..348b686cac 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1057,13 +1057,13 @@ extra = ["pygments (>=2.12)"] [[package]] name = "pytest" -version = "8.3.3" +version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, - {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, + {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, + {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, ] [package.dependencies] From 619575faf2724dc6f28214cc7d3264fc2e3717e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 01:37:29 +0000 Subject: [PATCH 007/159] build(deps-dev): bump ruff from 0.8.0 to 0.8.1 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.0 to 0.8.1. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.0...0.8.1) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index 348b686cac..16ef1b4a9c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1432,29 +1432,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.8.0" +version = "0.8.1" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.0-py3-none-linux_armv6l.whl", hash = "sha256:fcb1bf2cc6706adae9d79c8d86478677e3bbd4ced796ccad106fd4776d395fea"}, - {file = "ruff-0.8.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:295bb4c02d58ff2ef4378a1870c20af30723013f441c9d1637a008baaf928c8b"}, - {file = "ruff-0.8.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7b1f1c76b47c18fa92ee78b60d2d20d7e866c55ee603e7d19c1e991fad933a9a"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eb0d4f250a7711b67ad513fde67e8870109e5ce590a801c3722580fe98c33a99"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e55cce9aa93c5d0d4e3937e47b169035c7e91c8655b0974e61bb79cf398d49c"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3f4cd64916d8e732ce6b87f3f5296a8942d285bbbc161acee7fe561134af64f9"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c5c1466be2a2ebdf7c5450dd5d980cc87c8ba6976fb82582fea18823da6fa362"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2dabfd05b96b7b8f2da00d53c514eea842bff83e41e1cceb08ae1966254a51df"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:facebdfe5a5af6b1588a1d26d170635ead6892d0e314477e80256ef4a8470cf3"}, - {file = "ruff-0.8.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87a8e86bae0dbd749c815211ca11e3a7bd559b9710746c559ed63106d382bd9c"}, - {file = "ruff-0.8.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:85e654f0ded7befe2d61eeaf3d3b1e4ef3894469cd664ffa85006c7720f1e4a2"}, - {file = "ruff-0.8.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:83a55679c4cb449fa527b8497cadf54f076603cc36779b2170b24f704171ce70"}, - {file = "ruff-0.8.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:812e2052121634cf13cd6fddf0c1871d0ead1aad40a1a258753c04c18bb71bbd"}, - {file = "ruff-0.8.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:780d5d8523c04202184405e60c98d7595bdb498c3c6abba3b6d4cdf2ca2af426"}, - {file = "ruff-0.8.0-py3-none-win32.whl", hash = "sha256:5fdb6efecc3eb60bba5819679466471fd7d13c53487df7248d6e27146e985468"}, - {file = "ruff-0.8.0-py3-none-win_amd64.whl", hash = "sha256:582891c57b96228d146725975fbb942e1f30a0c4ba19722e692ca3eb25cc9b4f"}, - {file = "ruff-0.8.0-py3-none-win_arm64.whl", hash = "sha256:ba93e6294e9a737cd726b74b09a6972e36bb511f9a102f1d9a7e1ce94dd206a6"}, - {file = "ruff-0.8.0.tar.gz", hash = "sha256:a7ccfe6331bf8c8dad715753e157457faf7351c2b69f62f32c165c2dbcbacd44"}, + {file = "ruff-0.8.1-py3-none-linux_armv6l.whl", hash = "sha256:fae0805bd514066f20309f6742f6ee7904a773eb9e6c17c45d6b1600ca65c9b5"}, + {file = "ruff-0.8.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b8a4f7385c2285c30f34b200ca5511fcc865f17578383db154e098150ce0a087"}, + {file = "ruff-0.8.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cd054486da0c53e41e0086e1730eb77d1f698154f910e0cd9e0d64274979a209"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2029b8c22da147c50ae577e621a5bfbc5d1fed75d86af53643d7a7aee1d23871"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2666520828dee7dfc7e47ee4ea0d928f40de72056d929a7c5292d95071d881d1"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:333c57013ef8c97a53892aa56042831c372e0bb1785ab7026187b7abd0135ad5"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:288326162804f34088ac007139488dcb43de590a5ccfec3166396530b58fb89d"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b12c39b9448632284561cbf4191aa1b005882acbc81900ffa9f9f471c8ff7e26"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:364e6674450cbac8e998f7b30639040c99d81dfb5bbc6dfad69bc7a8f916b3d1"}, + {file = "ruff-0.8.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b22346f845fec132aa39cd29acb94451d030c10874408dbf776af3aaeb53284c"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b2f2f7a7e7648a2bfe6ead4e0a16745db956da0e3a231ad443d2a66a105c04fa"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:adf314fc458374c25c5c4a4a9270c3e8a6a807b1bec018cfa2813d6546215540"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a885d68342a231b5ba4d30b8c6e1b1ee3a65cf37e3d29b3c74069cdf1ee1e3c9"}, + {file = "ruff-0.8.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d2c16e3508c8cc73e96aa5127d0df8913d2290098f776416a4b157657bee44c5"}, + {file = "ruff-0.8.1-py3-none-win32.whl", hash = "sha256:93335cd7c0eaedb44882d75a7acb7df4b77cd7cd0d2255c93b28791716e81790"}, + {file = "ruff-0.8.1-py3-none-win_amd64.whl", hash = "sha256:2954cdbe8dfd8ab359d4a30cd971b589d335a44d444b6ca2cb3d1da21b75e4b6"}, + {file = "ruff-0.8.1-py3-none-win_arm64.whl", hash = "sha256:55873cc1a473e5ac129d15eccb3c008c096b94809d693fc7053f588b67822737"}, + {file = "ruff-0.8.1.tar.gz", hash = "sha256:3583db9a6450364ed5ca3f3b4225958b24f78178908d5c4bc0f46251ccca898f"}, ] [[package]] From 26152c5af043143e47a0574d3b59621e535e1952 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:43:14 +0000 Subject: [PATCH 008/159] build(deps-dev): bump ruff from 0.8.1 to 0.8.2 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.1 to 0.8.2. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.1...0.8.2) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index 16ef1b4a9c..973f01720b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1432,29 +1432,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.8.1" +version = "0.8.2" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.1-py3-none-linux_armv6l.whl", hash = "sha256:fae0805bd514066f20309f6742f6ee7904a773eb9e6c17c45d6b1600ca65c9b5"}, - {file = "ruff-0.8.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b8a4f7385c2285c30f34b200ca5511fcc865f17578383db154e098150ce0a087"}, - {file = "ruff-0.8.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cd054486da0c53e41e0086e1730eb77d1f698154f910e0cd9e0d64274979a209"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2029b8c22da147c50ae577e621a5bfbc5d1fed75d86af53643d7a7aee1d23871"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2666520828dee7dfc7e47ee4ea0d928f40de72056d929a7c5292d95071d881d1"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:333c57013ef8c97a53892aa56042831c372e0bb1785ab7026187b7abd0135ad5"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:288326162804f34088ac007139488dcb43de590a5ccfec3166396530b58fb89d"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b12c39b9448632284561cbf4191aa1b005882acbc81900ffa9f9f471c8ff7e26"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:364e6674450cbac8e998f7b30639040c99d81dfb5bbc6dfad69bc7a8f916b3d1"}, - {file = "ruff-0.8.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b22346f845fec132aa39cd29acb94451d030c10874408dbf776af3aaeb53284c"}, - {file = "ruff-0.8.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:b2f2f7a7e7648a2bfe6ead4e0a16745db956da0e3a231ad443d2a66a105c04fa"}, - {file = "ruff-0.8.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:adf314fc458374c25c5c4a4a9270c3e8a6a807b1bec018cfa2813d6546215540"}, - {file = "ruff-0.8.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:a885d68342a231b5ba4d30b8c6e1b1ee3a65cf37e3d29b3c74069cdf1ee1e3c9"}, - {file = "ruff-0.8.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d2c16e3508c8cc73e96aa5127d0df8913d2290098f776416a4b157657bee44c5"}, - {file = "ruff-0.8.1-py3-none-win32.whl", hash = "sha256:93335cd7c0eaedb44882d75a7acb7df4b77cd7cd0d2255c93b28791716e81790"}, - {file = "ruff-0.8.1-py3-none-win_amd64.whl", hash = "sha256:2954cdbe8dfd8ab359d4a30cd971b589d335a44d444b6ca2cb3d1da21b75e4b6"}, - {file = "ruff-0.8.1-py3-none-win_arm64.whl", hash = "sha256:55873cc1a473e5ac129d15eccb3c008c096b94809d693fc7053f588b67822737"}, - {file = "ruff-0.8.1.tar.gz", hash = "sha256:3583db9a6450364ed5ca3f3b4225958b24f78178908d5c4bc0f46251ccca898f"}, + {file = "ruff-0.8.2-py3-none-linux_armv6l.whl", hash = "sha256:c49ab4da37e7c457105aadfd2725e24305ff9bc908487a9bf8d548c6dad8bb3d"}, + {file = "ruff-0.8.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ec016beb69ac16be416c435828be702ee694c0d722505f9c1f35e1b9c0cc1bf5"}, + {file = "ruff-0.8.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f05cdf8d050b30e2ba55c9b09330b51f9f97d36d4673213679b965d25a785f3c"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60f578c11feb1d3d257b2fb043ddb47501ab4816e7e221fbb0077f0d5d4e7b6f"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cbd5cf9b0ae8f30eebc7b360171bd50f59ab29d39f06a670b3e4501a36ba5897"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b402ddee3d777683de60ff76da801fa7e5e8a71038f57ee53e903afbcefdaa58"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:705832cd7d85605cb7858d8a13d75993c8f3ef1397b0831289109e953d833d29"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:32096b41aaf7a5cc095fa45b4167b890e4c8d3fd217603f3634c92a541de7248"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e769083da9439508833cfc7c23e351e1809e67f47c50248250ce1ac52c21fb93"}, + {file = "ruff-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fe716592ae8a376c2673fdfc1f5c0c193a6d0411f90a496863c99cd9e2ae25d"}, + {file = "ruff-0.8.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:81c148825277e737493242b44c5388a300584d73d5774defa9245aaef55448b0"}, + {file = "ruff-0.8.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d261d7850c8367704874847d95febc698a950bf061c9475d4a8b7689adc4f7fa"}, + {file = "ruff-0.8.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:1ca4e3a87496dc07d2427b7dd7ffa88a1e597c28dad65ae6433ecb9f2e4f022f"}, + {file = "ruff-0.8.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:729850feed82ef2440aa27946ab39c18cb4a8889c1128a6d589ffa028ddcfc22"}, + {file = "ruff-0.8.2-py3-none-win32.whl", hash = "sha256:ac42caaa0411d6a7d9594363294416e0e48fc1279e1b0e948391695db2b3d5b1"}, + {file = "ruff-0.8.2-py3-none-win_amd64.whl", hash = "sha256:2aae99ec70abf43372612a838d97bfe77d45146254568d94926e8ed5bbb409ea"}, + {file = "ruff-0.8.2-py3-none-win_arm64.whl", hash = "sha256:fb88e2a506b70cfbc2de6fae6681c4f944f7dd5f2fe87233a7233d888bad73e8"}, + {file = "ruff-0.8.2.tar.gz", hash = "sha256:b84f4f414dda8ac7f75075c1fa0b905ac0ff25361f42e6d5da681a465e0f78e5"}, ] [[package]] From 636a0696ea1f76acff94eca16d945845907ee581 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Sun, 25 Aug 2024 03:12:42 +0200 Subject: [PATCH 009/159] feat(commit): allow '-- --allow-empty' to create empty commits Signed-off-by: Adrian DC --- commitizen/commands/commit.py | 8 +++-- tests/commands/test_commit_command.py | 49 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/commitizen/commands/commit.py b/commitizen/commands/commit.py index 9b13a020b6..abecb3b3ca 100644 --- a/commitizen/commands/commit.py +++ b/commitizen/commands/commit.py @@ -93,6 +93,10 @@ def manual_edit(self, message: str) -> str: return message def __call__(self): + extra_args: str = self.arguments.get("extra_cli_args", "") + + allow_empty: bool = "--allow-empty" in extra_args + dry_run: bool = self.arguments.get("dry_run") write_message_to_file: bool = self.arguments.get("write_message_to_file") manual_edit: bool = self.arguments.get("edit") @@ -101,7 +105,7 @@ def __call__(self): if is_all: c = git.add("-u") - if git.is_staging_clean() and not dry_run: + if git.is_staging_clean() and not (dry_run or allow_empty): raise NothingToCommitError("No files added to staging!") if write_message_to_file is not None and write_message_to_file.is_dir(): @@ -137,8 +141,6 @@ def __call__(self): always_signoff: bool = self.config.settings["always_signoff"] signoff: bool = self.arguments.get("signoff") - extra_args = self.arguments.get("extra_cli_args", "") - if signoff: out.warn( "signoff mechanic is deprecated, please use `cz commit -- -s` instead." diff --git a/tests/commands/test_commit_command.py b/tests/commands/test_commit_command.py index 85959abe33..55751f6902 100644 --- a/tests/commands/test_commit_command.py +++ b/tests/commands/test_commit_command.py @@ -324,6 +324,55 @@ def test_commit_when_nothing_to_commit(config, mocker: MockFixture): assert "No files added to staging!" in str(excinfo.value) +@pytest.mark.usefixtures("staging_is_clean") +def test_commit_with_allow_empty(config, mocker: MockFixture): + prompt_mock = mocker.patch("questionary.prompt") + prompt_mock.return_value = { + "prefix": "feat", + "subject": "user created", + "scope": "", + "is_breaking_change": False, + "body": "closes #21", + "footer": "", + } + + commit_mock = mocker.patch("commitizen.git.commit") + commit_mock.return_value = cmd.Command("success", "", b"", b"", 0) + success_mock = mocker.patch("commitizen.out.success") + + commands.Commit(config, {"extra_cli_args": "--allow-empty"})() + + commit_mock.assert_called_with( + "feat: user created\n\ncloses #21", args="--allow-empty" + ) + success_mock.assert_called_once() + + +@pytest.mark.usefixtures("staging_is_clean") +def test_commit_with_signoff_and_allow_empty(config, mocker: MockFixture): + prompt_mock = mocker.patch("questionary.prompt") + prompt_mock.return_value = { + "prefix": "feat", + "subject": "user created", + "scope": "", + "is_breaking_change": False, + "body": "closes #21", + "footer": "", + } + + commit_mock = mocker.patch("commitizen.git.commit") + commit_mock.return_value = cmd.Command("success", "", b"", b"", 0) + success_mock = mocker.patch("commitizen.out.success") + + config.settings["always_signoff"] = True + commands.Commit(config, {"extra_cli_args": "--allow-empty"})() + + commit_mock.assert_called_with( + "feat: user created\n\ncloses #21", args="--allow-empty -s" + ) + success_mock.assert_called_once() + + @pytest.mark.usefixtures("staging_is_clean") def test_commit_when_customized_expected_raised(config, mocker: MockFixture, capsys): _err = ValueError() From 27499d727f5ceff802bda34bbda314644824ce06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Dec 2024 15:13:16 +0000 Subject: [PATCH 010/159] =?UTF-8?q?bump:=20version=204.0.0=20=E2=86=92=204?= =?UTF-8?q?.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 52049e967f..986b63f875 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.0.0 # automatically updated by Commitizen + rev: v4.1.0 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index c6556ab016..858f7d7181 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.1.0 (2024-12-06) + +### Feat + +- **commit**: allow '-- --allow-empty' to create empty commits + ## v4.0.0 (2024-11-26) ## v3.31.0 (2024-11-16) diff --git a/commitizen/__version__.py b/commitizen/__version__.py index ce1305bf4e..7039708762 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.0.0" +__version__ = "4.1.0" diff --git a/pyproject.toml b/pyproject.toml index 8737b86f28..e1b884f479 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.commitizen] -version = "4.0.0" +version = "4.1.0" tag_format = "v$version" version_files = [ "pyproject.toml:version", @@ -9,7 +9,7 @@ version_files = [ [tool.poetry] name = "commitizen" -version = "4.0.0" +version = "4.1.0" description = "Python commitizen client tool" authors = ["Santiago Fraire "] license = "MIT" From 2eda7dd90b40498f61ca63009a5f907ee56513c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 01:34:36 +0000 Subject: [PATCH 011/159] build(deps-dev): bump types-python-dateutil Bumps [types-python-dateutil](https://github.com/python/typeshed) from 2.9.0.20241003 to 2.9.0.20241206. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-python-dateutil dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 973f01720b..78da53d281 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1551,13 +1551,13 @@ files = [ [[package]] name = "types-python-dateutil" -version = "2.9.0.20241003" +version = "2.9.0.20241206" description = "Typing stubs for python-dateutil" optional = false python-versions = ">=3.8" files = [ - {file = "types-python-dateutil-2.9.0.20241003.tar.gz", hash = "sha256:58cb85449b2a56d6684e41aeefb4c4280631246a0da1a719bdbe6f3fb0317446"}, - {file = "types_python_dateutil-2.9.0.20241003-py3-none-any.whl", hash = "sha256:250e1d8e80e7bbc3a6c99b907762711d1a1cdd00e978ad39cb5940f6f0a87f3d"}, + {file = "types_python_dateutil-2.9.0.20241206-py3-none-any.whl", hash = "sha256:e248a4bc70a486d3e3ec84d0dc30eec3a5f979d6e7ee4123ae043eedbb987f53"}, + {file = "types_python_dateutil-2.9.0.20241206.tar.gz", hash = "sha256:18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb"}, ] [[package]] From ec9e911a690aa7b11ceae3d0b6c63ae9b6736825 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 01:34:55 +0000 Subject: [PATCH 012/159] build(deps): bump argcomplete from 3.5.1 to 3.5.2 Bumps [argcomplete](https://github.com/kislyuk/argcomplete) from 3.5.1 to 3.5.2. - [Release notes](https://github.com/kislyuk/argcomplete/releases) - [Changelog](https://github.com/kislyuk/argcomplete/blob/develop/Changes.rst) - [Commits](https://github.com/kislyuk/argcomplete/compare/v3.5.1...v3.5.2) --- updated-dependencies: - dependency-name: argcomplete dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 78da53d281..7cd09373f8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "argcomplete" -version = "3.5.1" +version = "3.5.2" description = "Bash tab completion for argparse" optional = false python-versions = ">=3.8" files = [ - {file = "argcomplete-3.5.1-py3-none-any.whl", hash = "sha256:1a1d148bdaa3e3b93454900163403df41448a248af01b6e849edc5ac08e6c363"}, - {file = "argcomplete-3.5.1.tar.gz", hash = "sha256:eb1ee355aa2557bd3d0145de7b06b2a45b0ce461e1e7813f5d066039ab4177b4"}, + {file = "argcomplete-3.5.2-py3-none-any.whl", hash = "sha256:036d020d79048a5d525bc63880d7a4b8d1668566b8a76daf1144c0bbe0f63472"}, + {file = "argcomplete-3.5.2.tar.gz", hash = "sha256:23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb"}, ] [package.extras] From a60407addee791eef67cca7e6ca91b9bea565de0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:43:24 +0100 Subject: [PATCH 013/159] build(deps-dev): bump pytest-freezer from 0.4.8 to 0.4.9 (#1311) Bumps [pytest-freezer](https://github.com/pytest-dev/pytest-freezer) from 0.4.8 to 0.4.9. - [Release notes](https://github.com/pytest-dev/pytest-freezer/releases) - [Commits](https://github.com/pytest-dev/pytest-freezer/compare/0.4.8...0.4.9) --- updated-dependencies: - dependency-name: pytest-freezer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7cd09373f8..9a384ddc37 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "argcomplete" @@ -1111,17 +1111,17 @@ pytest = ">=5.0" [[package]] name = "pytest-freezer" -version = "0.4.8" +version = "0.4.9" description = "Pytest plugin providing a fixture interface for spulec/freezegun" optional = false -python-versions = ">= 3.6" +python-versions = ">=3.6" files = [ - {file = "pytest_freezer-0.4.8-py3-none-any.whl", hash = "sha256:644ce7ddb8ba52b92a1df0a80a699bad2b93514c55cf92e9f2517b68ebe74814"}, - {file = "pytest_freezer-0.4.8.tar.gz", hash = "sha256:8ee2f724b3ff3540523fa355958a22e6f4c1c819928b78a7a183ae4248ce6ee6"}, + {file = "pytest_freezer-0.4.9-py3-none-any.whl", hash = "sha256:8b6c50523b7d4aec4590b52bfa5ff766d772ce506e2bf4846c88041ea9ccae59"}, + {file = "pytest_freezer-0.4.9.tar.gz", hash = "sha256:21bf16bc9cc46bf98f94382c4b5c3c389be7056ff0be33029111ae11b3f1c82a"}, ] [package.dependencies] -freezegun = ">=1.0" +freezegun = ">=1.1" pytest = ">=3.6" [[package]] From 166e634a4e29e6450d103249b54eff16c3d075ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:44:15 +0100 Subject: [PATCH 014/159] build(deps-dev): bump ruff from 0.8.2 to 0.8.3 (#1310) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.2 to 0.8.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.2...0.8.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index 9a384ddc37..2f571b012d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1432,29 +1432,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.8.2" +version = "0.8.3" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.2-py3-none-linux_armv6l.whl", hash = "sha256:c49ab4da37e7c457105aadfd2725e24305ff9bc908487a9bf8d548c6dad8bb3d"}, - {file = "ruff-0.8.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ec016beb69ac16be416c435828be702ee694c0d722505f9c1f35e1b9c0cc1bf5"}, - {file = "ruff-0.8.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:f05cdf8d050b30e2ba55c9b09330b51f9f97d36d4673213679b965d25a785f3c"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60f578c11feb1d3d257b2fb043ddb47501ab4816e7e221fbb0077f0d5d4e7b6f"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cbd5cf9b0ae8f30eebc7b360171bd50f59ab29d39f06a670b3e4501a36ba5897"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b402ddee3d777683de60ff76da801fa7e5e8a71038f57ee53e903afbcefdaa58"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:705832cd7d85605cb7858d8a13d75993c8f3ef1397b0831289109e953d833d29"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:32096b41aaf7a5cc095fa45b4167b890e4c8d3fd217603f3634c92a541de7248"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e769083da9439508833cfc7c23e351e1809e67f47c50248250ce1ac52c21fb93"}, - {file = "ruff-0.8.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fe716592ae8a376c2673fdfc1f5c0c193a6d0411f90a496863c99cd9e2ae25d"}, - {file = "ruff-0.8.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:81c148825277e737493242b44c5388a300584d73d5774defa9245aaef55448b0"}, - {file = "ruff-0.8.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d261d7850c8367704874847d95febc698a950bf061c9475d4a8b7689adc4f7fa"}, - {file = "ruff-0.8.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:1ca4e3a87496dc07d2427b7dd7ffa88a1e597c28dad65ae6433ecb9f2e4f022f"}, - {file = "ruff-0.8.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:729850feed82ef2440aa27946ab39c18cb4a8889c1128a6d589ffa028ddcfc22"}, - {file = "ruff-0.8.2-py3-none-win32.whl", hash = "sha256:ac42caaa0411d6a7d9594363294416e0e48fc1279e1b0e948391695db2b3d5b1"}, - {file = "ruff-0.8.2-py3-none-win_amd64.whl", hash = "sha256:2aae99ec70abf43372612a838d97bfe77d45146254568d94926e8ed5bbb409ea"}, - {file = "ruff-0.8.2-py3-none-win_arm64.whl", hash = "sha256:fb88e2a506b70cfbc2de6fae6681c4f944f7dd5f2fe87233a7233d888bad73e8"}, - {file = "ruff-0.8.2.tar.gz", hash = "sha256:b84f4f414dda8ac7f75075c1fa0b905ac0ff25361f42e6d5da681a465e0f78e5"}, + {file = "ruff-0.8.3-py3-none-linux_armv6l.whl", hash = "sha256:8d5d273ffffff0acd3db5bf626d4b131aa5a5ada1276126231c4174543ce20d6"}, + {file = "ruff-0.8.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e4d66a21de39f15c9757d00c50c8cdd20ac84f55684ca56def7891a025d7e939"}, + {file = "ruff-0.8.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c356e770811858bd20832af696ff6c7e884701115094f427b64b25093d6d932d"}, + {file = "ruff-0.8.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c0a60a825e3e177116c84009d5ebaa90cf40dfab56e1358d1df4e29a9a14b13"}, + {file = "ruff-0.8.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:75fb782f4db39501210ac093c79c3de581d306624575eddd7e4e13747e61ba18"}, + {file = "ruff-0.8.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f26bc76a133ecb09a38b7868737eded6941b70a6d34ef53a4027e83913b6502"}, + {file = "ruff-0.8.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:01b14b2f72a37390c1b13477c1c02d53184f728be2f3ffc3ace5b44e9e87b90d"}, + {file = "ruff-0.8.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:53babd6e63e31f4e96ec95ea0d962298f9f0d9cc5990a1bbb023a6baf2503a82"}, + {file = "ruff-0.8.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ae441ce4cf925b7f363d33cd6570c51435972d697e3e58928973994e56e1452"}, + {file = "ruff-0.8.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7c65bc0cadce32255e93c57d57ecc2cca23149edd52714c0c5d6fa11ec328cd"}, + {file = "ruff-0.8.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5be450bb18f23f0edc5a4e5585c17a56ba88920d598f04a06bd9fd76d324cb20"}, + {file = "ruff-0.8.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8faeae3827eaa77f5721f09b9472a18c749139c891dbc17f45e72d8f2ca1f8fc"}, + {file = "ruff-0.8.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:db503486e1cf074b9808403991663e4277f5c664d3fe237ee0d994d1305bb060"}, + {file = "ruff-0.8.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:6567be9fb62fbd7a099209257fef4ad2c3153b60579818b31a23c886ed4147ea"}, + {file = "ruff-0.8.3-py3-none-win32.whl", hash = "sha256:19048f2f878f3ee4583fc6cb23fb636e48c2635e30fb2022b3a1cd293402f964"}, + {file = "ruff-0.8.3-py3-none-win_amd64.whl", hash = "sha256:f7df94f57d7418fa7c3ffb650757e0c2b96cf2501a0b192c18e4fb5571dfada9"}, + {file = "ruff-0.8.3-py3-none-win_arm64.whl", hash = "sha256:fe2756edf68ea79707c8d68b78ca9a58ed9af22e430430491ee03e718b5e4936"}, + {file = "ruff-0.8.3.tar.gz", hash = "sha256:5e7558304353b84279042fc584a4f4cb8a07ae79b2bf3da1a7551d960b5626d3"}, ] [[package]] From 069c503eb56cf1f07eb1eead6446511bc05fd8e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 20:44:58 +0100 Subject: [PATCH 015/159] build(deps-dev): bump mkdocs-material from 9.5.47 to 9.5.48 (#1309) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.47 to 9.5.48. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.47...9.5.48) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2f571b012d..23a33ed85b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -756,13 +756,13 @@ pyyaml = ">=5.1" [[package]] name = "mkdocs-material" -version = "9.5.47" +version = "9.5.48" description = "Documentation that simply works" optional = false python-versions = ">=3.8" files = [ - {file = "mkdocs_material-9.5.47-py3-none-any.whl", hash = "sha256:53fb9c9624e7865da6ec807d116cd7be24b3cb36ab31b1d1d1a9af58c56009a2"}, - {file = "mkdocs_material-9.5.47.tar.gz", hash = "sha256:fc3b7a8e00ad896660bd3a5cc12ca0cb28bdc2bcbe2a946b5714c23ac91b0ede"}, + {file = "mkdocs_material-9.5.48-py3-none-any.whl", hash = "sha256:b695c998f4b939ce748adbc0d3bff73fa886a670ece948cf27818fa115dc16f8"}, + {file = "mkdocs_material-9.5.48.tar.gz", hash = "sha256:a582531e8b34f4c7ed38c29d5c44763053832cf2a32f7409567e0c74749a47db"}, ] [package.dependencies] From c1ec4d9b6efa2661e5298aa1930323e096de4820 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:11:07 +0100 Subject: [PATCH 016/159] build(deps-dev): bump ruff from 0.8.3 to 0.8.4 (#1314) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index 23a33ed85b..a302b921b5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1432,29 +1432,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.8.3" +version = "0.8.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.3-py3-none-linux_armv6l.whl", hash = "sha256:8d5d273ffffff0acd3db5bf626d4b131aa5a5ada1276126231c4174543ce20d6"}, - {file = "ruff-0.8.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e4d66a21de39f15c9757d00c50c8cdd20ac84f55684ca56def7891a025d7e939"}, - {file = "ruff-0.8.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c356e770811858bd20832af696ff6c7e884701115094f427b64b25093d6d932d"}, - {file = "ruff-0.8.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c0a60a825e3e177116c84009d5ebaa90cf40dfab56e1358d1df4e29a9a14b13"}, - {file = "ruff-0.8.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:75fb782f4db39501210ac093c79c3de581d306624575eddd7e4e13747e61ba18"}, - {file = "ruff-0.8.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f26bc76a133ecb09a38b7868737eded6941b70a6d34ef53a4027e83913b6502"}, - {file = "ruff-0.8.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:01b14b2f72a37390c1b13477c1c02d53184f728be2f3ffc3ace5b44e9e87b90d"}, - {file = "ruff-0.8.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:53babd6e63e31f4e96ec95ea0d962298f9f0d9cc5990a1bbb023a6baf2503a82"}, - {file = "ruff-0.8.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ae441ce4cf925b7f363d33cd6570c51435972d697e3e58928973994e56e1452"}, - {file = "ruff-0.8.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7c65bc0cadce32255e93c57d57ecc2cca23149edd52714c0c5d6fa11ec328cd"}, - {file = "ruff-0.8.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5be450bb18f23f0edc5a4e5585c17a56ba88920d598f04a06bd9fd76d324cb20"}, - {file = "ruff-0.8.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8faeae3827eaa77f5721f09b9472a18c749139c891dbc17f45e72d8f2ca1f8fc"}, - {file = "ruff-0.8.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:db503486e1cf074b9808403991663e4277f5c664d3fe237ee0d994d1305bb060"}, - {file = "ruff-0.8.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:6567be9fb62fbd7a099209257fef4ad2c3153b60579818b31a23c886ed4147ea"}, - {file = "ruff-0.8.3-py3-none-win32.whl", hash = "sha256:19048f2f878f3ee4583fc6cb23fb636e48c2635e30fb2022b3a1cd293402f964"}, - {file = "ruff-0.8.3-py3-none-win_amd64.whl", hash = "sha256:f7df94f57d7418fa7c3ffb650757e0c2b96cf2501a0b192c18e4fb5571dfada9"}, - {file = "ruff-0.8.3-py3-none-win_arm64.whl", hash = "sha256:fe2756edf68ea79707c8d68b78ca9a58ed9af22e430430491ee03e718b5e4936"}, - {file = "ruff-0.8.3.tar.gz", hash = "sha256:5e7558304353b84279042fc584a4f4cb8a07ae79b2bf3da1a7551d960b5626d3"}, + {file = "ruff-0.8.4-py3-none-linux_armv6l.whl", hash = "sha256:58072f0c06080276804c6a4e21a9045a706584a958e644353603d36ca1eb8a60"}, + {file = "ruff-0.8.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ffb60904651c00a1e0b8df594591770018a0f04587f7deeb3838344fe3adabac"}, + {file = "ruff-0.8.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:6ddf5d654ac0d44389f6bf05cee4caeefc3132a64b58ea46738111d687352296"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e248b1f0fa2749edd3350a2a342b67b43a2627434c059a063418e3d375cfe643"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf197b98ed86e417412ee3b6c893f44c8864f816451441483253d5ff22c0e81e"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c41319b85faa3aadd4d30cb1cffdd9ac6b89704ff79f7664b853785b48eccdf3"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9f8402b7c4f96463f135e936d9ab77b65711fcd5d72e5d67597b543bbb43cf3f"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4e56b3baa9c23d324ead112a4fdf20db9a3f8f29eeabff1355114dd96014604"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:736272574e97157f7edbbb43b1d046125fce9e7d8d583d5d65d0c9bf2c15addf"}, + {file = "ruff-0.8.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fe710ab6061592521f902fca7ebcb9fabd27bc7c57c764298b1c1f15fff720"}, + {file = "ruff-0.8.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:13e9ec6d6b55f6da412d59953d65d66e760d583dd3c1c72bf1f26435b5bfdbae"}, + {file = "ruff-0.8.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:97d9aefef725348ad77d6db98b726cfdb075a40b936c7984088804dfd38268a7"}, + {file = "ruff-0.8.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ab78e33325a6f5374e04c2ab924a3367d69a0da36f8c9cb6b894a62017506111"}, + {file = "ruff-0.8.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:8ef06f66f4a05c3ddbc9121a8b0cecccd92c5bf3dd43b5472ffe40b8ca10f0f8"}, + {file = "ruff-0.8.4-py3-none-win32.whl", hash = "sha256:552fb6d861320958ca5e15f28b20a3d071aa83b93caee33a87b471f99a6c0835"}, + {file = "ruff-0.8.4-py3-none-win_amd64.whl", hash = "sha256:f21a1143776f8656d7f364bd264a9d60f01b7f52243fbe90e7670c0dfe0cf65d"}, + {file = "ruff-0.8.4-py3-none-win_arm64.whl", hash = "sha256:9183dd615d8df50defa8b1d9a074053891ba39025cf5ae88e8bcb52edcc4bf08"}, + {file = "ruff-0.8.4.tar.gz", hash = "sha256:0d5f89f254836799af1615798caa5f80b7f935d7a670fad66c5007928e57ace8"}, ] [[package]] From 32271c143d711b77d26a1e7208701aafc5bfaabe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:11:59 +0100 Subject: [PATCH 017/159] build(deps-dev): bump pytest-regressions from 2.5.0 to 2.6.0 (#1313) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index a302b921b5..fcc4896ff1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1143,13 +1143,13 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] [[package]] name = "pytest-regressions" -version = "2.5.0" +version = "2.6.0" description = "Easy to use fixtures to write regression tests." optional = false python-versions = ">=3.8" files = [ - {file = "pytest-regressions-2.5.0.tar.gz", hash = "sha256:818c7884c1cff3babf89eebb02cbc27b307856b1985427c24d52cb812a106fd9"}, - {file = "pytest_regressions-2.5.0-py3-none-any.whl", hash = "sha256:8c4e5c4037325fdb0825bc1fdcb75e17e03adf3407049f0cb704bb996d496255"}, + {file = "pytest_regressions-2.6.0-py3-none-any.whl", hash = "sha256:5c4a4763415f765770449190097a99b3a8a6ebf20b24e6d90a32da6644e5d041"}, + {file = "pytest_regressions-2.6.0.tar.gz", hash = "sha256:e3dce521fac11199a2a91a1b8837974d708c7e8665b8c9668b3a721b556c8183"}, ] [package.dependencies] @@ -1159,7 +1159,7 @@ pyyaml = "*" [package.extras] dataframe = ["numpy", "pandas"] -dev = ["matplotlib", "mypy", "numpy", "pandas", "pillow", "pre-commit", "restructuredtext-lint", "tox"] +dev = ["matplotlib", "mypy", "numpy", "pandas", "pillow", "pre-commit", "pyarrow", "restructuredtext-lint", "tox"] image = ["numpy", "pillow"] num = ["numpy", "pandas"] From d335cdf753512c17f281866332868de513c87ddc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:12:39 +0100 Subject: [PATCH 018/159] build(deps-dev): bump mkdocs-material from 9.5.48 to 9.5.49 (#1312) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index fcc4896ff1..5d45dcf0f8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -756,13 +756,13 @@ pyyaml = ">=5.1" [[package]] name = "mkdocs-material" -version = "9.5.48" +version = "9.5.49" description = "Documentation that simply works" optional = false python-versions = ">=3.8" files = [ - {file = "mkdocs_material-9.5.48-py3-none-any.whl", hash = "sha256:b695c998f4b939ce748adbc0d3bff73fa886a670ece948cf27818fa115dc16f8"}, - {file = "mkdocs_material-9.5.48.tar.gz", hash = "sha256:a582531e8b34f4c7ed38c29d5c44763053832cf2a32f7409567e0c74749a47db"}, + {file = "mkdocs_material-9.5.49-py3-none-any.whl", hash = "sha256:c3c2d8176b18198435d3a3e119011922f3e11424074645c24019c2dcf08a360e"}, + {file = "mkdocs_material-9.5.49.tar.gz", hash = "sha256:3671bb282b4f53a1c72e08adbe04d2481a98f85fed392530051f80ff94a9621d"}, ] [package.dependencies] From 218a32e7981104086b1c99e0da655c3477bd73e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 01:51:12 +0000 Subject: [PATCH 019/159] build(deps): bump jinja2 from 3.1.4 to 3.1.5 Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5d45dcf0f8..1a2acc0446 100644 --- a/poetry.lock +++ b/poetry.lock @@ -543,13 +543,13 @@ testing = ["Django", "attrs", "colorama", "docopt", "pytest (<9.0.0)"] [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, + {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, + {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, ] [package.dependencies] From a699f647426c6c7f5a5b9e859a50bcf7cf330ca8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 01:51:32 +0000 Subject: [PATCH 020/159] build(deps-dev): bump mypy from 1.13.0 to 1.14.0 Bumps [mypy](https://github.com/python/mypy) from 1.13.0 to 1.14.0. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 70 ++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/poetry.lock b/poetry.lock index 1a2acc0446..d926888c18 100644 --- a/poetry.lock +++ b/poetry.lock @@ -796,49 +796,49 @@ files = [ [[package]] name = "mypy" -version = "1.13.0" +version = "1.14.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"}, - {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"}, - {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"}, - {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"}, - {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"}, - {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"}, - {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"}, - {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"}, - {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"}, - {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"}, - {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"}, - {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"}, - {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"}, - {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"}, - {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"}, - {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, - {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, - {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, - {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, - {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, - {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"}, - {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"}, - {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"}, - {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"}, - {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"}, - {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"}, - {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"}, - {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"}, - {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"}, - {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"}, - {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, - {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, + {file = "mypy-1.14.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e971c1c667007f9f2b397ffa80fa8e1e0adccff336e5e77e74cb5f22868bee87"}, + {file = "mypy-1.14.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e86aaeaa3221a278c66d3d673b297232947d873773d61ca3ee0e28b2ff027179"}, + {file = "mypy-1.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1628c5c3ce823d296e41e2984ff88c5861499041cb416a8809615d0c1f41740e"}, + {file = "mypy-1.14.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7fadb29b77fc14a0dd81304ed73c828c3e5cde0016c7e668a86a3e0dfc9f3af3"}, + {file = "mypy-1.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:3fa76988dc760da377c1e5069200a50d9eaaccf34f4ea18428a3337034ab5a44"}, + {file = "mypy-1.14.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6e73c8a154eed31db3445fe28f63ad2d97b674b911c00191416cf7f6459fd49a"}, + {file = "mypy-1.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:273e70fcb2e38c5405a188425aa60b984ffdcef65d6c746ea5813024b68c73dc"}, + {file = "mypy-1.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1daca283d732943731a6a9f20fdbcaa927f160bc51602b1d4ef880a6fb252015"}, + {file = "mypy-1.14.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7e68047bedb04c1c25bba9901ea46ff60d5eaac2d71b1f2161f33107e2b368eb"}, + {file = "mypy-1.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:7a52f26b9c9b1664a60d87675f3bae00b5c7f2806e0c2800545a32c325920bcc"}, + {file = "mypy-1.14.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d5326ab70a6db8e856d59ad4cb72741124950cbbf32e7b70e30166ba7bbf61dd"}, + {file = "mypy-1.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bf4ec4980bec1e0e24e5075f449d014011527ae0055884c7e3abc6a99cd2c7f1"}, + {file = "mypy-1.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:390dfb898239c25289495500f12fa73aa7f24a4c6d90ccdc165762462b998d63"}, + {file = "mypy-1.14.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7e026d55ddcd76e29e87865c08cbe2d0104e2b3153a523c529de584759379d3d"}, + {file = "mypy-1.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:585ed36031d0b3ee362e5107ef449a8b5dfd4e9c90ccbe36414ee405ee6b32ba"}, + {file = "mypy-1.14.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9f6f4c0b27401d14c483c622bc5105eff3911634d576bbdf6695b9a7c1ba741"}, + {file = "mypy-1.14.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56b2280cedcb312c7a79f5001ae5325582d0d339bce684e4a529069d0e7ca1e7"}, + {file = "mypy-1.14.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:342de51c48bab326bfc77ce056ba08c076d82ce4f5a86621f972ed39970f94d8"}, + {file = "mypy-1.14.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:00df23b42e533e02a6f0055e54de9a6ed491cd8b7ea738647364fd3a39ea7efc"}, + {file = "mypy-1.14.0-cp313-cp313-win_amd64.whl", hash = "sha256:e8c8387e5d9dff80e7daf961df357c80e694e942d9755f3ad77d69b0957b8e3f"}, + {file = "mypy-1.14.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b16738b1d80ec4334654e89e798eb705ac0c36c8a5c4798496cd3623aa02286"}, + {file = "mypy-1.14.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:10065fcebb7c66df04b05fc799a854b1ae24d9963c8bb27e9064a9bdb43aa8ad"}, + {file = "mypy-1.14.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fbb7d683fa6bdecaa106e8368aa973ecc0ddb79a9eaeb4b821591ecd07e9e03c"}, + {file = "mypy-1.14.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:3498cb55448dc5533e438cd13d6ddd28654559c8c4d1fd4b5ca57a31b81bac01"}, + {file = "mypy-1.14.0-cp38-cp38-win_amd64.whl", hash = "sha256:c7b243408ea43755f3a21a0a08e5c5ae30eddb4c58a80f415ca6b118816e60aa"}, + {file = "mypy-1.14.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:14117b9da3305b39860d0aa34b8f1ff74d209a368829a584eb77524389a9c13e"}, + {file = "mypy-1.14.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:af98c5a958f9c37404bd4eef2f920b94874507e146ed6ee559f185b8809c44cc"}, + {file = "mypy-1.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0b343a1d3989547024377c2ba0dca9c74a2428ad6ed24283c213af8dbb0710b"}, + {file = "mypy-1.14.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cdb5563c1726c85fb201be383168f8c866032db95e1095600806625b3a648cb7"}, + {file = "mypy-1.14.0-cp39-cp39-win_amd64.whl", hash = "sha256:74e925649c1ee0a79aa7448baf2668d81cc287dc5782cff6a04ee93f40fb8d3f"}, + {file = "mypy-1.14.0-py3-none-any.whl", hash = "sha256:2238d7f93fc4027ed1efc944507683df3ba406445a2b6c96e79666a045aadfab"}, + {file = "mypy-1.14.0.tar.gz", hash = "sha256:822dbd184d4a9804df5a7d5335a68cf7662930e70b8c1bc976645d1509f9a9d6"}, ] [package.dependencies] -mypy-extensions = ">=1.0.0" +mypy_extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.6.0" +typing_extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] From c2aaff4569fd16da9ac6e4ba262171b1072c6927 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 01:51:46 +0000 Subject: [PATCH 021/159] build(deps-dev): bump types-pyyaml Bumps [types-pyyaml](https://github.com/python/typeshed) from 6.0.12.20240917 to 6.0.12.20241221. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-pyyaml dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index d926888c18..57e8390ca0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1562,13 +1562,13 @@ files = [ [[package]] name = "types-pyyaml" -version = "6.0.12.20240917" +version = "6.0.12.20241221" description = "Typing stubs for PyYAML" optional = false python-versions = ">=3.8" files = [ - {file = "types-PyYAML-6.0.12.20240917.tar.gz", hash = "sha256:d1405a86f9576682234ef83bcb4e6fff7c9305c8b1fbad5e0bcd4f7dbdc9c587"}, - {file = "types_PyYAML-6.0.12.20240917-py3-none-any.whl", hash = "sha256:392b267f1c0fe6022952462bf5d6523f31e37f6cea49b14cee7ad634b6301570"}, + {file = "types_PyYAML-6.0.12.20241221-py3-none-any.whl", hash = "sha256:0657a4ff8411a030a2116a196e8e008ea679696b5b1a8e1a6aa8ebb737b34688"}, + {file = "types_pyyaml-6.0.12.20241221.tar.gz", hash = "sha256:4f149aa893ff6a46889a30af4c794b23833014c469cc57cbc3ad77498a58996f"}, ] [[package]] From 7a8907151df7fa8611b066fc51735e289eff8d57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2024 02:00:39 +0000 Subject: [PATCH 022/159] build(deps): bump charset-normalizer from 3.4.0 to 3.4.1 Bumps [charset-normalizer](https://github.com/jawah/charset_normalizer) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/jawah/charset_normalizer/releases) - [Changelog](https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md) - [Commits](https://github.com/jawah/charset_normalizer/compare/3.4.0...3.4.1) --- updated-dependencies: - dependency-name: charset-normalizer dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 203 ++++++++++++++++++++++++---------------------------- 1 file changed, 95 insertions(+), 108 deletions(-) diff --git a/poetry.lock b/poetry.lock index 57e8390ca0..b9d5210294 100644 --- a/poetry.lock +++ b/poetry.lock @@ -70,116 +70,103 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.4.0" +version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false -python-versions = ">=3.7.0" -files = [ - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"}, - {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"}, - {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"}, - {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"}, - {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"}, - {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"}, - {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"}, - {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"}, - {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"}, - {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"}, +python-versions = ">=3.7" +files = [ + {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e218488cd232553829be0664c2292d3af2eeeb94b32bea483cf79ac6a694e037"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80ed5e856eb7f30115aaf94e4a08114ccc8813e6ed1b5efa74f9f82e8509858f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b010a7a4fd316c3c484d482922d13044979e78d1861f0e0650423144c616a46a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4532bff1b8421fd0a320463030c7520f56a79c9024a4e88f01c537316019005a"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d973f03c0cb71c5ed99037b870f2be986c3c05e63622c017ea9816881d2dd247"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3a3bd0dcd373514dcec91c411ddb9632c0d7d92aed7093b8c3bbb6d69ca74408"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9c3cdf5390dcd29aa8056d13e8e99526cda0305acc038b96b30352aff5ff2bb"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2bdfe3ac2e1bbe5b59a1a63721eb3b95fc9b6817ae4a46debbb4e11f6232428d"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:eab677309cdb30d047996b36d34caeda1dc91149e4fdca0b1a039b3f79d9a807"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win32.whl", hash = "sha256:c0429126cf75e16c4f0ad00ee0eae4242dc652290f940152ca8c75c3a4b6ee8f"}, + {file = "charset_normalizer-3.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:9f0b8b1c6d84c8034a44893aba5e767bf9c7a211e313a9605d9c617d7083829f"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win32.whl", hash = "sha256:8417cb1f36cc0bc7eaba8ccb0e04d55f0ee52df06df3ad55259b9a323555fc8b"}, + {file = "charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7f50a1f8c450f3925cb367d011448c39239bb3eb4117c36a6d354794de4ce76"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:73d94b58ec7fecbc7366247d3b0b10a21681004153238750bb67bd9012414545"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad3e487649f498dd991eeb901125411559b22e8d7ab25d3aeb1af367df5efd7"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c30197aa96e8eed02200a83fba2657b4c3acd0f0aa4bdc9f6c1af8e8962e0757"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2369eea1ee4a7610a860d88f268eb39b95cb588acd7235e02fd5a5601773d4fa"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc2722592d8998c870fa4e290c2eec2c1569b87fe58618e67d38b4665dfa680d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffc9202a29ab3920fa812879e95a9e78b2465fd10be7fcbd042899695d75e616"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:804a4d582ba6e5b747c625bf1255e6b1507465494a40a2130978bda7b932c90b"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f55e69f030f7163dffe9fd0752b32f070566451afe180f99dbeeb81f511ad8d"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:c4c3e6da02df6fa1410a7680bd3f63d4f710232d3139089536310d027950696a"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:5df196eb874dae23dcfb968c83d4f8fdccb333330fe1fc278ac5ceeb101003a9"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:e358e64305fe12299a08e08978f51fc21fac060dcfcddd95453eabe5b93ed0e1"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win32.whl", hash = "sha256:9b23ca7ef998bc739bf6ffc077c2116917eabcc901f88da1b9856b210ef63f35"}, + {file = "charset_normalizer-3.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ff8a4a60c227ad87030d76e99cd1698345d4491638dfa6673027c48b3cd395f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:aabfa34badd18f1da5ec1bc2715cadc8dca465868a4e73a0173466b688f29dda"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22e14b5d70560b8dd51ec22863f370d1e595ac3d024cb8ad7d308b4cd95f8313"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8436c508b408b82d87dc5f62496973a1805cd46727c34440b0d29d8a2f50a6c9"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2d074908e1aecee37a7635990b2c6d504cd4766c7bc9fc86d63f9c09af3fa11b"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:955f8851919303c92343d2f66165294848d57e9bba6cf6e3625485a70a038d11"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:44ecbf16649486d4aebafeaa7ec4c9fed8b88101f4dd612dcaf65d5e815f837f"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:0924e81d3d5e70f8126529951dac65c1010cdf117bb75eb02dd12339b57749dd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2967f74ad52c3b98de4c3b32e1a44e32975e008a9cd2a8cc8966d6a5218c5cb2"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:c75cb2a3e389853835e84a2d8fb2b81a10645b503eca9bcb98df6b5a43eb8886"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09b26ae6b1abf0d27570633b2b078a2a20419c99d66fb2823173d73f188ce601"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa88b843d6e211393a37219e6a1c1df99d35e8fd90446f1118f4216e307e48cd"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win32.whl", hash = "sha256:eb8178fe3dba6450a3e024e95ac49ed3400e506fd4e9e5c32d30adda88cbd407"}, + {file = "charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:b1ac5992a838106edb89654e0aebfc24f5848ae2547d22c2c3f66454daa11971"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30bf9fd9be89ecb2360c7d94a711f00c09b976258846efe40db3d05828e8089"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97f68b8d6831127e4787ad15e6757232e14e12060bec17091b85eb1486b91d8d"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7974a0b5ecd505609e3b19742b60cee7aa2aa2fb3151bc917e6e2646d7667dcf"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc54db6c8593ef7d4b2a331b58653356cf04f67c960f584edb7c3d8c97e8f39e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:311f30128d7d333eebd7896965bfcfbd0065f1716ec92bd5638d7748eb6f936a"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7d053096f67cd1241601111b698f5cad775f97ab25d81567d3f59219b5f1adbd"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:807f52c1f798eef6cf26beb819eeb8819b1622ddfeef9d0977a8502d4db6d534"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:dccbe65bd2f7f7ec22c4ff99ed56faa1e9f785482b9bbd7c717e26fd723a1d1e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:2fb9bd477fdea8684f78791a6de97a953c51831ee2981f8e4f583ff3b9d9687e"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:01732659ba9b5b873fc117534143e4feefecf3b2078b0a6a2e925271bb6f4cfa"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win32.whl", hash = "sha256:7a4f97a081603d2050bfaffdefa5b02a9ec823f8348a572e39032caa8404a487"}, + {file = "charset_normalizer-3.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:7b1bef6280950ee6c177b326508f86cad7ad4dff12454483b51d8b7d673a2c5d"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ecddf25bee22fe4fe3737a399d0d177d72bc22be6913acfab364b40bce1ba83c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c60ca7339acd497a55b0ea5d506b2a2612afb2826560416f6894e8b5770d4a9"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b7b2d86dd06bfc2ade3312a83a5c364c7ec2e3498f8734282c6c3d4b07b346b8"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dd78cfcda14a1ef52584dbb008f7ac81c1328c0f58184bf9a84c49c605002da6"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e27f48bcd0957c6d4cb9d6fa6b61d192d0b13d5ef563e5f2ae35feafc0d179c"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01ad647cdd609225c5350561d084b42ddf732f4eeefe6e678765636791e78b9a"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:619a609aa74ae43d90ed2e89bdd784765de0a25ca761b93e196d938b8fd1dbbd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:89149166622f4db9b4b6a449256291dc87a99ee53151c74cbd82a53c8c2f6ccd"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:7709f51f5f7c853f0fb938bcd3bc59cdfdc5203635ffd18bf354f6967ea0f824"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:345b0426edd4e18138d6528aed636de7a9ed169b4aaf9d61a8c19e39d26838ca"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0907f11d019260cdc3f94fbdb23ff9125f6b5d1039b76003b5b0ac9d6a6c9d5b"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win32.whl", hash = "sha256:ea0d8d539afa5eb2728aa1932a988a9a7af94f18582ffae4bc10b3fbdad0626e"}, + {file = "charset_normalizer-3.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:329ce159e82018d646c7ac45b01a430369d526569ec08516081727a20e9e4af4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b97e690a2118911e39b4042088092771b4ae3fc3aa86518f84b8cf6888dbdb41"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78baa6d91634dfb69ec52a463534bc0df05dbd546209b79a3880a34487f4b84f"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1a2bc9f351a75ef49d664206d51f8e5ede9da246602dc2d2726837620ea034b2"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75832c08354f595c760a804588b9357d34ec00ba1c940c15e31e96d902093770"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0af291f4fe114be0280cdd29d533696a77b5b49cfde5467176ecab32353395c4"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0167ddc8ab6508fe81860a57dd472b2ef4060e8d378f0cc555707126830f2537"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2a75d49014d118e4198bcee5ee0a6f25856b29b12dbf7cd012791f8a6cc5c496"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363e2f92b0f0174b2f8238240a1a30142e3db7b957a5dd5689b0e75fb717cc78"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:ab36c8eb7e454e34e60eb55ca5d241a5d18b2c6244f6827a30e451c42410b5f7"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:4c0907b1928a36d5a998d72d64d8eaa7244989f7aaaf947500d3a800c83a3fd6"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:04432ad9479fa40ec0f387795ddad4437a2b50417c69fa275e212933519ff294"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win32.whl", hash = "sha256:3bed14e9c89dcb10e8f3a29f9ccac4955aebe93c71ae803af79265c9ca5644c5"}, + {file = "charset_normalizer-3.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:49402233c892a461407c512a19435d1ce275543138294f7ef013f0b63d5d3765"}, + {file = "charset_normalizer-3.4.1-py3-none-any.whl", hash = "sha256:d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85"}, + {file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"}, ] [[package]] From 526e76154503beb5c8e28a1d235b536a32b54f77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 02:04:20 +0000 Subject: [PATCH 023/159] build(deps): bump questionary from 2.0.1 to 2.1.0 Bumps [questionary](https://github.com/tmbo/questionary) from 2.0.1 to 2.1.0. - [Commits](https://github.com/tmbo/questionary/compare/2.0.1...2.1.0) --- updated-dependencies: - dependency-name: questionary dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index b9d5210294..bc24fb5b11 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1262,17 +1262,17 @@ pyyaml = "*" [[package]] name = "questionary" -version = "2.0.1" +version = "2.1.0" description = "Python library to build pretty command line user prompts ⭐️" optional = false python-versions = ">=3.8" files = [ - {file = "questionary-2.0.1-py3-none-any.whl", hash = "sha256:8ab9a01d0b91b68444dff7f6652c1e754105533f083cbe27597c8110ecc230a2"}, - {file = "questionary-2.0.1.tar.gz", hash = "sha256:bcce898bf3dbb446ff62830c86c5c6fb9a22a54146f0f5597d3da43b10d8fc8b"}, + {file = "questionary-2.1.0-py3-none-any.whl", hash = "sha256:44174d237b68bc828e4878c763a9ad6790ee61990e0ae72927694ead57bab8ec"}, + {file = "questionary-2.1.0.tar.gz", hash = "sha256:6302cdd645b19667d8f6e6634774e9538bfcd1aad9be287e743d96cacaf95587"}, ] [package.dependencies] -prompt_toolkit = ">=2.0,<=3.0.36" +prompt_toolkit = ">=2.0,<4.0" [[package]] name = "regex" From 09faa018a3067e325920f14d2f073548057c3bb7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 02:01:50 +0000 Subject: [PATCH 024/159] build(deps-dev): bump types-pyyaml Bumps [types-pyyaml](https://github.com/python/typeshed) from 6.0.12.20241221 to 6.0.12.20241230. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-pyyaml dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index bc24fb5b11..0e98fb0efd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1549,13 +1549,13 @@ files = [ [[package]] name = "types-pyyaml" -version = "6.0.12.20241221" +version = "6.0.12.20241230" description = "Typing stubs for PyYAML" optional = false python-versions = ">=3.8" files = [ - {file = "types_PyYAML-6.0.12.20241221-py3-none-any.whl", hash = "sha256:0657a4ff8411a030a2116a196e8e008ea679696b5b1a8e1a6aa8ebb737b34688"}, - {file = "types_pyyaml-6.0.12.20241221.tar.gz", hash = "sha256:4f149aa893ff6a46889a30af4c794b23833014c469cc57cbc3ad77498a58996f"}, + {file = "types_PyYAML-6.0.12.20241230-py3-none-any.whl", hash = "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6"}, + {file = "types_pyyaml-6.0.12.20241230.tar.gz", hash = "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c"}, ] [[package]] From 8e36610ab3440d54dbf52d6e34a0c44ef4f392a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 02:01:38 +0000 Subject: [PATCH 025/159] build(deps-dev): bump mypy from 1.14.0 to 1.14.1 Bumps [mypy](https://github.com/python/mypy) from 1.14.0 to 1.14.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.14.0...v1.14.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 72 +++++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0e98fb0efd..ff1f4d34e6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -783,43 +783,49 @@ files = [ [[package]] name = "mypy" -version = "1.14.0" +version = "1.14.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.14.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e971c1c667007f9f2b397ffa80fa8e1e0adccff336e5e77e74cb5f22868bee87"}, - {file = "mypy-1.14.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e86aaeaa3221a278c66d3d673b297232947d873773d61ca3ee0e28b2ff027179"}, - {file = "mypy-1.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1628c5c3ce823d296e41e2984ff88c5861499041cb416a8809615d0c1f41740e"}, - {file = "mypy-1.14.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7fadb29b77fc14a0dd81304ed73c828c3e5cde0016c7e668a86a3e0dfc9f3af3"}, - {file = "mypy-1.14.0-cp310-cp310-win_amd64.whl", hash = "sha256:3fa76988dc760da377c1e5069200a50d9eaaccf34f4ea18428a3337034ab5a44"}, - {file = "mypy-1.14.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6e73c8a154eed31db3445fe28f63ad2d97b674b911c00191416cf7f6459fd49a"}, - {file = "mypy-1.14.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:273e70fcb2e38c5405a188425aa60b984ffdcef65d6c746ea5813024b68c73dc"}, - {file = "mypy-1.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1daca283d732943731a6a9f20fdbcaa927f160bc51602b1d4ef880a6fb252015"}, - {file = "mypy-1.14.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7e68047bedb04c1c25bba9901ea46ff60d5eaac2d71b1f2161f33107e2b368eb"}, - {file = "mypy-1.14.0-cp311-cp311-win_amd64.whl", hash = "sha256:7a52f26b9c9b1664a60d87675f3bae00b5c7f2806e0c2800545a32c325920bcc"}, - {file = "mypy-1.14.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d5326ab70a6db8e856d59ad4cb72741124950cbbf32e7b70e30166ba7bbf61dd"}, - {file = "mypy-1.14.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bf4ec4980bec1e0e24e5075f449d014011527ae0055884c7e3abc6a99cd2c7f1"}, - {file = "mypy-1.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:390dfb898239c25289495500f12fa73aa7f24a4c6d90ccdc165762462b998d63"}, - {file = "mypy-1.14.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7e026d55ddcd76e29e87865c08cbe2d0104e2b3153a523c529de584759379d3d"}, - {file = "mypy-1.14.0-cp312-cp312-win_amd64.whl", hash = "sha256:585ed36031d0b3ee362e5107ef449a8b5dfd4e9c90ccbe36414ee405ee6b32ba"}, - {file = "mypy-1.14.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9f6f4c0b27401d14c483c622bc5105eff3911634d576bbdf6695b9a7c1ba741"}, - {file = "mypy-1.14.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56b2280cedcb312c7a79f5001ae5325582d0d339bce684e4a529069d0e7ca1e7"}, - {file = "mypy-1.14.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:342de51c48bab326bfc77ce056ba08c076d82ce4f5a86621f972ed39970f94d8"}, - {file = "mypy-1.14.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:00df23b42e533e02a6f0055e54de9a6ed491cd8b7ea738647364fd3a39ea7efc"}, - {file = "mypy-1.14.0-cp313-cp313-win_amd64.whl", hash = "sha256:e8c8387e5d9dff80e7daf961df357c80e694e942d9755f3ad77d69b0957b8e3f"}, - {file = "mypy-1.14.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b16738b1d80ec4334654e89e798eb705ac0c36c8a5c4798496cd3623aa02286"}, - {file = "mypy-1.14.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:10065fcebb7c66df04b05fc799a854b1ae24d9963c8bb27e9064a9bdb43aa8ad"}, - {file = "mypy-1.14.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fbb7d683fa6bdecaa106e8368aa973ecc0ddb79a9eaeb4b821591ecd07e9e03c"}, - {file = "mypy-1.14.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:3498cb55448dc5533e438cd13d6ddd28654559c8c4d1fd4b5ca57a31b81bac01"}, - {file = "mypy-1.14.0-cp38-cp38-win_amd64.whl", hash = "sha256:c7b243408ea43755f3a21a0a08e5c5ae30eddb4c58a80f415ca6b118816e60aa"}, - {file = "mypy-1.14.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:14117b9da3305b39860d0aa34b8f1ff74d209a368829a584eb77524389a9c13e"}, - {file = "mypy-1.14.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:af98c5a958f9c37404bd4eef2f920b94874507e146ed6ee559f185b8809c44cc"}, - {file = "mypy-1.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0b343a1d3989547024377c2ba0dca9c74a2428ad6ed24283c213af8dbb0710b"}, - {file = "mypy-1.14.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:cdb5563c1726c85fb201be383168f8c866032db95e1095600806625b3a648cb7"}, - {file = "mypy-1.14.0-cp39-cp39-win_amd64.whl", hash = "sha256:74e925649c1ee0a79aa7448baf2668d81cc287dc5782cff6a04ee93f40fb8d3f"}, - {file = "mypy-1.14.0-py3-none-any.whl", hash = "sha256:2238d7f93fc4027ed1efc944507683df3ba406445a2b6c96e79666a045aadfab"}, - {file = "mypy-1.14.0.tar.gz", hash = "sha256:822dbd184d4a9804df5a7d5335a68cf7662930e70b8c1bc976645d1509f9a9d6"}, + {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, + {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, + {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90716d8b2d1f4cd503309788e51366f07c56635a3309b0f6a32547eaaa36a64d"}, + {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ae753f5c9fef278bcf12e1a564351764f2a6da579d4a81347e1d5a15819997b"}, + {file = "mypy-1.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e0fe0f5feaafcb04505bcf439e991c6d8f1bf8b15f12b05feeed96e9e7bf1427"}, + {file = "mypy-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d54bd85b925e501c555a3227f3ec0cfc54ee8b6930bd6141ec872d1c572f81f"}, + {file = "mypy-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f995e511de847791c3b11ed90084a7a0aafdc074ab88c5a9711622fe4751138c"}, + {file = "mypy-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d64169ec3b8461311f8ce2fd2eb5d33e2d0f2c7b49116259c51d0d96edee48d1"}, + {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba24549de7b89b6381b91fbc068d798192b1b5201987070319889e93038967a8"}, + {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:183cf0a45457d28ff9d758730cd0210419ac27d4d3f285beda038c9083363b1f"}, + {file = "mypy-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f2a0ecc86378f45347f586e4163d1769dd81c5a223d577fe351f26b179e148b1"}, + {file = "mypy-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:ad3301ebebec9e8ee7135d8e3109ca76c23752bac1e717bc84cd3836b4bf3eae"}, + {file = "mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14"}, + {file = "mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9"}, + {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11"}, + {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e"}, + {file = "mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89"}, + {file = "mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b"}, + {file = "mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255"}, + {file = "mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34"}, + {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a"}, + {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9"}, + {file = "mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd"}, + {file = "mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107"}, + {file = "mypy-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7084fb8f1128c76cd9cf68fe5971b37072598e7c31b2f9f95586b65c741a9d31"}, + {file = "mypy-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f845a00b4f420f693f870eaee5f3e2692fa84cc8514496114649cfa8fd5e2c6"}, + {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44bf464499f0e3a2d14d58b54674dee25c031703b2ffc35064bd0df2e0fac319"}, + {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c99f27732c0b7dc847adb21c9d47ce57eb48fa33a17bc6d7d5c5e9f9e7ae5bac"}, + {file = "mypy-1.14.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:bce23c7377b43602baa0bd22ea3265c49b9ff0b76eb315d6c34721af4cdf1d9b"}, + {file = "mypy-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:8edc07eeade7ebc771ff9cf6b211b9a7d93687ff892150cb5692e4f4272b0837"}, + {file = "mypy-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3888a1816d69f7ab92092f785a462944b3ca16d7c470d564165fe703b0970c35"}, + {file = "mypy-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46c756a444117c43ee984bd055db99e498bc613a70bbbc120272bd13ca579fbc"}, + {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27fc248022907e72abfd8e22ab1f10e903915ff69961174784a3900a8cba9ad9"}, + {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:499d6a72fb7e5de92218db961f1a66d5f11783f9ae549d214617edab5d4dbdbb"}, + {file = "mypy-1.14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57961db9795eb566dc1d1b4e9139ebc4c6b0cb6e7254ecde69d1552bf7613f60"}, + {file = "mypy-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:07ba89fdcc9451f2ebb02853deb6aaaa3d2239a236669a63ab3801bbf923ef5c"}, + {file = "mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1"}, + {file = "mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6"}, ] [package.dependencies] From 2b0bcdd1f17b70815b6d75166dd2163c7d6580d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 02:02:11 +0000 Subject: [PATCH 026/159] build(deps-dev): bump ipython from 8.18.0 to 8.18.1 Bumps [ipython](https://github.com/ipython/ipython) from 8.18.0 to 8.18.1. - [Release notes](https://github.com/ipython/ipython/releases) - [Commits](https://github.com/ipython/ipython/compare/8.18.0...8.18.1) --- updated-dependencies: - dependency-name: ipython dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index ff1f4d34e6..a4618fecc6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -474,13 +474,13 @@ files = [ [[package]] name = "ipython" -version = "8.18.0" +version = "8.18.1" description = "IPython: Productive Interactive Computing" optional = false python-versions = ">=3.9" files = [ - {file = "ipython-8.18.0-py3-none-any.whl", hash = "sha256:d538a7a98ad9b7e018926447a5f35856113a85d08fd68a165d7871ab5175f6e0"}, - {file = "ipython-8.18.0.tar.gz", hash = "sha256:4feb61210160f75e229ce932dbf8b719bff37af123c0b985fd038b14233daa16"}, + {file = "ipython-8.18.1-py3-none-any.whl", hash = "sha256:e8267419d72d81955ec1177f8a29aaa90ac80ad647499201119e2f05e99aa397"}, + {file = "ipython-8.18.1.tar.gz", hash = "sha256:ca6f079bb33457c66e233e4580ebfc4128855b4cf6370dddd73842a9563e8a27"}, ] [package.dependencies] @@ -490,7 +490,7 @@ exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} jedi = ">=0.16" matplotlib-inline = "*" pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""} -prompt-toolkit = ">=3.0.30,<3.0.37 || >3.0.37,<3.1.0" +prompt-toolkit = ">=3.0.41,<3.1.0" pygments = ">=2.4.0" stack-data = "*" traitlets = ">=5" @@ -979,13 +979,13 @@ virtualenv = ">=20.10.0" [[package]] name = "prompt-toolkit" -version = "3.0.36" +version = "3.0.48" description = "Library for building powerful interactive command lines in Python" optional = false -python-versions = ">=3.6.2" +python-versions = ">=3.7.0" files = [ - {file = "prompt_toolkit-3.0.36-py3-none-any.whl", hash = "sha256:aa64ad242a462c5ff0363a7b9cfe696c20d55d9fc60c11fd8e632d064804d305"}, - {file = "prompt_toolkit-3.0.36.tar.gz", hash = "sha256:3e163f254bef5a03b146397d7c1963bd3e2812f0964bb9a24e6ec761fd28db63"}, + {file = "prompt_toolkit-3.0.48-py3-none-any.whl", hash = "sha256:f49a827f90062e411f1ce1f854f2aedb3c23353244f8108b89283587397ac10e"}, + {file = "prompt_toolkit-3.0.48.tar.gz", hash = "sha256:d6623ab0477a80df74e646bdbc93621143f5caf104206aa29294d53de1a03d90"}, ] [package.dependencies] From 1d8b5312753887e62fd91f0531bd1d51fb4fdc25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 01:13:32 +0000 Subject: [PATCH 027/159] build(deps-dev): bump ruff from 0.8.4 to 0.8.5 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.4 to 0.8.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.4...0.8.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index a4618fecc6..41ca91754f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1425,29 +1425,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.8.4" +version = "0.8.5" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.4-py3-none-linux_armv6l.whl", hash = "sha256:58072f0c06080276804c6a4e21a9045a706584a958e644353603d36ca1eb8a60"}, - {file = "ruff-0.8.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ffb60904651c00a1e0b8df594591770018a0f04587f7deeb3838344fe3adabac"}, - {file = "ruff-0.8.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:6ddf5d654ac0d44389f6bf05cee4caeefc3132a64b58ea46738111d687352296"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e248b1f0fa2749edd3350a2a342b67b43a2627434c059a063418e3d375cfe643"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf197b98ed86e417412ee3b6c893f44c8864f816451441483253d5ff22c0e81e"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c41319b85faa3aadd4d30cb1cffdd9ac6b89704ff79f7664b853785b48eccdf3"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9f8402b7c4f96463f135e936d9ab77b65711fcd5d72e5d67597b543bbb43cf3f"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4e56b3baa9c23d324ead112a4fdf20db9a3f8f29eeabff1355114dd96014604"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:736272574e97157f7edbbb43b1d046125fce9e7d8d583d5d65d0c9bf2c15addf"}, - {file = "ruff-0.8.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fe710ab6061592521f902fca7ebcb9fabd27bc7c57c764298b1c1f15fff720"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:13e9ec6d6b55f6da412d59953d65d66e760d583dd3c1c72bf1f26435b5bfdbae"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:97d9aefef725348ad77d6db98b726cfdb075a40b936c7984088804dfd38268a7"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ab78e33325a6f5374e04c2ab924a3367d69a0da36f8c9cb6b894a62017506111"}, - {file = "ruff-0.8.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:8ef06f66f4a05c3ddbc9121a8b0cecccd92c5bf3dd43b5472ffe40b8ca10f0f8"}, - {file = "ruff-0.8.4-py3-none-win32.whl", hash = "sha256:552fb6d861320958ca5e15f28b20a3d071aa83b93caee33a87b471f99a6c0835"}, - {file = "ruff-0.8.4-py3-none-win_amd64.whl", hash = "sha256:f21a1143776f8656d7f364bd264a9d60f01b7f52243fbe90e7670c0dfe0cf65d"}, - {file = "ruff-0.8.4-py3-none-win_arm64.whl", hash = "sha256:9183dd615d8df50defa8b1d9a074053891ba39025cf5ae88e8bcb52edcc4bf08"}, - {file = "ruff-0.8.4.tar.gz", hash = "sha256:0d5f89f254836799af1615798caa5f80b7f935d7a670fad66c5007928e57ace8"}, + {file = "ruff-0.8.5-py3-none-linux_armv6l.whl", hash = "sha256:5ad11a5e3868a73ca1fa4727fe7e33735ea78b416313f4368c504dbeb69c0f88"}, + {file = "ruff-0.8.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:f69ab37771ea7e0715fead8624ec42996d101269a96e31f4d31be6fc33aa19b7"}, + {file = "ruff-0.8.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b5462d7804558ccff9c08fe8cbf6c14b7efe67404316696a2dde48297b1925bb"}, + {file = "ruff-0.8.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d56de7220a35607f9fe59f8a6d018e14504f7b71d784d980835e20fc0611cd50"}, + {file = "ruff-0.8.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9d99cf80b0429cbebf31cbbf6f24f05a29706f0437c40413d950e67e2d4faca4"}, + {file = "ruff-0.8.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b75ac29715ac60d554a049dbb0ef3b55259076181c3369d79466cb130eb5afd"}, + {file = "ruff-0.8.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c9d526a62c9eda211b38463528768fd0ada25dad524cb33c0e99fcff1c67b5dc"}, + {file = "ruff-0.8.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:587c5e95007612c26509f30acc506c874dab4c4abbacd0357400bd1aa799931b"}, + {file = "ruff-0.8.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:622b82bf3429ff0e346835ec213aec0a04d9730480cbffbb6ad9372014e31bbd"}, + {file = "ruff-0.8.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f99be814d77a5dac8a8957104bdd8c359e85c86b0ee0e38dca447cb1095f70fb"}, + {file = "ruff-0.8.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:c01c048f9c3385e0fd7822ad0fd519afb282af9cf1778f3580e540629df89725"}, + {file = "ruff-0.8.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7512e8cb038db7f5db6aae0e24735ff9ea03bb0ed6ae2ce534e9baa23c1dc9ea"}, + {file = "ruff-0.8.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:762f113232acd5b768d6b875d16aad6b00082add40ec91c927f0673a8ec4ede8"}, + {file = "ruff-0.8.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:03a90200c5dfff49e4c967b405f27fdfa81594cbb7c5ff5609e42d7fe9680da5"}, + {file = "ruff-0.8.5-py3-none-win32.whl", hash = "sha256:8710ffd57bdaa6690cbf6ecff19884b8629ec2a2a2a2f783aa94b1cc795139ed"}, + {file = "ruff-0.8.5-py3-none-win_amd64.whl", hash = "sha256:4020d8bf8d3a32325c77af452a9976a9ad6455773bcb94991cf15bd66b347e47"}, + {file = "ruff-0.8.5-py3-none-win_arm64.whl", hash = "sha256:134ae019ef13e1b060ab7136e7828a6d83ea727ba123381307eb37c6bd5e01cb"}, + {file = "ruff-0.8.5.tar.gz", hash = "sha256:1098d36f69831f7ff2a1da3e6407d5fbd6dfa2559e4f74ff2d260c5588900317"}, ] [[package]] From fc96f9c9fb8582634d1b291731109649294a91a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 01:33:13 +0000 Subject: [PATCH 028/159] build(deps-dev): bump mkdocs-material from 9.5.49 to 9.5.50 Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.49 to 9.5.50. - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.49...9.5.50) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 41ca91754f..9d747b8735 100644 --- a/poetry.lock +++ b/poetry.lock @@ -743,13 +743,13 @@ pyyaml = ">=5.1" [[package]] name = "mkdocs-material" -version = "9.5.49" +version = "9.5.50" description = "Documentation that simply works" optional = false python-versions = ">=3.8" files = [ - {file = "mkdocs_material-9.5.49-py3-none-any.whl", hash = "sha256:c3c2d8176b18198435d3a3e119011922f3e11424074645c24019c2dcf08a360e"}, - {file = "mkdocs_material-9.5.49.tar.gz", hash = "sha256:3671bb282b4f53a1c72e08adbe04d2481a98f85fed392530051f80ff94a9621d"}, + {file = "mkdocs_material-9.5.50-py3-none-any.whl", hash = "sha256:f24100f234741f4d423a9d672a909d859668a4f404796be3cf035f10d6050385"}, + {file = "mkdocs_material-9.5.50.tar.gz", hash = "sha256:ae5fe16f3d7c9ccd05bb6916a7da7420cf99a9ce5e33debd9d40403a090d5825"}, ] [package.dependencies] @@ -766,7 +766,7 @@ regex = ">=2022.4" requests = ">=2.26,<3.0" [package.extras] -git = ["mkdocs-git-committers-plugin-2 (>=1.1,<2.0)", "mkdocs-git-revision-date-localized-plugin (>=1.2.4,<2.0)"] +git = ["mkdocs-git-committers-plugin-2 (>=1.1,<3)", "mkdocs-git-revision-date-localized-plugin (>=1.2.4,<2.0)"] imaging = ["cairosvg (>=2.6,<3.0)", "pillow (>=10.2,<11.0)"] recommended = ["mkdocs-minify-plugin (>=0.7,<1.0)", "mkdocs-redirects (>=1.2,<2.0)", "mkdocs-rss-plugin (>=1.6,<2.0)"] From f810b2c9a4b6671eabfec21ae3d24b1bc71aa821 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 01:08:34 +0000 Subject: [PATCH 029/159] build(deps): bump importlib-metadata from 8.5.0 to 8.6.1 Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 8.5.0 to 8.6.1. - [Release notes](https://github.com/python/importlib_metadata/releases) - [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst) - [Commits](https://github.com/python/importlib_metadata/compare/v8.5.0...v8.6.1) --- updated-dependencies: - dependency-name: importlib-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 9d747b8735..7c85f4c137 100644 --- a/poetry.lock +++ b/poetry.lock @@ -440,13 +440,13 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 [[package]] name = "importlib-metadata" -version = "8.5.0" +version = "8.6.1" description = "Read metadata from Python packages" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, - {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, + {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, + {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, ] [package.dependencies] @@ -458,7 +458,7 @@ cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib_resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] From 2902d5a0b18084c5a297676752ddc66512883c7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 01:08:21 +0000 Subject: [PATCH 030/159] build(deps-dev): bump pre-commit from 4.0.1 to 4.1.0 Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.0.1 to 4.1.0. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md) - [Commits](https://github.com/pre-commit/pre-commit/compare/v4.0.1...v4.1.0) --- updated-dependencies: - dependency-name: pre-commit dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7c85f4c137..23deba7a24 100644 --- a/poetry.lock +++ b/poetry.lock @@ -961,13 +961,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "4.0.1" +version = "4.1.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" files = [ - {file = "pre_commit-4.0.1-py2.py3-none-any.whl", hash = "sha256:efde913840816312445dc98787724647c65473daefe420785f885e8ed9a06878"}, - {file = "pre_commit-4.0.1.tar.gz", hash = "sha256:80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2"}, + {file = "pre_commit-4.1.0-py2.py3-none-any.whl", hash = "sha256:d29e7cb346295bcc1cc75fc3e92e343495e3ea0196c9ec6ba53f49f10ab6ae7b"}, + {file = "pre_commit-4.1.0.tar.gz", hash = "sha256:ae3f018575a588e30dfddfab9a05448bfbd6b73d78709617b5a2b853549716d4"}, ] [package.dependencies] From 15c29df50e161ebce154b573f3c882fee32521d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 02:02:14 +0000 Subject: [PATCH 031/159] build(deps-dev): bump pytest-regressions from 2.6.0 to 2.7.0 Bumps [pytest-regressions](https://github.com/ESSS/pytest-regressions) from 2.6.0 to 2.7.0. - [Release notes](https://github.com/ESSS/pytest-regressions/releases) - [Changelog](https://github.com/ESSS/pytest-regressions/blob/master/CHANGELOG.rst) - [Commits](https://github.com/ESSS/pytest-regressions/compare/v2.6.0...v2.7.0) --- updated-dependencies: - dependency-name: pytest-regressions dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 23deba7a24..956eb75ffb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1136,13 +1136,13 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] [[package]] name = "pytest-regressions" -version = "2.6.0" +version = "2.7.0" description = "Easy to use fixtures to write regression tests." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "pytest_regressions-2.6.0-py3-none-any.whl", hash = "sha256:5c4a4763415f765770449190097a99b3a8a6ebf20b24e6d90a32da6644e5d041"}, - {file = "pytest_regressions-2.6.0.tar.gz", hash = "sha256:e3dce521fac11199a2a91a1b8837974d708c7e8665b8c9668b3a721b556c8183"}, + {file = "pytest_regressions-2.7.0-py3-none-any.whl", hash = "sha256:69f5e3f03493cf0ef84d96d23e50a546617c198b1d7746f2e2b9e441cbab4847"}, + {file = "pytest_regressions-2.7.0.tar.gz", hash = "sha256:4c30064e0923929012c94f5d6f35205be06fd8709c7f0dba0228e05c460af05e"}, ] [package.dependencies] From ed8f0831ef822bf5be22ccd437504f0aa0280a59 Mon Sep 17 00:00:00 2001 From: Lyonel Martinez Date: Fri, 29 Nov 2024 16:09:07 +0100 Subject: [PATCH 032/159] fix(get-next-bump): fix to permit usage of --get-next options even when update_changelog_on_bump is set to true --- commitizen/commands/bump.py | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index a3682df8f3..1f98c19954 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -66,9 +66,8 @@ def __init__(self, config: BaseConfig, arguments: dict): }, } self.cz = factory.commiter_factory(self.config) - self.changelog = arguments["changelog"] or self.config.settings.get( - "update_changelog_on_bump" - ) + self.changelog_flag = arguments["changelog"] + self.changelog_config = self.config.settings.get("update_changelog_on_bump") self.changelog_to_stdout = arguments["changelog_to_stdout"] self.git_output_to_stderr = arguments["git_output_to_stderr"] self.no_verify = arguments["no_verify"] @@ -207,17 +206,24 @@ def __call__(self) -> None: # noqa: C901 "--local-version cannot be combined with --build-metadata" ) - # If user specified changelog_to_stdout, they probably want the - # changelog to be generated as well, this is the most intuitive solution - self.changelog = self.changelog or bool(self.changelog_to_stdout) - if get_next: - if self.changelog: + # if trying to use --get-next, we should not allow --changelog or --changelog-to-stdout + if self.changelog_flag or bool(self.changelog_to_stdout): raise NotAllowed( "--changelog or --changelog-to-stdout is not allowed with --get-next" ) + # --get-next is a special case, taking precedence over config for 'update_changelog_on_bump' + self.changelog_config = False # Setting dry_run to prevent any unwanted changes to the repo or files self.dry_run = True + else: + # If user specified changelog_to_stdout, they probably want the + # changelog to be generated as well, this is the most intuitive solution + self.changelog_flag = ( + self.changelog_flag + or bool(self.changelog_to_stdout) + or self.changelog_config + ) current_tag_version: str = bump.normalize_tag( current_version, @@ -309,7 +315,7 @@ def __call__(self) -> None: # noqa: C901 ) files: list[str] = [] - if self.changelog: + if self.changelog_flag: args = { "unreleased_version": new_tag_version, "template": self.template, @@ -356,7 +362,9 @@ def __call__(self) -> None: # noqa: C901 new_tag_version=new_tag_version, message=message, increment=increment, - changelog_file_name=changelog_cmd.file_name if self.changelog else None, + changelog_file_name=changelog_cmd.file_name + if self.changelog_flag + else None, ) if is_files_only: @@ -365,7 +373,7 @@ def __call__(self) -> None: # noqa: C901 # FIXME: check if any changes have been staged git.add(*files) c = git.commit(message, args=self._get_commit_args()) - if self.retry and c.return_code != 0 and self.changelog: + if self.retry and c.return_code != 0 and self.changelog_flag: # Maybe pre-commit reformatted some files? Retry once logger.debug("1st git.commit error: %s", c.err) logger.info("1st commit attempt failed; retrying once") @@ -410,7 +418,9 @@ def __call__(self) -> None: # noqa: C901 current_tag_version=new_tag_version, message=message, increment=increment, - changelog_file_name=changelog_cmd.file_name if self.changelog else None, + changelog_file_name=changelog_cmd.file_name + if self.changelog_flag + else None, ) # TODO: For v3 output this only as diagnostic and remove this if From d20580dda697c83bd7427704490c958cd73cd565 Mon Sep 17 00:00:00 2001 From: Lyonel Martinez Date: Fri, 29 Nov 2024 16:27:21 +0100 Subject: [PATCH 033/159] fix(get-next-bump): add a test case --- tests/commands/test_bump_command.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index 81273764dd..8acb5143c7 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -1481,6 +1481,26 @@ def test_bump_get_next(mocker: MockFixture, capsys): assert tag_exists is False +@pytest.mark.usefixtures("tmp_commitizen_project") +def test_bump_get_next_update_changelog_on_bump( + mocker: MockFixture, capsys, config_path +): + create_file_and_commit("feat: new file") + with open(config_path, "a", encoding="utf-8") as fp: + fp.write("update_changelog_on_bump = true\n") + + testargs = ["cz", "bump", "--yes", "--get-next"] + mocker.patch.object(sys, "argv", testargs) + with pytest.raises(GetNextExit): + cli.main() + + out, _ = capsys.readouterr() + assert "0.2.0" in out + + tag_exists = git.tag_exist("0.2.0") + assert tag_exists is False + + @pytest.mark.usefixtures("tmp_commitizen_project") def test_bump_get_next__changelog_is_not_allowed(mocker: MockFixture): create_file_and_commit("feat: new file") From c6119812f7c21e6b2b01583025e2664945c550a3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Jan 2025 10:49:23 +0000 Subject: [PATCH 034/159] =?UTF-8?q?bump:=20version=204.1.0=20=E2=86=92=204?= =?UTF-8?q?.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 7 +++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 986b63f875..5ee5c84c96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.1.0 # automatically updated by Commitizen + rev: v4.1.1 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 858f7d7181..3687908b19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v4.1.1 (2025-01-26) + +### Fix + +- **get-next-bump**: add a test case +- **get-next-bump**: fix to permit usage of --get-next options even when update_changelog_on_bump is set to true + ## v4.1.0 (2024-12-06) ### Feat diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 7039708762..72aa75832f 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.1.0" +__version__ = "4.1.1" diff --git a/pyproject.toml b/pyproject.toml index e1b884f479..094d6fca0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.commitizen] -version = "4.1.0" +version = "4.1.1" tag_format = "v$version" version_files = [ "pyproject.toml:version", @@ -9,7 +9,7 @@ version_files = [ [tool.poetry] name = "commitizen" -version = "4.1.0" +version = "4.1.1" description = "Python commitizen client tool" authors = ["Santiago Fraire "] license = "MIT" From 0d093b83596fb320a5ee0533d53e5cee0bdc6daf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 01:24:58 +0000 Subject: [PATCH 035/159] build(deps-dev): bump deprecated from 1.2.15 to 1.2.17 Bumps [deprecated](https://github.com/laurent-laporte-pro/deprecated) from 1.2.15 to 1.2.17. - [Release notes](https://github.com/laurent-laporte-pro/deprecated/releases) - [Changelog](https://github.com/laurent-laporte-pro/deprecated/blob/master/CHANGELOG.rst) - [Commits](https://github.com/laurent-laporte-pro/deprecated/compare/v1.2.15...v1.2.17) --- updated-dependencies: - dependency-name: deprecated dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 956eb75ffb..4779c42af8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -295,20 +295,20 @@ files = [ [[package]] name = "deprecated" -version = "1.2.15" +version = "1.2.17" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" files = [ - {file = "Deprecated-1.2.15-py2.py3-none-any.whl", hash = "sha256:353bc4a8ac4bfc96800ddab349d89c25dec1079f65fd53acdcc1e0b975b21320"}, - {file = "deprecated-1.2.15.tar.gz", hash = "sha256:683e561a90de76239796e6b6feac66b99030d2dd3fcf61ef996330f14bbb9b0d"}, + {file = "Deprecated-1.2.17-py2.py3-none-any.whl", hash = "sha256:69cdc0a751671183f569495e2efb14baee4344b0236342eec29f1fde25d61818"}, + {file = "deprecated-1.2.17.tar.gz", hash = "sha256:0114a10f0bbb750b90b2c2296c90cf7e9eaeb0abb5cf06c80de2c60138de0a82"}, ] [package.dependencies] wrapt = ">=1.10,<2" [package.extras] -dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "jinja2 (>=3.0.3,<3.1.0)", "setuptools", "sphinx (<2)", "tox"] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "setuptools", "tox"] [[package]] name = "distlib" From fda99f82aa822380bbcd9eb7fcce240b2c4fe00c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2025 01:32:53 +0000 Subject: [PATCH 036/159] build(deps-dev): bump deprecated from 1.2.17 to 1.2.18 Bumps [deprecated](https://github.com/laurent-laporte-pro/deprecated) from 1.2.17 to 1.2.18. - [Release notes](https://github.com/laurent-laporte-pro/deprecated/releases) - [Changelog](https://github.com/laurent-laporte-pro/deprecated/blob/master/CHANGELOG.rst) - [Commits](https://github.com/laurent-laporte-pro/deprecated/compare/v1.2.17...v1.2.18) --- updated-dependencies: - dependency-name: deprecated dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4779c42af8..2da5e39cf8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -295,13 +295,13 @@ files = [ [[package]] name = "deprecated" -version = "1.2.17" +version = "1.2.18" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" files = [ - {file = "Deprecated-1.2.17-py2.py3-none-any.whl", hash = "sha256:69cdc0a751671183f569495e2efb14baee4344b0236342eec29f1fde25d61818"}, - {file = "deprecated-1.2.17.tar.gz", hash = "sha256:0114a10f0bbb750b90b2c2296c90cf7e9eaeb0abb5cf06c80de2c60138de0a82"}, + {file = "Deprecated-1.2.18-py2.py3-none-any.whl", hash = "sha256:bd5011788200372a32418f888e326a09ff80d0214bd961147cfed01b5c018eec"}, + {file = "deprecated-1.2.18.tar.gz", hash = "sha256:422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d"}, ] [package.dependencies] From 62f482e6187534d20030cd7cbb698c0cb4f55759 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 01:46:15 +0000 Subject: [PATCH 037/159] build(deps): bump argcomplete from 3.5.2 to 3.5.3 Bumps [argcomplete](https://github.com/kislyuk/argcomplete) from 3.5.2 to 3.5.3. - [Release notes](https://github.com/kislyuk/argcomplete/releases) - [Changelog](https://github.com/kislyuk/argcomplete/blob/main/Changes.rst) - [Commits](https://github.com/kislyuk/argcomplete/compare/v3.5.2...v3.5.3) --- updated-dependencies: - dependency-name: argcomplete dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2da5e39cf8..5698043093 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "argcomplete" -version = "3.5.2" +version = "3.5.3" description = "Bash tab completion for argparse" optional = false python-versions = ">=3.8" files = [ - {file = "argcomplete-3.5.2-py3-none-any.whl", hash = "sha256:036d020d79048a5d525bc63880d7a4b8d1668566b8a76daf1144c0bbe0f63472"}, - {file = "argcomplete-3.5.2.tar.gz", hash = "sha256:23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb"}, + {file = "argcomplete-3.5.3-py3-none-any.whl", hash = "sha256:2ab2c4a215c59fd6caaff41a869480a23e8f6a5f910b266c1808037f4e375b61"}, + {file = "argcomplete-3.5.3.tar.gz", hash = "sha256:c12bf50eded8aebb298c7b7da7a5ff3ee24dffd9f5281867dfe1424b58c55392"}, ] [package.extras] From f6db6a934597a08547201eb8952fd2c85f166d65 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 Jan 2025 10:02:18 +0000 Subject: [PATCH 038/159] docs(cli/screenshots): update CLI screenshots [skip ci] --- docs/images/cli_help/cz___help.svg | 162 ++++----- docs/images/cli_help/cz_bump___help.svg | 350 +++++++++---------- docs/images/cli_help/cz_changelog___help.svg | 190 +++++----- docs/images/cli_help/cz_check___help.svg | 134 ++++--- docs/images/cli_help/cz_commit___help.svg | 110 +++--- 5 files changed, 467 insertions(+), 479 deletions(-) diff --git a/docs/images/cli_help/cz___help.svg b/docs/images/cli_help/cz___help.svg index 22a9e4d0e7..098e7df70d 100644 --- a/docs/images/cli_help/cz___help.svg +++ b/docs/images/cli_help/cz___help.svg @@ -19,133 +19,133 @@ font-weight: 700; } - .terminal-4198725382-matrix { + .terminal-2205183093-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-4198725382-title { + .terminal-2205183093-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-4198725382-r1 { fill: #c5c8c6 } -.terminal-4198725382-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-4198725382-r3 { fill: #d0b344 } -.terminal-4198725382-r4 { fill: #1984e9;text-decoration: underline; } -.terminal-4198725382-r5 { fill: #68a0b3;font-weight: bold } + .terminal-2205183093-r1 { fill: #c5c8c6 } +.terminal-2205183093-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-2205183093-r3 { fill: #d0b344 } +.terminal-2205183093-r4 { fill: #1984e9;text-decoration: underline; } +.terminal-2205183093-r5 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -157,45 +157,45 @@ - + - - $ cz --help -usage: cz [-h][--config CONFIG][--debug][-n NAME][-nr NO_RAISE] -{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} -... - -Commitizen is a cli tool to generate conventional commits. -For more information about the topic go to https://conventionalcommits.org/ - -options: -  -h, --help            show this help message and exit -  --config CONFIG       the path of configuration file -  --debug               use debug mode -  -n NAME, --name NAME  use the given commitizen (default: -                        cz_conventional_commits) -  -nr NO_RAISE, --no-raise NO_RAISE -                        comma separated error codes that won't rise error, -                        e.g: cz -nr 1,2,3 bump. See codes at -https://commitizen- -                        tools.github.io/commitizen/exit_codes/ - -commands: -{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} -    init                init commitizen configuration -    commit (c)          create new commit -    ls                  show available commitizens -    example             show commit example -    info                show information about the cz -    schema              show commit schema -    bump                bump semantic version based on the git log -    changelog (ch)      generate changelog (note that it will overwrite -                        existing file) -    check               validates that a commit message matches the commitizen -                        schema -    version             get the version of the installed commitizen or the -                        current project (default: installed commitizen) - + + $ cz --help +usage: cz [-h][--config CONFIG][--debug][-n NAME][-nr NO_RAISE] +{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} +... + +Commitizen is a cli tool to generate conventional commits. +For more information about the topic go to https://conventionalcommits.org/ + +options: +  -h, --help            show this help message and exit +  --config CONFIG       the path of configuration file +  --debug               use debug mode +  -n, --name NAME       use the given commitizen (default: +                        cz_conventional_commits) +  -nr, --no-raise NO_RAISE +                        comma separated error codes that won't rise error, +                        e.g: cz -nr 1,2,3 bump. See codes at +https://commitizen- +                        tools.github.io/commitizen/exit_codes/ + +commands: +{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} +    init                init commitizen configuration +    commit (c)          create new commit +    ls                  show available commitizens +    example             show commit example +    info                show information about the cz +    schema              show commit schema +    bump                bump semantic version based on the git log +    changelog (ch)      generate changelog (note that it will overwrite +                        existing file) +    check               validates that a commit message matches the commitizen +                        schema +    version             get the version of the installed commitizen or the +                        current project (default: installed commitizen) + diff --git a/docs/images/cli_help/cz_bump___help.svg b/docs/images/cli_help/cz_bump___help.svg index 7af2aa8c27..4030b1ba90 100644 --- a/docs/images/cli_help/cz_bump___help.svg +++ b/docs/images/cli_help/cz_bump___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz bump --help -usage: cz bump [-h][--dry-run][--files-only][--local-version][--changelog] -[--no-verify][--yes][--tag-format TAG_FORMAT] -[--bump-message BUMP_MESSAGE][--prerelease {alpha,beta,rc}] -[--devrelease DEVRELEASE][--increment {MAJOR,MINOR,PATCH}] -[--increment-mode {linear,exact}][--check-consistency] -[--annotated-tag] -[--annotated-tag-message ANNOTATED_TAG_MESSAGE][--gpg-sign] -[--changelog-to-stdout][--git-output-to-stderr][--retry] -[--major-version-zero][--template TEMPLATE][--extra EXTRA] -[--file-name FILE_NAME][--prerelease-offset PRERELEASE_OFFSET] -[--version-scheme {pep440,semver,semver2}] -[--version-type {pep440,semver,semver2}] -[--build-metadata BUILD_METADATA][--get-next] -[MANUAL_VERSION] - -bump semantic version based on the git log - -positional arguments: -  MANUAL_VERSION        bump to the given version (e.g: 1.5.3) - -options: -  -h, --help            show this help message and exit -  --dry-run             show output to stdout, no commit, no modified files -  --files-only          bump version in the files from the config -  --local-version       bump only the local version portion -  --changelog, -ch      generate the changelog for the newest version -  --no-verify           this option bypasses the pre-commit and commit-msg -                        hooks -  --yes                 accept automatically questions done -  --tag-format TAG_FORMAT -                        the format used to tag the commit and read it, use it -                        in existing projects, wrap around simple quotes -  --bump-message BUMP_MESSAGE -                        template used to create the release commit, useful -                        when working with CI -  --prerelease {alpha,beta,rc}, -pr {alpha,beta,rc} -                        choose type of prerelease -  --devrelease DEVRELEASE, -d DEVRELEASE -                        specify non-negative integer for dev. release -  --increment {MAJOR,MINOR,PATCH} -                        manually specify the desired increment -  --increment-mode {linear,exact} -                        set the method by which the new version is chosen. -'linear'(default) guesses the next version based on -                        typical linear version progression, such that bumping -                        of a pre-release with lower precedence than the -                        current pre-release phase maintains the current phase -                        of higher precedence. 'exact' applies the changes that -                        have been specified (or determined from the commit -                        log) without interpretation, such that the increment -                        and pre-release are always honored -  --check-consistency, -cc -                        check consistency among versions defined in commitizen -                        configuration and version_files -  --annotated-tag, -at  create annotated tag instead of lightweight one -  --annotated-tag-message ANNOTATED_TAG_MESSAGE, -atm ANNOTATED_TAG_MESSAGE -                        create annotated tag message -  --gpg-sign, -s        sign tag instead of lightweight one -  --changelog-to-stdout -                        Output changelog to the stdout -  --git-output-to-stderr -                        Redirect git output to stderr -  --retry               retry commit if it fails the 1st time -  --major-version-zero  keep major version at zero, even for breaking changes -  --template TEMPLATE, -t TEMPLATE -                        changelog template file name (relative to the current -                        working directory) -  --extra EXTRA, -e EXTRA -                        a changelog extra variable (in the form 'key=value') -  --file-name FILE_NAME -                        file name of changelog (default: 'CHANGELOG.md') -  --prerelease-offset PRERELEASE_OFFSET -                        start pre-releases with this offset -  --version-scheme {pep440,semver,semver2} -                        choose version scheme -  --version-type {pep440,semver,semver2} -                        Deprecated, use --version-scheme -  --build-metadata BUILD_METADATA -                        Add additional build-metadata to the version-number -  --get-next            Determine the next version and write to stdout - + + $ cz bump --help +usage: cz bump [-h][--dry-run][--files-only][--local-version][--changelog] +[--no-verify][--yes][--tag-format TAG_FORMAT] +[--bump-message BUMP_MESSAGE][--prerelease {alpha,beta,rc}] +[--devrelease DEVRELEASE][--increment {MAJOR,MINOR,PATCH}] +[--increment-mode {linear,exact}][--check-consistency] +[--annotated-tag] +[--annotated-tag-message ANNOTATED_TAG_MESSAGE][--gpg-sign] +[--changelog-to-stdout][--git-output-to-stderr][--retry] +[--major-version-zero][--template TEMPLATE][--extra EXTRA] +[--file-name FILE_NAME][--prerelease-offset PRERELEASE_OFFSET] +[--version-scheme {pep440,semver,semver2}] +[--version-type {pep440,semver,semver2}] +[--build-metadata BUILD_METADATA][--get-next] +[MANUAL_VERSION] + +bump semantic version based on the git log + +positional arguments: +  MANUAL_VERSION        bump to the given version (e.g: 1.5.3) + +options: +  -h, --help            show this help message and exit +  --dry-run             show output to stdout, no commit, no modified files +  --files-only          bump version in the files from the config +  --local-version       bump only the local version portion +  --changelog, -ch      generate the changelog for the newest version +  --no-verify           this option bypasses the pre-commit and commit-msg +                        hooks +  --yes                 accept automatically questions done +  --tag-format TAG_FORMAT +                        the format used to tag the commit and read it, use it +                        in existing projects, wrap around simple quotes +  --bump-message BUMP_MESSAGE +                        template used to create the release commit, useful +                        when working with CI +  --prerelease, -pr {alpha,beta,rc} +                        choose type of prerelease +  --devrelease, -d DEVRELEASE +                        specify non-negative integer for dev. release +  --increment {MAJOR,MINOR,PATCH} +                        manually specify the desired increment +  --increment-mode {linear,exact} +                        set the method by which the new version is chosen. +'linear'(default) guesses the next version based on +                        typical linear version progression, such that bumping +                        of a pre-release with lower precedence than the +                        current pre-release phase maintains the current phase +                        of higher precedence. 'exact' applies the changes that +                        have been specified (or determined from the commit +                        log) without interpretation, such that the increment +                        and pre-release are always honored +  --check-consistency, -cc +                        check consistency among versions defined in commitizen +                        configuration and version_files +  --annotated-tag, -at  create annotated tag instead of lightweight one +  --annotated-tag-message, -atm ANNOTATED_TAG_MESSAGE +                        create annotated tag message +  --gpg-sign, -s        sign tag instead of lightweight one +  --changelog-to-stdout +                        Output changelog to the stdout +  --git-output-to-stderr +                        Redirect git output to stderr +  --retry               retry commit if it fails the 1st time +  --major-version-zero  keep major version at zero, even for breaking changes +  --template, -t TEMPLATE +                        changelog template file name (relative to the current +                        working directory) +  --extra, -e EXTRA     a changelog extra variable (in the form 'key=value') +  --file-name FILE_NAME +                        file name of changelog (default: 'CHANGELOG.md') +  --prerelease-offset PRERELEASE_OFFSET +                        start pre-releases with this offset +  --version-scheme {pep440,semver,semver2} +                        choose version scheme +  --version-type {pep440,semver,semver2} +                        Deprecated, use --version-scheme +  --build-metadata BUILD_METADATA +                        Add additional build-metadata to the version-number +  --get-next            Determine the next version and write to stdout + diff --git a/docs/images/cli_help/cz_changelog___help.svg b/docs/images/cli_help/cz_changelog___help.svg index 8cb3fcf2fe..1160ccf6cf 100644 --- a/docs/images/cli_help/cz_changelog___help.svg +++ b/docs/images/cli_help/cz_changelog___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz changelog --help -usage: cz changelog [-h][--dry-run][--file-name FILE_NAME] -[--unreleased-version UNRELEASED_VERSION][--incremental] -[--start-rev START_REV][--merge-prerelease] -[--version-scheme {pep440,semver,semver2}] -[--export-template EXPORT_TEMPLATE][--template TEMPLATE] -[--extra EXTRA] - - -generate changelog (note that it will overwrite existing file) - -positional arguments: -  rev_range             generates changelog for the given version (e.g: 1.5.3) -                        or version range (e.g: 1.5.3..1.7.9) - -options: -  -h, --help            show this help message and exit -  --dry-run             show changelog to stdout -  --file-name FILE_NAME -                        file name of changelog (default: 'CHANGELOG.md') -  --unreleased-version UNRELEASED_VERSION -                        set the value for the new version (use the tag value), -                        instead of using unreleased -  --incremental         generates changelog from last created version, useful -                        if the changelog has been manually modified -  --start-rev START_REV -                        start rev of the changelog. If not set, it will -                        generate changelog from the start -  --merge-prerelease    collect all changes from prereleases into next non- -                        prerelease. If not set, it will include prereleases in -                        the changelog -  --version-scheme {pep440,semver,semver2} -                        choose version scheme -  --export-template EXPORT_TEMPLATE -                        Export the changelog template into this file instead -                        of rendering it -  --template TEMPLATE, -t TEMPLATE -                        changelog template file name (relative to the current -                        working directory) -  --extra EXTRA, -e EXTRA -                        a changelog extra variable (in the form 'key=value') - + + $ cz changelog --help +usage: cz changelog [-h][--dry-run][--file-name FILE_NAME] +[--unreleased-version UNRELEASED_VERSION][--incremental] +[--start-rev START_REV][--merge-prerelease] +[--version-scheme {pep440,semver,semver2}] +[--export-template EXPORT_TEMPLATE][--template TEMPLATE] +[--extra EXTRA] + + +generate changelog (note that it will overwrite existing file) + +positional arguments: +  rev_range             generates changelog for the given version (e.g: 1.5.3) +                        or version range (e.g: 1.5.3..1.7.9) + +options: +  -h, --help            show this help message and exit +  --dry-run             show changelog to stdout +  --file-name FILE_NAME +                        file name of changelog (default: 'CHANGELOG.md') +  --unreleased-version UNRELEASED_VERSION +                        set the value for the new version (use the tag value), +                        instead of using unreleased +  --incremental         generates changelog from last created version, useful +                        if the changelog has been manually modified +  --start-rev START_REV +                        start rev of the changelog. If not set, it will +                        generate changelog from the start +  --merge-prerelease    collect all changes from prereleases into next non- +                        prerelease. If not set, it will include prereleases in +                        the changelog +  --version-scheme {pep440,semver,semver2} +                        choose version scheme +  --export-template EXPORT_TEMPLATE +                        Export the changelog template into this file instead +                        of rendering it +  --template, -t TEMPLATE +                        changelog template file name (relative to the current +                        working directory) +  --extra, -e EXTRA     a changelog extra variable (in the form 'key=value') + diff --git a/docs/images/cli_help/cz_check___help.svg b/docs/images/cli_help/cz_check___help.svg index 922a6458a6..690bfec684 100644 --- a/docs/images/cli_help/cz_check___help.svg +++ b/docs/images/cli_help/cz_check___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz check --help -usage: cz check [-h] -[--commit-msg-file COMMIT_MSG_FILE | --rev-range REV_RANGE | -m  -MESSAGE] -[--allow-abort][--allowed-prefixes [ALLOWED_PREFIXES ...]] -[-l MESSAGE_LENGTH_LIMIT] - -validates that a commit message matches the commitizen schema - -options: -  -h, --help            show this help message and exit -  --commit-msg-file COMMIT_MSG_FILE -                        ask for the name of the temporal file that contains -                        the commit message. Using it in a git hook script: -MSG_FILE=$1 -  --rev-range REV_RANGE -                        a range of git rev to check. e.g, master..HEAD -  -m MESSAGE, --message MESSAGE -                        commit message that needs to be checked -  --allow-abort         allow empty commit messages, which typically abort a -                        commit -  --allowed-prefixes [ALLOWED_PREFIXES ...] -                        allowed commit message prefixes. If the message starts -                        by one of these prefixes, the message won't be checked -                        against the regex -  -l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT -                        length limit of the commit message; 0 for no limit - + + $ cz check --help +usage: cz check [-h][--commit-msg-file COMMIT_MSG_FILE | +                --rev-range REV_RANGE | -m MESSAGE][--allow-abort] +[--allowed-prefixes [ALLOWED_PREFIXES ...]] +[-l MESSAGE_LENGTH_LIMIT] + +validates that a commit message matches the commitizen schema + +options: +  -h, --help            show this help message and exit +  --commit-msg-file COMMIT_MSG_FILE +                        ask for the name of the temporal file that contains +                        the commit message. Using it in a git hook script: +MSG_FILE=$1 +  --rev-range REV_RANGE +                        a range of git rev to check. e.g, master..HEAD +  -m, --message MESSAGE +                        commit message that needs to be checked +  --allow-abort         allow empty commit messages, which typically abort a +                        commit +  --allowed-prefixes [ALLOWED_PREFIXES ...] +                        allowed commit message prefixes. If the message starts +                        by one of these prefixes, the message won't be checked +                        against the regex +  -l, --message-length-limit MESSAGE_LENGTH_LIMIT +                        length limit of the commit message; 0 for no limit + diff --git a/docs/images/cli_help/cz_commit___help.svg b/docs/images/cli_help/cz_commit___help.svg index 0346c40588..5aea02232f 100644 --- a/docs/images/cli_help/cz_commit___help.svg +++ b/docs/images/cli_help/cz_commit___help.svg @@ -19,95 +19,95 @@ font-weight: 700; } - .terminal-1670560432-matrix { + .terminal-463778956-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1670560432-title { + .terminal-463778956-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1670560432-r1 { fill: #c5c8c6 } -.terminal-1670560432-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-1670560432-r3 { fill: #68a0b3;font-weight: bold } + .terminal-463778956-r1 { fill: #c5c8c6 } +.terminal-463778956-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-463778956-r3 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -119,33 +119,33 @@ - + - - $ cz commit --help -usage: cz commit [-h][--retry][--no-retry][--dry-run] -[--write-message-to-file FILE_PATH][-s][-a][-e] -[-l MESSAGE_LENGTH_LIMIT][--] - -create new commit - -options: -  -h, --help            show this help message and exit -  --retry               retry last commit -  --no-retry            skip retry if retry_after_failure is set to true -  --dry-run             show output to stdout, no commit, no modified files -  --write-message-to-file FILE_PATH -                        write message to file before committing (can be -                        combined with --dry-run) -  -s, --signoff         sign off the commit -  -a, --all             Tell the command to automatically stage files that -                        have been modified and deleted, but new files you have -                        not told Git about are not affected. -  -e, --edit            edit the commit message before committing -  -l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT -                        length limit of the commit message; 0 for no limit -  --                    Positional arguments separator (recommended) - + + $ cz commit --help +usage: cz commit [-h][--retry][--no-retry][--dry-run] +[--write-message-to-file FILE_PATH][-s][-a][-e] +[-l MESSAGE_LENGTH_LIMIT][--] + +create new commit + +options: +  -h, --help            show this help message and exit +  --retry               retry last commit +  --no-retry            skip retry if retry_after_failure is set to true +  --dry-run             show output to stdout, no commit, no modified files +  --write-message-to-file FILE_PATH +                        write message to file before committing (can be +                        combined with --dry-run) +  -s, --signoff         sign off the commit +  -a, --all             Tell the command to automatically stage files that +                        have been modified and deleted, but new files you have +                        not told Git about are not affected. +  -e, --edit            edit the commit message before committing +  -l, --message-length-limit MESSAGE_LENGTH_LIMIT +                        length limit of the commit message; 0 for no limit +  --                    Positional arguments separator (recommended) + From 646a9df524c887e4c043bbda03a4561df327c6ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 01:25:00 +0000 Subject: [PATCH 039/159] build(deps-dev): bump ruff from 0.8.5 to 0.9.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.5 to 0.9.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.5...0.9.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 40 ++++++++++++++++++++-------------------- pyproject.toml | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5698043093..aaf4e460a8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1425,29 +1425,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.8.5" +version = "0.9.3" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.8.5-py3-none-linux_armv6l.whl", hash = "sha256:5ad11a5e3868a73ca1fa4727fe7e33735ea78b416313f4368c504dbeb69c0f88"}, - {file = "ruff-0.8.5-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:f69ab37771ea7e0715fead8624ec42996d101269a96e31f4d31be6fc33aa19b7"}, - {file = "ruff-0.8.5-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b5462d7804558ccff9c08fe8cbf6c14b7efe67404316696a2dde48297b1925bb"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d56de7220a35607f9fe59f8a6d018e14504f7b71d784d980835e20fc0611cd50"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9d99cf80b0429cbebf31cbbf6f24f05a29706f0437c40413d950e67e2d4faca4"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7b75ac29715ac60d554a049dbb0ef3b55259076181c3369d79466cb130eb5afd"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c9d526a62c9eda211b38463528768fd0ada25dad524cb33c0e99fcff1c67b5dc"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:587c5e95007612c26509f30acc506c874dab4c4abbacd0357400bd1aa799931b"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:622b82bf3429ff0e346835ec213aec0a04d9730480cbffbb6ad9372014e31bbd"}, - {file = "ruff-0.8.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f99be814d77a5dac8a8957104bdd8c359e85c86b0ee0e38dca447cb1095f70fb"}, - {file = "ruff-0.8.5-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:c01c048f9c3385e0fd7822ad0fd519afb282af9cf1778f3580e540629df89725"}, - {file = "ruff-0.8.5-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7512e8cb038db7f5db6aae0e24735ff9ea03bb0ed6ae2ce534e9baa23c1dc9ea"}, - {file = "ruff-0.8.5-py3-none-musllinux_1_2_i686.whl", hash = "sha256:762f113232acd5b768d6b875d16aad6b00082add40ec91c927f0673a8ec4ede8"}, - {file = "ruff-0.8.5-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:03a90200c5dfff49e4c967b405f27fdfa81594cbb7c5ff5609e42d7fe9680da5"}, - {file = "ruff-0.8.5-py3-none-win32.whl", hash = "sha256:8710ffd57bdaa6690cbf6ecff19884b8629ec2a2a2a2f783aa94b1cc795139ed"}, - {file = "ruff-0.8.5-py3-none-win_amd64.whl", hash = "sha256:4020d8bf8d3a32325c77af452a9976a9ad6455773bcb94991cf15bd66b347e47"}, - {file = "ruff-0.8.5-py3-none-win_arm64.whl", hash = "sha256:134ae019ef13e1b060ab7136e7828a6d83ea727ba123381307eb37c6bd5e01cb"}, - {file = "ruff-0.8.5.tar.gz", hash = "sha256:1098d36f69831f7ff2a1da3e6407d5fbd6dfa2559e4f74ff2d260c5588900317"}, + {file = "ruff-0.9.3-py3-none-linux_armv6l.whl", hash = "sha256:7f39b879064c7d9670197d91124a75d118d00b0990586549949aae80cdc16624"}, + {file = "ruff-0.9.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a187171e7c09efa4b4cc30ee5d0d55a8d6c5311b3e1b74ac5cb96cc89bafc43c"}, + {file = "ruff-0.9.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c59ab92f8e92d6725b7ded9d4a31be3ef42688a115c6d3da9457a5bda140e2b4"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dc153c25e715be41bb228bc651c1e9b1a88d5c6e5ed0194fa0dfea02b026439"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:646909a1e25e0dc28fbc529eab8eb7bb583079628e8cbe738192853dbbe43af5"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a5a46e09355695fbdbb30ed9889d6cf1c61b77b700a9fafc21b41f097bfbba4"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c4bb09d2bbb394e3730d0918c00276e79b2de70ec2a5231cd4ebb51a57df9ba1"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96a87ec31dc1044d8c2da2ebbed1c456d9b561e7d087734336518181b26b3aa5"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb7554aca6f842645022fe2d301c264e6925baa708b392867b7a62645304df4"}, + {file = "ruff-0.9.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cabc332b7075a914ecea912cd1f3d4370489c8018f2c945a30bcc934e3bc06a6"}, + {file = "ruff-0.9.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:33866c3cc2a575cbd546f2cd02bdd466fed65118e4365ee538a3deffd6fcb730"}, + {file = "ruff-0.9.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:006e5de2621304c8810bcd2ee101587712fa93b4f955ed0985907a36c427e0c2"}, + {file = "ruff-0.9.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ba6eea4459dbd6b1be4e6bfc766079fb9b8dd2e5a35aff6baee4d9b1514ea519"}, + {file = "ruff-0.9.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:90230a6b8055ad47d3325e9ee8f8a9ae7e273078a66401ac66df68943ced029b"}, + {file = "ruff-0.9.3-py3-none-win32.whl", hash = "sha256:eabe5eb2c19a42f4808c03b82bd313fc84d4e395133fb3fc1b1516170a31213c"}, + {file = "ruff-0.9.3-py3-none-win_amd64.whl", hash = "sha256:040ceb7f20791dfa0e78b4230ee9dce23da3b64dd5848e40e3bf3ab76468dcf4"}, + {file = "ruff-0.9.3-py3-none-win_arm64.whl", hash = "sha256:800d773f6d4d33b0a3c60e2c6ae8f4c202ea2de056365acfa519aa48acf28e0b"}, + {file = "ruff-0.9.3.tar.gz", hash = "sha256:8293f89985a090ebc3ed1064df31f3b4b56320cdfcec8b60d3295bddb955c22a"}, ] [[package]] @@ -1772,4 +1772,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.9" -content-hash = "36ac305c62f5139da82126a1b3bc71f86320af1abab5c473b3c0d21c81e214bd" +content-hash = "ac79ae58b65962eac836910d2b1359591d1fd53c68afb354b4c549cdcdd4349c" diff --git a/pyproject.toml b/pyproject.toml index 094d6fca0b..8ee2cf8d58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ pytest-regressions = "^2.4.0" pytest-freezer = "^0.4.6" pytest-xdist = "^3.1.0" # linter -ruff = ">=0.5.0,<0.9.0" +ruff = ">=0.5.0,<0.10.0" pre-commit = ">=2.18,<5.0" mypy = "^1.4" types-PyYAML = ">=5.4.3,<7.0.0" From e6dcdbc13bfa22db73bf97ca0ac5860f4a252490 Mon Sep 17 00:00:00 2001 From: "Axel H." Date: Wed, 29 Jan 2025 20:04:12 +0100 Subject: [PATCH 040/159] style: fix formatting for `ruff>=0.9` --- commitizen/cli.py | 3 +-- commitizen/commands/bump.py | 7 +++---- .../conventional_commits.py | 4 +--- tests/commands/test_bump_command.py | 20 +++++++++---------- tests/commands/test_changelog_command.py | 2 +- tests/commands/test_check_command.py | 2 +- tests/commands/test_version_command.py | 2 +- tests/conftest.py | 8 +++----- tests/test_changelog.py | 6 +++--- tests/test_conf.py | 2 +- tests/test_cz_conventional_commits.py | 2 +- tests/test_git.py | 2 +- 12 files changed, 27 insertions(+), 33 deletions(-) diff --git a/commitizen/cli.py b/commitizen/cli.py index 2ee7d41eba..0b411cba60 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -71,8 +71,7 @@ def __call__( { "name": ["--template", "-t"], "help": ( - "changelog template file name " - "(relative to the current working directory)" + "changelog template file name (relative to the current working directory)" ), }, { diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index 1f98c19954..1b274061cb 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -252,7 +252,7 @@ def __call__(self) -> None: # noqa: C901 # Unless we previously had a prerelease. if not commits and not current_version.is_prerelease: raise NoCommitsFoundError( - "[NO_COMMITS_FOUND]\n" "No new commits found." + "[NO_COMMITS_FOUND]\nNo new commits found." ) increment = self.find_increment(commits) @@ -296,7 +296,7 @@ def __call__(self) -> None: # noqa: C901 raise GetNextExit() # Report found information - information = f"{message}\n" f"tag to create: {new_tag_version}\n" + information = f"{message}\ntag to create: {new_tag_version}\n" if increment: information += f"increment detected: {increment}\n" @@ -310,8 +310,7 @@ def __call__(self) -> None: # noqa: C901 if increment is None and new_tag_version == current_tag_version: raise NoneIncrementExit( - "[NO_COMMITS_TO_BUMP]\n" - "The commits found are not eligible to be bumped" + "[NO_COMMITS_TO_BUMP]\nThe commits found are not eligible to be bumped" ) files: list[str] = [] diff --git a/commitizen/cz/conventional_commits/conventional_commits.py b/commitizen/cz/conventional_commits/conventional_commits.py index dcfd7bab89..c7b88258cb 100644 --- a/commitizen/cz/conventional_commits/conventional_commits.py +++ b/commitizen/cz/conventional_commits/conventional_commits.py @@ -86,9 +86,7 @@ def questions(self) -> Questions: }, { "value": "test", - "name": ( - "test: Adding missing or correcting " "existing tests" - ), + "name": ("test: Adding missing or correcting existing tests"), "key": "t", }, { diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index 8acb5143c7..728a424107 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -102,7 +102,7 @@ def test_bump_minor_increment_annotated_config_file( ): tmp_commitizen_cfg_file = tmp_commitizen_project.join("pyproject.toml") tmp_commitizen_cfg_file.write( - f"{tmp_commitizen_cfg_file.read()}\n" f"annotated_tag = 1" + f"{tmp_commitizen_cfg_file.read()}\nannotated_tag = 1" ) create_file_and_commit(commit_msg) testargs = ["cz", "bump", "--yes"] @@ -121,7 +121,7 @@ def test_bump_minor_increment_signed_config_file( commit_msg, mocker: MockFixture, tmp_commitizen_project_with_gpg ): tmp_commitizen_cfg_file = tmp_commitizen_project_with_gpg.join("pyproject.toml") - tmp_commitizen_cfg_file.write(f"{tmp_commitizen_cfg_file.read()}\n" f"gpg_sign = 1") + tmp_commitizen_cfg_file.write(f"{tmp_commitizen_cfg_file.read()}\ngpg_sign = 1") create_file_and_commit(commit_msg) testargs = ["cz", "bump", "--yes"] mocker.patch.object(sys, "argv", testargs) @@ -383,7 +383,7 @@ def test_bump_on_git_with_hooks_no_verify_disabled(mocker: MockFixture): """Bump commit without --no-verify""" cmd.run("mkdir .git/hooks") with open(".git/hooks/pre-commit", "w", encoding="utf-8") as f: - f.write("#!/usr/bin/env bash\n" 'echo "0.1.0"') + f.write('#!/usr/bin/env bash\necho "0.1.0"') cmd.run("chmod +x .git/hooks/pre-commit") # MINOR @@ -402,7 +402,7 @@ def test_bump_on_git_with_hooks_no_verify_disabled(mocker: MockFixture): def test_bump_tag_exists_raises_exception(mocker: MockFixture): cmd.run("mkdir .git/hooks") with open(".git/hooks/post-commit", "w", encoding="utf-8") as f: - f.write("#!/usr/bin/env bash\n" "exit 9") + f.write("#!/usr/bin/env bash\nexit 9") cmd.run("chmod +x .git/hooks/post-commit") # MINOR @@ -421,7 +421,7 @@ def test_bump_tag_exists_raises_exception(mocker: MockFixture): def test_bump_on_git_with_hooks_no_verify_enabled(mocker: MockFixture): cmd.run("mkdir .git/hooks") with open(".git/hooks/pre-commit", "w", encoding="utf-8") as f: - f.write("#!/usr/bin/env bash\n" 'echo "0.1.0"') + f.write('#!/usr/bin/env bash\necho "0.1.0"') cmd.run("chmod +x .git/hooks/pre-commit") # MINOR @@ -478,7 +478,7 @@ def test_bump_when_no_new_commit(mocker: MockFixture): with pytest.raises(NoCommitsFoundError) as excinfo: cli.main() - expected_error_message = "[NO_COMMITS_FOUND]\n" "No new commits found." + expected_error_message = "[NO_COMMITS_FOUND]\nNo new commits found." assert expected_error_message in str(excinfo.value) @@ -710,7 +710,7 @@ def test_prevent_prerelease_when_no_increment_detected(mocker: MockFixture, caps cli.main() expected_error_message = ( - "[NO_COMMITS_FOUND]\n" "No commits found to generate a pre-release." + "[NO_COMMITS_FOUND]\nNo commits found to generate a pre-release." ) assert expected_error_message in str(excinfo.value) @@ -862,7 +862,7 @@ def test_bump_changelog_command_commits_untracked_changelog_and_version_files( mode="a", encoding="utf-8", ) as commitizen_config: - commitizen_config.write(f"version_files = [\n" f"'{version_regex}'\n]") + commitizen_config.write(f"version_files = [\n'{version_regex}'\n]") with tmp_commitizen_project.join(version_filepath).open( mode="a+", encoding="utf-8" @@ -917,7 +917,7 @@ def test_bump_invalid_manual_version_raises_exception(mocker, manual_version): cli.main() expected_error_message = ( - "[INVALID_MANUAL_VERSION]\n" f"Invalid manual version: '{manual_version}'" + f"[INVALID_MANUAL_VERSION]\nInvalid manual version: '{manual_version}'" ) assert expected_error_message in str(excinfo.value) @@ -1425,7 +1425,7 @@ def test_bump_changelog_contains_increment_only(mocker, tmp_commitizen_project, project_root = Path(tmp_commitizen_project) tmp_commitizen_cfg_file = project_root / "pyproject.toml" tmp_commitizen_cfg_file.write_text( - "[tool.commitizen]\n" 'version="1.0.0"\n' "update_changelog_on_bump = true\n" + '[tool.commitizen]\nversion="1.0.0"\nupdate_changelog_on_bump = true\n' ) tmp_changelog_file = project_root / "CHANGELOG.md" tmp_changelog_file.write_text("## v1.0.0") diff --git a/tests/commands/test_changelog_command.py b/tests/commands/test_changelog_command.py index bc0d6c6a28..a6ff7db2d8 100644 --- a/tests/commands/test_changelog_command.py +++ b/tests/commands/test_changelog_command.py @@ -1295,7 +1295,7 @@ def test_changelog_prerelease_rev_with_use_scheme_semver( mocker.patch("commitizen.git.GitTag.date", "2022-02-13") with open(config_path, "a") as f: - f.write('tag_format = "$version"\n' 'version_scheme = "semver"') + f.write('tag_format = "$version"\nversion_scheme = "semver"') # create commit and tag create_file_and_commit("feat: new file") diff --git a/tests/commands/test_check_command.py b/tests/commands/test_check_command.py index 57bfe3f10a..f1db446190 100644 --- a/tests/commands/test_check_command.py +++ b/tests/commands/test_check_command.py @@ -238,7 +238,7 @@ def test_check_a_range_of_failed_git_commits(config, mocker: MockFixture): ill_formated_commits_msgs = [ "First commit does not follow rule", "Second commit does not follow rule", - ("Third commit does not follow rule\n" "Ill-formatted commit with body"), + ("Third commit does not follow rule\nIll-formatted commit with body"), ] mocker.patch( "commitizen.git.get_commits", diff --git a/tests/commands/test_version_command.py b/tests/commands/test_version_command.py index f7d38c202d..927cf55f25 100644 --- a/tests/commands/test_version_command.py +++ b/tests/commands/test_version_command.py @@ -61,7 +61,7 @@ def test_version_for_showing_both_versions(config, capsys): )() captured = capsys.readouterr() expected_out = ( - f"Installed Commitizen Version: {__version__}\n" f"Project Version: v0.0.1" + f"Installed Commitizen Version: {__version__}\nProject Version: v0.0.1" ) assert expected_out in captured.out diff --git a/tests/conftest.py b/tests/conftest.py index 1e6bc15f0c..3d88f19b12 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -69,7 +69,7 @@ def tmp_git_project(tmpdir): @pytest.fixture(scope="function") def tmp_commitizen_project(tmp_git_project): tmp_commitizen_cfg_file = tmp_git_project.join("pyproject.toml") - tmp_commitizen_cfg_file.write("[tool.commitizen]\n" 'version="0.1.0"\n') + tmp_commitizen_cfg_file.write('[tool.commitizen]\nversion="0.1.0"\n') yield tmp_git_project @@ -83,9 +83,7 @@ def _initial( ): with tmp_git_project.as_cwd(): tmp_commitizen_cfg_file = tmp_git_project.join("pyproject.toml") - tmp_commitizen_cfg_file.write( - f"[tool.commitizen]\n" f'version="{version}"\n' - ) + tmp_commitizen_cfg_file.write(f'[tool.commitizen]\nversion="{version}"\n') tmp_version_file = tmp_git_project.join("__version__.py") tmp_version_file.write(version) tmp_commitizen_cfg_file = tmp_git_project.join("pyproject.toml") @@ -251,7 +249,7 @@ def changelog_format( if "tmp_commitizen_project" in request.fixturenames: tmp_commitizen_project = request.getfixturevalue("tmp_commitizen_project") pyproject = tmp_commitizen_project / "pyproject.toml" - pyproject.write(f"{pyproject.read()}\n" f'changelog_format = "{format}"\n') + pyproject.write(f'{pyproject.read()}\nchangelog_format = "{format}"\n') return get_changelog_format(config) diff --git a/tests/test_changelog.py b/tests/test_changelog.py index 20d59488d3..76ee80600b 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -1413,9 +1413,9 @@ def changelog_message_builder_hook(message: dict, commit: git.GitCommit): for no, line in enumerate(result.splitlines()): if (line := line.strip()) and (match := RE_HEADER.match(line)): change_type = match.group("type") - assert ( - change_type == "overridden" - ), f"Line {no}: type {change_type} should have been overridden" + assert change_type == "overridden", ( + f"Line {no}: type {change_type} should have been overridden" + ) def test_render_changelog_with_changelog_release_hook( diff --git a/tests/test_conf.py b/tests/test_conf.py index 1cbbc57aca..3e0a44c7dd 100644 --- a/tests/test_conf.py +++ b/tests/test_conf.py @@ -235,7 +235,7 @@ def test_init_empty_config_content(self, tmpdir, config_file, exception_string): def test_init_empty_config_content_with_existing_content( self, tmpdir, config_file, exception_string ): - existing_content = "[tool.black]\n" "line-length = 88\n" + existing_content = "[tool.black]\nline-length = 88\n" path = tmpdir.mkdir("commitizen").join(config_file) path.write(existing_content) diff --git a/tests/test_cz_conventional_commits.py b/tests/test_cz_conventional_commits.py index 04d0522174..6d4e0f7435 100644 --- a/tests/test_cz_conventional_commits.py +++ b/tests/test_cz_conventional_commits.py @@ -7,7 +7,7 @@ ) from commitizen.cz.exceptions import AnswerRequiredError -valid_scopes = ["", "simple", "dash-separated", "camelCase" "UPPERCASE"] +valid_scopes = ["", "simple", "dash-separated", "camelCaseUPPERCASE"] scopes_transformations = [["with spaces", "with-spaces"], [None, ""]] diff --git a/tests/test_git.py b/tests/test_git.py index 8bf995e8a8..f929ba6a44 100644 --- a/tests/test_git.py +++ b/tests/test_git.py @@ -84,7 +84,7 @@ def test_get_reachable_tags_with_commits( def test_get_tag_names(mocker: MockFixture): - tag_str = "v1.0.0\n" "v0.5.0\n" "v0.0.1\n" + tag_str = "v1.0.0\nv0.5.0\nv0.0.1\n" mocker.patch("commitizen.cmd.run", return_value=FakeCommand(out=tag_str)) assert git.get_tag_names() == ["v1.0.0", "v0.5.0", "v0.0.1"] From b9febf5d223e01171e43d110b0e93b3e4c5543b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 01:53:27 +0000 Subject: [PATCH 041/159] build(deps-dev): bump ruff from 0.9.3 to 0.9.4 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.3 to 0.9.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.9.3...0.9.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/poetry.lock b/poetry.lock index aaf4e460a8..73c2b9f618 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1425,29 +1425,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "ruff" -version = "0.9.3" +version = "0.9.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.9.3-py3-none-linux_armv6l.whl", hash = "sha256:7f39b879064c7d9670197d91124a75d118d00b0990586549949aae80cdc16624"}, - {file = "ruff-0.9.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a187171e7c09efa4b4cc30ee5d0d55a8d6c5311b3e1b74ac5cb96cc89bafc43c"}, - {file = "ruff-0.9.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c59ab92f8e92d6725b7ded9d4a31be3ef42688a115c6d3da9457a5bda140e2b4"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dc153c25e715be41bb228bc651c1e9b1a88d5c6e5ed0194fa0dfea02b026439"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:646909a1e25e0dc28fbc529eab8eb7bb583079628e8cbe738192853dbbe43af5"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a5a46e09355695fbdbb30ed9889d6cf1c61b77b700a9fafc21b41f097bfbba4"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c4bb09d2bbb394e3730d0918c00276e79b2de70ec2a5231cd4ebb51a57df9ba1"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96a87ec31dc1044d8c2da2ebbed1c456d9b561e7d087734336518181b26b3aa5"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb7554aca6f842645022fe2d301c264e6925baa708b392867b7a62645304df4"}, - {file = "ruff-0.9.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cabc332b7075a914ecea912cd1f3d4370489c8018f2c945a30bcc934e3bc06a6"}, - {file = "ruff-0.9.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:33866c3cc2a575cbd546f2cd02bdd466fed65118e4365ee538a3deffd6fcb730"}, - {file = "ruff-0.9.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:006e5de2621304c8810bcd2ee101587712fa93b4f955ed0985907a36c427e0c2"}, - {file = "ruff-0.9.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ba6eea4459dbd6b1be4e6bfc766079fb9b8dd2e5a35aff6baee4d9b1514ea519"}, - {file = "ruff-0.9.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:90230a6b8055ad47d3325e9ee8f8a9ae7e273078a66401ac66df68943ced029b"}, - {file = "ruff-0.9.3-py3-none-win32.whl", hash = "sha256:eabe5eb2c19a42f4808c03b82bd313fc84d4e395133fb3fc1b1516170a31213c"}, - {file = "ruff-0.9.3-py3-none-win_amd64.whl", hash = "sha256:040ceb7f20791dfa0e78b4230ee9dce23da3b64dd5848e40e3bf3ab76468dcf4"}, - {file = "ruff-0.9.3-py3-none-win_arm64.whl", hash = "sha256:800d773f6d4d33b0a3c60e2c6ae8f4c202ea2de056365acfa519aa48acf28e0b"}, - {file = "ruff-0.9.3.tar.gz", hash = "sha256:8293f89985a090ebc3ed1064df31f3b4b56320cdfcec8b60d3295bddb955c22a"}, + {file = "ruff-0.9.4-py3-none-linux_armv6l.whl", hash = "sha256:64e73d25b954f71ff100bb70f39f1ee09e880728efb4250c632ceed4e4cdf706"}, + {file = "ruff-0.9.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6ce6743ed64d9afab4fafeaea70d3631b4d4b28b592db21a5c2d1f0ef52934bf"}, + {file = "ruff-0.9.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:54499fb08408e32b57360f6f9de7157a5fec24ad79cb3f42ef2c3f3f728dfe2b"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37c892540108314a6f01f105040b5106aeb829fa5fb0561d2dcaf71485021137"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:de9edf2ce4b9ddf43fd93e20ef635a900e25f622f87ed6e3047a664d0e8f810e"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:87c90c32357c74f11deb7fbb065126d91771b207bf9bfaaee01277ca59b574ec"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:56acd6c694da3695a7461cc55775f3a409c3815ac467279dfa126061d84b314b"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e0c93e7d47ed951b9394cf352d6695b31498e68fd5782d6cbc282425655f687a"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1d4c8772670aecf037d1bf7a07c39106574d143b26cfe5ed1787d2f31e800214"}, + {file = "ruff-0.9.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfc5f1d7afeda8d5d37660eeca6d389b142d7f2b5a1ab659d9214ebd0e025231"}, + {file = "ruff-0.9.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:faa935fc00ae854d8b638c16a5f1ce881bc3f67446957dd6f2af440a5fc8526b"}, + {file = "ruff-0.9.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a6c634fc6f5a0ceae1ab3e13c58183978185d131a29c425e4eaa9f40afe1e6d6"}, + {file = "ruff-0.9.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:433dedf6ddfdec7f1ac7575ec1eb9844fa60c4c8c2f8887a070672b8d353d34c"}, + {file = "ruff-0.9.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d612dbd0f3a919a8cc1d12037168bfa536862066808960e0cc901404b77968f0"}, + {file = "ruff-0.9.4-py3-none-win32.whl", hash = "sha256:db1192ddda2200671f9ef61d9597fcef89d934f5d1705e571a93a67fb13a4402"}, + {file = "ruff-0.9.4-py3-none-win_amd64.whl", hash = "sha256:05bebf4cdbe3ef75430d26c375773978950bbf4ee3c95ccb5448940dc092408e"}, + {file = "ruff-0.9.4-py3-none-win_arm64.whl", hash = "sha256:585792f1e81509e38ac5123492f8875fbc36f3ede8185af0a26df348e5154f41"}, + {file = "ruff-0.9.4.tar.gz", hash = "sha256:6907ee3529244bb0ed066683e075f09285b38dd5b4039370df6ff06041ca19e7"}, ] [[package]] From 54b4fdac5dda187875e5fee97f0100e26f8fe4df Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Thu, 30 Jan 2025 22:25:16 +0800 Subject: [PATCH 042/159] build(poetry): migrate to poetry 2.0 and follow pep 621 --- poetry.lock | 99 +++++++++++++++++++++++++++++++++-- pyproject.toml | 136 +++++++++++++++++++++++++++---------------------- 2 files changed, 169 insertions(+), 66 deletions(-) diff --git a/poetry.lock b/poetry.lock index 73c2b9f618..ebdf60ddda 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. [[package]] name = "argcomplete" @@ -6,6 +6,7 @@ version = "3.5.3" description = "Bash tab completion for argparse" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "argcomplete-3.5.3-py3-none-any.whl", hash = "sha256:2ab2c4a215c59fd6caaff41a869480a23e8f6a5f910b266c1808037f4e375b61"}, {file = "argcomplete-3.5.3.tar.gz", hash = "sha256:c12bf50eded8aebb298c7b7da7a5ff3ee24dffd9f5281867dfe1424b58c55392"}, @@ -20,6 +21,7 @@ version = "2.4.1" description = "Annotate AST trees with source code positions" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "asttokens-2.4.1-py2.py3-none-any.whl", hash = "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24"}, {file = "asttokens-2.4.1.tar.gz", hash = "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0"}, @@ -38,6 +40,7 @@ version = "2.16.0" description = "Internationalization utilities" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b"}, {file = "babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316"}, @@ -52,6 +55,7 @@ version = "2024.8.30" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, @@ -63,6 +67,7 @@ version = "3.4.0" description = "Validate configuration and produce human readable error messages." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9"}, {file = "cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560"}, @@ -74,6 +79,7 @@ version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" +groups = ["main", "dev"] files = [ {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, @@ -175,6 +181,7 @@ version = "8.1.7" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, @@ -189,6 +196,7 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main", "dev"] files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -200,6 +208,7 @@ version = "7.6.8" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "coverage-7.6.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b39e6011cd06822eb964d038d5dff5da5d98652b81f5ecd439277b32361a3a50"}, {file = "coverage-7.6.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:63c19702db10ad79151a059d2d6336fe0c470f2e18d0d4d1a57f7f9713875dcf"}, @@ -277,6 +286,7 @@ version = "0.6.2" description = "Minimal, easy-to-use, declarative cli tool" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "decli-0.6.2-py3-none-any.whl", hash = "sha256:2fc84106ce9a8f523ed501ca543bdb7e416c064917c12a59ebdc7f311a97b7ed"}, {file = "decli-0.6.2.tar.gz", hash = "sha256:36f71eb55fd0093895efb4f416ec32b7f6e00147dda448e3365cf73ceab42d6f"}, @@ -288,6 +298,7 @@ version = "5.1.1" description = "Decorators for Humans" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, @@ -299,6 +310,7 @@ version = "1.2.18" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" +groups = ["dev"] files = [ {file = "Deprecated-1.2.18-py2.py3-none-any.whl", hash = "sha256:bd5011788200372a32418f888e326a09ff80d0214bd961147cfed01b5c018eec"}, {file = "deprecated-1.2.18.tar.gz", hash = "sha256:422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d"}, @@ -316,6 +328,7 @@ version = "0.3.9" description = "Distribution utilities" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87"}, {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"}, @@ -327,6 +340,8 @@ version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -341,6 +356,7 @@ version = "2.1.1" description = "execnet: rapid multi-Python deployment" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc"}, {file = "execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3"}, @@ -355,6 +371,7 @@ version = "2.1.0" description = "Get the currently executing AST node of a frame, and other information" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "executing-2.1.0-py2.py3-none-any.whl", hash = "sha256:8d63781349375b5ebccc3142f4b30350c0cd9c79f921cde38be2be4637e98eaf"}, {file = "executing-2.1.0.tar.gz", hash = "sha256:8ea27ddd260da8150fa5a708269c4a10e76161e2496ec3e587da9e3c0fe4b9ab"}, @@ -369,6 +386,7 @@ version = "3.16.1" description = "A platform independent file lock." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, @@ -385,6 +403,7 @@ version = "1.5.1" description = "Let your Python tests travel through time" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "freezegun-1.5.1-py3-none-any.whl", hash = "sha256:bf111d7138a8abe55ab48a71755673dbaa4ab87f4cff5634a4442dfec34c15f1"}, {file = "freezegun-1.5.1.tar.gz", hash = "sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9"}, @@ -399,6 +418,7 @@ version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"}, {file = "ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619"}, @@ -416,6 +436,7 @@ version = "2.6.3" description = "File identification library for Python" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "identify-2.6.3-py2.py3-none-any.whl", hash = "sha256:9edba65473324c2ea9684b1f944fe3191db3345e50b6d04571d10ed164f8d7bd"}, {file = "identify-2.6.3.tar.gz", hash = "sha256:62f5dae9b5fef52c84cc188514e9ea4f3f636b1d8799ab5ebc475471f9e47a02"}, @@ -430,6 +451,7 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -444,6 +466,8 @@ version = "8.6.1" description = "Read metadata from Python packages" optional = false python-versions = ">=3.9" +groups = ["main", "dev"] +markers = "python_version < \"3.10\"" files = [ {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, {file = "importlib_metadata-8.6.1.tar.gz", hash = "sha256:310b41d755445d74569f993ccfc22838295d9fe005425094fad953d7f15c8580"}, @@ -467,6 +491,7 @@ version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -478,6 +503,7 @@ version = "8.18.1" description = "IPython: Productive Interactive Computing" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "ipython-8.18.1-py3-none-any.whl", hash = "sha256:e8267419d72d81955ec1177f8a29aaa90ac80ad647499201119e2f05e99aa397"}, {file = "ipython-8.18.1.tar.gz", hash = "sha256:ca6f079bb33457c66e233e4580ebfc4128855b4cf6370dddd73842a9563e8a27"}, @@ -515,6 +541,7 @@ version = "0.19.2" description = "An autocompletion tool for Python that can be used for text editors." optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "jedi-0.19.2-py2.py3-none-any.whl", hash = "sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9"}, {file = "jedi-0.19.2.tar.gz", hash = "sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0"}, @@ -534,6 +561,7 @@ version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" +groups = ["main", "dev"] files = [ {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, @@ -551,6 +579,7 @@ version = "3.7" description = "Python implementation of John Gruber's Markdown." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "Markdown-3.7-py3-none-any.whl", hash = "sha256:7eb6df5690b81a1d7942992c97fad2938e956e79df20cbc6186e9c3a77b1c803"}, {file = "markdown-3.7.tar.gz", hash = "sha256:2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2"}, @@ -569,6 +598,7 @@ version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, @@ -593,6 +623,7 @@ version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.9" +groups = ["main", "dev"] files = [ {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, @@ -663,6 +694,7 @@ version = "0.1.7" description = "Inline Matplotlib backend for Jupyter" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "matplotlib_inline-0.1.7-py3-none-any.whl", hash = "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca"}, {file = "matplotlib_inline-0.1.7.tar.gz", hash = "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90"}, @@ -677,6 +709,7 @@ version = "0.1.2" description = "Markdown URL utilities" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -688,6 +721,7 @@ version = "1.3.4" description = "A deep merge function for 🐍." optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, @@ -699,6 +733,7 @@ version = "1.6.1" description = "Project documentation with Markdown." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "mkdocs-1.6.1-py3-none-any.whl", hash = "sha256:db91759624d1647f3f34aa0c3f327dd2601beae39a366d6e064c03468d35c20e"}, {file = "mkdocs-1.6.1.tar.gz", hash = "sha256:7b432f01d928c084353ab39c57282f29f92136665bdd6abf7c1ec8d822ef86f2"}, @@ -730,6 +765,7 @@ version = "0.2.0" description = "MkDocs extension that lists all dependencies according to a mkdocs.yml file" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "mkdocs_get_deps-0.2.0-py3-none-any.whl", hash = "sha256:2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134"}, {file = "mkdocs_get_deps-0.2.0.tar.gz", hash = "sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c"}, @@ -747,6 +783,7 @@ version = "9.5.50" description = "Documentation that simply works" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "mkdocs_material-9.5.50-py3-none-any.whl", hash = "sha256:f24100f234741f4d423a9d672a909d859668a4f404796be3cf035f10d6050385"}, {file = "mkdocs_material-9.5.50.tar.gz", hash = "sha256:ae5fe16f3d7c9ccd05bb6916a7da7420cf99a9ce5e33debd9d40403a090d5825"}, @@ -776,6 +813,7 @@ version = "1.3.1" description = "Extension pack for Python Markdown and MkDocs Material." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31"}, {file = "mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443"}, @@ -787,6 +825,7 @@ version = "1.14.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, @@ -846,6 +885,7 @@ version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -857,6 +897,7 @@ version = "1.9.1" description = "Node.js virtual environment builder" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] files = [ {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, @@ -868,6 +909,7 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -879,6 +921,7 @@ version = "0.5.7" description = "Divides large result sets into pages for easier browsing" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "paginate-0.5.7-py2.py3-none-any.whl", hash = "sha256:b885e2af73abcf01d9559fd5216b57ef722f8c42affbb63942377668e35c7591"}, {file = "paginate-0.5.7.tar.gz", hash = "sha256:22bd083ab41e1a8b4f3690544afb2c60c25e5c9a63a30fa2f483f6c60c8e5945"}, @@ -894,6 +937,7 @@ version = "0.8.4" description = "A Python Parser" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18"}, {file = "parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d"}, @@ -909,6 +953,7 @@ version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, @@ -920,6 +965,8 @@ version = "4.9.0" description = "Pexpect allows easy control of interactive console applications." optional = false python-versions = "*" +groups = ["dev"] +markers = "sys_platform != \"win32\"" files = [ {file = "pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523"}, {file = "pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f"}, @@ -934,6 +981,7 @@ version = "4.3.6" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -950,6 +998,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -965,6 +1014,7 @@ version = "4.1.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "pre_commit-4.1.0-py2.py3-none-any.whl", hash = "sha256:d29e7cb346295bcc1cc75fc3e92e343495e3ea0196c9ec6ba53f49f10ab6ae7b"}, {file = "pre_commit-4.1.0.tar.gz", hash = "sha256:ae3f018575a588e30dfddfab9a05448bfbd6b73d78709617b5a2b853549716d4"}, @@ -983,6 +1033,7 @@ version = "3.0.48" description = "Library for building powerful interactive command lines in Python" optional = false python-versions = ">=3.7.0" +groups = ["main", "dev"] files = [ {file = "prompt_toolkit-3.0.48-py3-none-any.whl", hash = "sha256:f49a827f90062e411f1ce1f854f2aedb3c23353244f8108b89283587397ac10e"}, {file = "prompt_toolkit-3.0.48.tar.gz", hash = "sha256:d6623ab0477a80df74e646bdbc93621143f5caf104206aa29294d53de1a03d90"}, @@ -997,6 +1048,8 @@ version = "0.7.0" description = "Run a subprocess in a pseudo terminal" optional = false python-versions = "*" +groups = ["dev"] +markers = "sys_platform != \"win32\"" files = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, @@ -1008,6 +1061,7 @@ version = "0.2.3" description = "Safely evaluate AST nodes without side effects" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "pure_eval-0.2.3-py3-none-any.whl", hash = "sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0"}, {file = "pure_eval-0.2.3.tar.gz", hash = "sha256:5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42"}, @@ -1022,6 +1076,7 @@ version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, @@ -1036,6 +1091,7 @@ version = "10.12" description = "Extension pack for Python Markdown." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pymdown_extensions-10.12-py3-none-any.whl", hash = "sha256:49f81412242d3527b8b4967b990df395c89563043bc51a3d2d7d500e52123b77"}, {file = "pymdown_extensions-10.12.tar.gz", hash = "sha256:b0ee1e0b2bef1071a47891ab17003bfe5bf824a398e13f49f8ed653b699369a7"}, @@ -1054,6 +1110,7 @@ version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, @@ -1076,6 +1133,7 @@ version = "6.0.0" description = "Pytest plugin for measuring coverage." optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0"}, {file = "pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35"}, @@ -1094,6 +1152,7 @@ version = "1.5.0" description = "pytest plugin for test data directories and files" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest-datadir-1.5.0.tar.gz", hash = "sha256:1617ed92f9afda0c877e4eac91904b5f779d24ba8f5e438752e3ae39d8d2ee3f"}, {file = "pytest_datadir-1.5.0-py3-none-any.whl", hash = "sha256:34adf361bcc7b37961bbc1dfa8d25a4829e778bab461703c38a5c50ca9c36dc8"}, @@ -1108,6 +1167,7 @@ version = "0.4.9" description = "Pytest plugin providing a fixture interface for spulec/freezegun" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "pytest_freezer-0.4.9-py3-none-any.whl", hash = "sha256:8b6c50523b7d4aec4590b52bfa5ff766d772ce506e2bf4846c88041ea9ccae59"}, {file = "pytest_freezer-0.4.9.tar.gz", hash = "sha256:21bf16bc9cc46bf98f94382c4b5c3c389be7056ff0be33029111ae11b3f1c82a"}, @@ -1123,6 +1183,7 @@ version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, @@ -1140,6 +1201,7 @@ version = "2.7.0" description = "Easy to use fixtures to write regression tests." optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "pytest_regressions-2.7.0-py3-none-any.whl", hash = "sha256:69f5e3f03493cf0ef84d96d23e50a546617c198b1d7746f2e2b9e441cbab4847"}, {file = "pytest_regressions-2.7.0.tar.gz", hash = "sha256:4c30064e0923929012c94f5d6f35205be06fd8709c7f0dba0228e05c460af05e"}, @@ -1162,6 +1224,7 @@ version = "3.6.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7"}, {file = "pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d"}, @@ -1182,6 +1245,7 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["dev"] files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -1196,6 +1260,7 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -1258,6 +1323,7 @@ version = "0.1" description = "A custom YAML tag for referencing environment variables in YAML files. " optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, @@ -1272,6 +1338,7 @@ version = "2.1.0" description = "Python library to build pretty command line user prompts ⭐️" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "questionary-2.1.0-py3-none-any.whl", hash = "sha256:44174d237b68bc828e4878c763a9ad6790ee61990e0ae72927694ead57bab8ec"}, {file = "questionary-2.1.0.tar.gz", hash = "sha256:6302cdd645b19667d8f6e6634774e9538bfcd1aad9be287e743d96cacaf95587"}, @@ -1286,6 +1353,7 @@ version = "2024.11.6" description = "Alternative regular expression module, to replace re." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff590880083d60acc0433f9c3f713c51f7ac6ebb9adf889c79a261ecf541aa91"}, {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:658f90550f38270639e83ce492f27d2c8d2cd63805c65a13a14d36ca126753f0"}, @@ -1389,6 +1457,7 @@ version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, @@ -1410,6 +1479,7 @@ version = "13.9.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.8.0" +groups = ["dev"] files = [ {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, @@ -1429,6 +1499,7 @@ version = "0.9.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "ruff-0.9.4-py3-none-linux_armv6l.whl", hash = "sha256:64e73d25b954f71ff100bb70f39f1ee09e880728efb4250c632ceed4e4cdf706"}, {file = "ruff-0.9.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6ce6743ed64d9afab4fafeaea70d3631b4d4b28b592db21a5c2d1f0ef52934bf"}, @@ -1456,6 +1527,7 @@ version = "1.16.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["dev"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -1467,6 +1539,7 @@ version = "0.6.3" description = "Extract data from python stack frames and tracebacks for informative displays" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695"}, {file = "stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9"}, @@ -1486,6 +1559,7 @@ version = "2.5.0" description = "ANSI color formatting for output in terminal" optional = false python-versions = ">=3.9" +groups = ["main"] files = [ {file = "termcolor-2.5.0-py3-none-any.whl", hash = "sha256:37b17b5fc1e604945c2642c872a3764b5d547a48009871aea3edd3afa180afb8"}, {file = "termcolor-2.5.0.tar.gz", hash = "sha256:998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f"}, @@ -1500,6 +1574,8 @@ version = "2.1.0" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_full_version <= \"3.11.0a6\"" files = [ {file = "tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391"}, {file = "tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8"}, @@ -1511,6 +1587,7 @@ version = "0.13.2" description = "Style preserving TOML library" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"}, {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, @@ -1522,6 +1599,7 @@ version = "5.14.3" description = "Traitlets Python configuration system" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f"}, {file = "traitlets-5.14.3.tar.gz", hash = "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7"}, @@ -1537,6 +1615,7 @@ version = "1.2.15.20241117" description = "Typing stubs for Deprecated" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "types-Deprecated-1.2.15.20241117.tar.gz", hash = "sha256:924002c8b7fddec51ba4949788a702411a2e3636cd9b2a33abd8ee119701d77e"}, {file = "types_Deprecated-1.2.15.20241117-py3-none-any.whl", hash = "sha256:a0cc5e39f769fc54089fd8e005416b55d74aa03f6964d2ed1a0b0b2e28751884"}, @@ -1548,6 +1627,7 @@ version = "2.9.0.20241206" description = "Typing stubs for python-dateutil" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "types_python_dateutil-2.9.0.20241206-py3-none-any.whl", hash = "sha256:e248a4bc70a486d3e3ec84d0dc30eec3a5f979d6e7ee4123ae043eedbb987f53"}, {file = "types_python_dateutil-2.9.0.20241206.tar.gz", hash = "sha256:18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb"}, @@ -1559,6 +1639,7 @@ version = "6.0.12.20241230" description = "Typing stubs for PyYAML" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "types_PyYAML-6.0.12.20241230-py3-none-any.whl", hash = "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6"}, {file = "types_pyyaml-6.0.12.20241230.tar.gz", hash = "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c"}, @@ -1570,6 +1651,7 @@ version = "0.1.1" description = "Typing stubs for termcolor" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "types-termcolor-0.1.1.tar.gz", hash = "sha256:4d9e09ce7f3267985f5280b22e25790c98cb64628b6466e1fb915dbb52ad7136"}, {file = "types_termcolor-0.1.1-py2.py3-none-any.whl", hash = "sha256:3694c312e32f71fdc0f469c334ea21645f3130d90c93cd53bcb06b1233e174d5"}, @@ -1581,10 +1663,12 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] +markers = {main = "python_version < \"3.11\""} [[package]] name = "urllib3" @@ -1592,6 +1676,7 @@ version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, @@ -1609,6 +1694,7 @@ version = "20.27.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "virtualenv-20.27.1-py3-none-any.whl", hash = "sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4"}, {file = "virtualenv-20.27.1.tar.gz", hash = "sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba"}, @@ -1629,6 +1715,7 @@ version = "6.0.0" description = "Filesystem events monitoring" optional = false python-versions = ">=3.9" +groups = ["dev"] files = [ {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26"}, {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112"}, @@ -1671,6 +1758,7 @@ version = "0.2.13" description = "Measures the displayed width of unicode strings in a terminal" optional = false python-versions = "*" +groups = ["main", "dev"] files = [ {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"}, {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"}, @@ -1682,6 +1770,7 @@ version = "1.17.0" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "wrapt-1.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a0c23b8319848426f305f9cb0c98a6e32ee68a36264f45948ccf8e7d2b941f8"}, {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1ca5f060e205f72bec57faae5bd817a1560fcfc4af03f414b08fa29106b7e2d"}, @@ -1756,6 +1845,8 @@ version = "3.21.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.9" +groups = ["main", "dev"] +markers = "python_version < \"3.10\"" files = [ {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, {file = "zipp-3.21.0.tar.gz", hash = "sha256:2c9958f6430a2040341a52eb608ed6dd93ef4392e02ffe219417c1b28b5dd1f4"}, @@ -1770,6 +1861,6 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", type = ["pytest-mypy"] [metadata] -lock-version = "2.0" -python-versions = ">=3.9" -content-hash = "ac79ae58b65962eac836910d2b1359591d1fd53c68afb354b4c549cdcdd4349c" +lock-version = "2.1" +python-versions = ">=3.9,<4.0" +content-hash = "0ba0fceb54fee21c1f4b61a80f1e2b5f0d0eff4ac688f22a97f274d7da9a598e" diff --git a/pyproject.toml b/pyproject.toml index 8ee2cf8d58..3609f7ba52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,21 +1,28 @@ -[tool.commitizen] -version = "4.1.1" -tag_format = "v$version" -version_files = [ - "pyproject.toml:version", - "commitizen/__version__.py", - ".pre-commit-config.yaml:rev:.+Commitizen", -] - -[tool.poetry] +[project] name = "commitizen" version = "4.1.1" description = "Python commitizen client tool" -authors = ["Santiago Fraire "] -license = "MIT" -keywords = ["commitizen", "conventional", "commits", "git"] +authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] +license = { text = "LICENSE" } readme = "docs/README.md" -homepage = "https://github.com/commitizen-tools/commitizen" +requires-python = ">=3.9,<4.0" +dependencies = [ + "questionary (>=2.0,<3.0)", + "decli (>=0.6.0,<1.0)", + "colorama (>=0.4.1,<1.0)", + "termcolor (>=1.1,<3)", + "packaging>=19", + "tomlkit (>=0.5.3,<1.0.0)", + "jinja2>=2.10.3", + "pyyaml>=3.08", + "argcomplete >=1.12.1,<3.6", + "typing-extensions (>=4.0.1,<5.0.0) ; python_version < '3.11'", + "charset-normalizer (>=2.1.0,<4)", + # Use the Python 3.11 and 3.12 compatible API: https://github.com/python/importlib_metadata#compatibility + "importlib_metadata (>=8.0.0,<9) ; python_version < '3.10'", + +] +keywords = ["commitizen", "conventional", "commits", "git"] # See also: https://pypi.org/classifiers/ classifiers = [ "Development Status :: 5 - Production/Stable", @@ -32,23 +39,60 @@ classifiers = [ "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", ] -packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }] -[tool.poetry.dependencies] -python = ">=3.9" -questionary = "^2.0" -decli = "^0.6.0" -colorama = "^0.4.1" -termcolor = ">= 1.1, < 3" -packaging = ">=19" -tomlkit = ">=0.5.3,<1.0.0" -jinja2 = ">=2.10.3" -pyyaml = ">=3.08" -argcomplete = ">=1.12.1,<3.6" -typing-extensions = { version = "^4.0.1", python = "<3.11" } -charset-normalizer = ">=2.1.0,<4" -# Use the Python 3.11 and 3.12 compatible API: https://github.com/python/importlib_metadata#compatibility -importlib_metadata = { version = ">=8.0.0,<9", python = "<3.10" } +[project.urls] +Homepage = "https://github.com/commitizen-tools/commitizen" +Documentation = "https://commitizen-tools.github.io/commitizen/" +Repository = "https://github.com/commitizen-tools/commitizen" +Issues = "https://github.com/commitizen-tools/commitizen/issues" +Changelog = "https://github.com/commitizen-tools/commitizen/blob/master/CHANGELOG.md" + +[project.scripts] +cz = "commitizen.cli:main" +git-cz = "commitizen.cli:main" + +[project.entry-points."commitizen.plugin"] +cz_conventional_commits = "commitizen.cz.conventional_commits:ConventionalCommitsCz" +cz_jira = "commitizen.cz.jira:JiraSmartCz" +cz_customize = "commitizen.cz.customize:CustomizeCommitsCz" + +[project.entry-points."commitizen.changelog_format"] +markdown = "commitizen.changelog_formats.markdown:Markdown" +asciidoc = "commitizen.changelog_formats.asciidoc:AsciiDoc" +textile = "commitizen.changelog_formats.textile:Textile" +restructuredtext = "commitizen.changelog_formats.restructuredtext:RestructuredText" + +[project.entry-points."commitizen.provider"] +cargo = "commitizen.providers:CargoProvider" +commitizen = "commitizen.providers:CommitizenProvider" +composer = "commitizen.providers:ComposerProvider" +npm = "commitizen.providers:NpmProvider" +pep621 = "commitizen.providers:Pep621Provider" +poetry = "commitizen.providers:PoetryProvider" +scm = "commitizen.providers:ScmProvider" + +[project.entry-points."commitizen.scheme"] +pep440 = "commitizen.version_schemes:Pep440" +semver = "commitizen.version_schemes:SemVer" +semver2 = "commitizen.version_schemes:SemVer2" + +[build-system] +requires = ["poetry-core>=2.0"] +build-backend = "poetry.core.masonry.api" + + +[tool.commitizen] +version = "4.1.1" +tag_format = "v$version" +version_files = [ + "pyproject.toml:version", + "commitizen/__version__.py", + ".pre-commit-config.yaml:rev:.+Commitizen", +] + + +[tool.poetry] +packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }] [tool.poetry.group.dev.dependencies] # dev tool @@ -75,35 +119,6 @@ types-python-dateutil = "^2.8.19.13" rich = "^13.7.1" -[tool.poetry.scripts] -cz = "commitizen.cli:main" -git-cz = "commitizen.cli:main" - -[tool.poetry.plugins."commitizen.plugin"] -cz_conventional_commits = "commitizen.cz.conventional_commits:ConventionalCommitsCz" -cz_jira = "commitizen.cz.jira:JiraSmartCz" -cz_customize = "commitizen.cz.customize:CustomizeCommitsCz" - -[tool.poetry.plugins."commitizen.changelog_format"] -markdown = "commitizen.changelog_formats.markdown:Markdown" -asciidoc = "commitizen.changelog_formats.asciidoc:AsciiDoc" -textile = "commitizen.changelog_formats.textile:Textile" -restructuredtext = "commitizen.changelog_formats.restructuredtext:RestructuredText" - -[tool.poetry.plugins."commitizen.provider"] -cargo = "commitizen.providers:CargoProvider" -commitizen = "commitizen.providers:CommitizenProvider" -composer = "commitizen.providers:ComposerProvider" -npm = "commitizen.providers:NpmProvider" -pep621 = "commitizen.providers:Pep621Provider" -poetry = "commitizen.providers:PoetryProvider" -scm = "commitizen.providers:ScmProvider" - -[tool.poetry.plugins."commitizen.scheme"] -pep440 = "commitizen.version_schemes:Pep440" -semver = "commitizen.version_schemes:SemVer" -semver2 = "commitizen.version_schemes:SemVer2" - [tool.coverage] [tool.coverage.report] show_missing = true @@ -133,9 +148,6 @@ omit = [ '*/tests/*', ] -[build-system] -requires = ["poetry_core>=1.0.0"] -build-backend = "poetry.core.masonry.api" [tool.pytest.ini_options] addopts = "--strict-markers" From 949a9e5b364d227a58843a7a9b73336b545dc4e9 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Thu, 30 Jan 2025 22:31:32 +0800 Subject: [PATCH 043/159] build(poetry): group dependencies --- poetry.lock | 136 ++++++++++++++++++++++++------------------------- pyproject.toml | 19 ++++--- 2 files changed, 80 insertions(+), 75 deletions(-) diff --git a/poetry.lock b/poetry.lock index ebdf60ddda..723dceddd9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -40,7 +40,7 @@ version = "2.16.0" description = "Internationalization utilities" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b"}, {file = "babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316"}, @@ -55,7 +55,7 @@ version = "2024.8.30" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, @@ -67,7 +67,7 @@ version = "3.4.0" description = "Validate configuration and produce human readable error messages." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["linters"] files = [ {file = "cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9"}, {file = "cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560"}, @@ -79,7 +79,7 @@ version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" -groups = ["main", "dev"] +groups = ["main", "documentation"] files = [ {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, @@ -181,7 +181,7 @@ version = "8.1.7" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, @@ -196,7 +196,7 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -groups = ["main", "dev"] +groups = ["main", "dev", "documentation", "test"] files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -208,7 +208,7 @@ version = "7.6.8" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.9" -groups = ["dev"] +groups = ["test"] files = [ {file = "coverage-7.6.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b39e6011cd06822eb964d038d5dff5da5d98652b81f5ecd439277b32361a3a50"}, {file = "coverage-7.6.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:63c19702db10ad79151a059d2d6336fe0c470f2e18d0d4d1a57f7f9713875dcf"}, @@ -310,7 +310,7 @@ version = "1.2.18" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -groups = ["dev"] +groups = ["test"] files = [ {file = "Deprecated-1.2.18-py2.py3-none-any.whl", hash = "sha256:bd5011788200372a32418f888e326a09ff80d0214bd961147cfed01b5c018eec"}, {file = "deprecated-1.2.18.tar.gz", hash = "sha256:422b6f6d859da6f2ef57857761bfb392480502a64c3028ca9bbe86085d72115d"}, @@ -328,7 +328,7 @@ version = "0.3.9" description = "Distribution utilities" optional = false python-versions = "*" -groups = ["dev"] +groups = ["linters"] files = [ {file = "distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87"}, {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"}, @@ -340,7 +340,7 @@ version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" -groups = ["dev"] +groups = ["dev", "test"] markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, @@ -356,7 +356,7 @@ version = "2.1.1" description = "execnet: rapid multi-Python deployment" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["test"] files = [ {file = "execnet-2.1.1-py3-none-any.whl", hash = "sha256:26dee51f1b80cebd6d0ca8e74dd8745419761d3bef34163928cbebbdc4749fdc"}, {file = "execnet-2.1.1.tar.gz", hash = "sha256:5189b52c6121c24feae288166ab41b32549c7e2348652736540b9e6e7d4e72e3"}, @@ -386,7 +386,7 @@ version = "3.16.1" description = "A platform independent file lock." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["linters"] files = [ {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, @@ -403,7 +403,7 @@ version = "1.5.1" description = "Let your Python tests travel through time" optional = false python-versions = ">=3.7" -groups = ["dev"] +groups = ["test"] files = [ {file = "freezegun-1.5.1-py3-none-any.whl", hash = "sha256:bf111d7138a8abe55ab48a71755673dbaa4ab87f4cff5634a4442dfec34c15f1"}, {file = "freezegun-1.5.1.tar.gz", hash = "sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9"}, @@ -418,7 +418,7 @@ version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." optional = false python-versions = "*" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"}, {file = "ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619"}, @@ -436,7 +436,7 @@ version = "2.6.3" description = "File identification library for Python" optional = false python-versions = ">=3.9" -groups = ["dev"] +groups = ["linters"] files = [ {file = "identify-2.6.3-py2.py3-none-any.whl", hash = "sha256:9edba65473324c2ea9684b1f944fe3191db3345e50b6d04571d10ed164f8d7bd"}, {file = "identify-2.6.3.tar.gz", hash = "sha256:62f5dae9b5fef52c84cc188514e9ea4f3f636b1d8799ab5ebc475471f9e47a02"}, @@ -451,7 +451,7 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -466,7 +466,7 @@ version = "8.6.1" description = "Read metadata from Python packages" optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["main", "documentation"] markers = "python_version < \"3.10\"" files = [ {file = "importlib_metadata-8.6.1-py3-none-any.whl", hash = "sha256:02a89390c1e15fdfdc0d7c6b25cb3e62650d0494005c97d6f148bf5b9787525e"}, @@ -491,7 +491,7 @@ version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" -groups = ["dev"] +groups = ["test"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -561,7 +561,7 @@ version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" -groups = ["main", "dev"] +groups = ["main", "documentation"] files = [ {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, @@ -579,7 +579,7 @@ version = "3.7" description = "Python implementation of John Gruber's Markdown." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "Markdown-3.7-py3-none-any.whl", hash = "sha256:7eb6df5690b81a1d7942992c97fad2938e956e79df20cbc6186e9c3a77b1c803"}, {file = "markdown-3.7.tar.gz", hash = "sha256:2ae2471477cfd02dbbf038d5d9bc226d40def84b4fe2986e49b59b6b472bbed2"}, @@ -598,7 +598,7 @@ version = "3.0.0" description = "Python port of markdown-it. Markdown parsing, done right!" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["script"] files = [ {file = "markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"}, {file = "markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1"}, @@ -623,7 +623,7 @@ version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["main", "documentation"] files = [ {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, @@ -709,7 +709,7 @@ version = "0.1.2" description = "Markdown URL utilities" optional = false python-versions = ">=3.7" -groups = ["dev"] +groups = ["script"] files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -721,7 +721,7 @@ version = "1.3.4" description = "A deep merge function for 🐍." optional = false python-versions = ">=3.6" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, @@ -733,7 +733,7 @@ version = "1.6.1" description = "Project documentation with Markdown." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "mkdocs-1.6.1-py3-none-any.whl", hash = "sha256:db91759624d1647f3f34aa0c3f327dd2601beae39a366d6e064c03468d35c20e"}, {file = "mkdocs-1.6.1.tar.gz", hash = "sha256:7b432f01d928c084353ab39c57282f29f92136665bdd6abf7c1ec8d822ef86f2"}, @@ -765,7 +765,7 @@ version = "0.2.0" description = "MkDocs extension that lists all dependencies according to a mkdocs.yml file" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "mkdocs_get_deps-0.2.0-py3-none-any.whl", hash = "sha256:2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134"}, {file = "mkdocs_get_deps-0.2.0.tar.gz", hash = "sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c"}, @@ -783,7 +783,7 @@ version = "9.5.50" description = "Documentation that simply works" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "mkdocs_material-9.5.50-py3-none-any.whl", hash = "sha256:f24100f234741f4d423a9d672a909d859668a4f404796be3cf035f10d6050385"}, {file = "mkdocs_material-9.5.50.tar.gz", hash = "sha256:ae5fe16f3d7c9ccd05bb6916a7da7420cf99a9ce5e33debd9d40403a090d5825"}, @@ -813,7 +813,7 @@ version = "1.3.1" description = "Extension pack for Python Markdown and MkDocs Material." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31"}, {file = "mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443"}, @@ -825,7 +825,7 @@ version = "1.14.1" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["linters"] files = [ {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, @@ -885,7 +885,7 @@ version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" -groups = ["dev"] +groups = ["linters"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -897,7 +897,7 @@ version = "1.9.1" description = "Node.js virtual environment builder" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -groups = ["dev"] +groups = ["linters"] files = [ {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, @@ -909,7 +909,7 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["main", "documentation", "test"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -921,7 +921,7 @@ version = "0.5.7" description = "Divides large result sets into pages for easier browsing" optional = false python-versions = "*" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "paginate-0.5.7-py2.py3-none-any.whl", hash = "sha256:b885e2af73abcf01d9559fd5216b57ef722f8c42affbb63942377668e35c7591"}, {file = "paginate-0.5.7.tar.gz", hash = "sha256:22bd083ab41e1a8b4f3690544afb2c60c25e5c9a63a30fa2f483f6c60c8e5945"}, @@ -953,7 +953,7 @@ version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, @@ -981,7 +981,7 @@ version = "4.3.6" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation", "linters"] files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -998,7 +998,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["test"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -1014,7 +1014,7 @@ version = "4.1.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" -groups = ["dev"] +groups = ["linters"] files = [ {file = "pre_commit-4.1.0-py2.py3-none-any.whl", hash = "sha256:d29e7cb346295bcc1cc75fc3e92e343495e3ea0196c9ec6ba53f49f10ab6ae7b"}, {file = "pre_commit-4.1.0.tar.gz", hash = "sha256:ae3f018575a588e30dfddfab9a05448bfbd6b73d78709617b5a2b853549716d4"}, @@ -1076,7 +1076,7 @@ version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["dev", "documentation", "script"] files = [ {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, @@ -1091,7 +1091,7 @@ version = "10.12" description = "Extension pack for Python Markdown." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "pymdown_extensions-10.12-py3-none-any.whl", hash = "sha256:49f81412242d3527b8b4967b990df395c89563043bc51a3d2d7d500e52123b77"}, {file = "pymdown_extensions-10.12.tar.gz", hash = "sha256:b0ee1e0b2bef1071a47891ab17003bfe5bf824a398e13f49f8ed653b699369a7"}, @@ -1110,7 +1110,7 @@ version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["test"] files = [ {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, @@ -1133,7 +1133,7 @@ version = "6.0.0" description = "Pytest plugin for measuring coverage." optional = false python-versions = ">=3.9" -groups = ["dev"] +groups = ["test"] files = [ {file = "pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0"}, {file = "pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35"}, @@ -1152,7 +1152,7 @@ version = "1.5.0" description = "pytest plugin for test data directories and files" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["test"] files = [ {file = "pytest-datadir-1.5.0.tar.gz", hash = "sha256:1617ed92f9afda0c877e4eac91904b5f779d24ba8f5e438752e3ae39d8d2ee3f"}, {file = "pytest_datadir-1.5.0-py3-none-any.whl", hash = "sha256:34adf361bcc7b37961bbc1dfa8d25a4829e778bab461703c38a5c50ca9c36dc8"}, @@ -1167,7 +1167,7 @@ version = "0.4.9" description = "Pytest plugin providing a fixture interface for spulec/freezegun" optional = false python-versions = ">=3.6" -groups = ["dev"] +groups = ["test"] files = [ {file = "pytest_freezer-0.4.9-py3-none-any.whl", hash = "sha256:8b6c50523b7d4aec4590b52bfa5ff766d772ce506e2bf4846c88041ea9ccae59"}, {file = "pytest_freezer-0.4.9.tar.gz", hash = "sha256:21bf16bc9cc46bf98f94382c4b5c3c389be7056ff0be33029111ae11b3f1c82a"}, @@ -1183,7 +1183,7 @@ version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["test"] files = [ {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, @@ -1201,7 +1201,7 @@ version = "2.7.0" description = "Easy to use fixtures to write regression tests." optional = false python-versions = ">=3.9" -groups = ["dev"] +groups = ["test"] files = [ {file = "pytest_regressions-2.7.0-py3-none-any.whl", hash = "sha256:69f5e3f03493cf0ef84d96d23e50a546617c198b1d7746f2e2b9e441cbab4847"}, {file = "pytest_regressions-2.7.0.tar.gz", hash = "sha256:4c30064e0923929012c94f5d6f35205be06fd8709c7f0dba0228e05c460af05e"}, @@ -1224,7 +1224,7 @@ version = "3.6.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["test"] files = [ {file = "pytest_xdist-3.6.1-py3-none-any.whl", hash = "sha256:9ed4adfb68a016610848639bb7e02c9352d5d9f03d04809919e2dafc3be4cca7"}, {file = "pytest_xdist-3.6.1.tar.gz", hash = "sha256:ead156a4db231eec769737f57668ef58a2084a34b2e55c4a8fa20d861107300d"}, @@ -1245,7 +1245,7 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["dev"] +groups = ["documentation", "test"] files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -1260,7 +1260,7 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["main", "documentation", "linters", "test"] files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -1323,7 +1323,7 @@ version = "0.1" description = "A custom YAML tag for referencing environment variables in YAML files. " optional = false python-versions = ">=3.6" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, @@ -1353,7 +1353,7 @@ version = "2024.11.6" description = "Alternative regular expression module, to replace re." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ff590880083d60acc0433f9c3f713c51f7ac6ebb9adf889c79a261ecf541aa91"}, {file = "regex-2024.11.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:658f90550f38270639e83ce492f27d2c8d2cd63805c65a13a14d36ca126753f0"}, @@ -1457,7 +1457,7 @@ version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, @@ -1479,7 +1479,7 @@ version = "13.9.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.8.0" -groups = ["dev"] +groups = ["script"] files = [ {file = "rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90"}, {file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"}, @@ -1499,7 +1499,7 @@ version = "0.9.4" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" -groups = ["dev"] +groups = ["linters"] files = [ {file = "ruff-0.9.4-py3-none-linux_armv6l.whl", hash = "sha256:64e73d25b954f71ff100bb70f39f1ee09e880728efb4250c632ceed4e4cdf706"}, {file = "ruff-0.9.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6ce6743ed64d9afab4fafeaea70d3631b4d4b28b592db21a5c2d1f0ef52934bf"}, @@ -1527,7 +1527,7 @@ version = "1.16.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -groups = ["dev"] +groups = ["dev", "documentation", "test"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -1574,12 +1574,12 @@ version = "2.1.0" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" -groups = ["dev"] -markers = "python_full_version <= \"3.11.0a6\"" +groups = ["linters", "test"] files = [ {file = "tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391"}, {file = "tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8"}, ] +markers = {linters = "python_version < \"3.11\"", test = "python_full_version <= \"3.11.0a6\""} [[package]] name = "tomlkit" @@ -1615,7 +1615,7 @@ version = "1.2.15.20241117" description = "Typing stubs for Deprecated" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["linters"] files = [ {file = "types-Deprecated-1.2.15.20241117.tar.gz", hash = "sha256:924002c8b7fddec51ba4949788a702411a2e3636cd9b2a33abd8ee119701d77e"}, {file = "types_Deprecated-1.2.15.20241117-py3-none-any.whl", hash = "sha256:a0cc5e39f769fc54089fd8e005416b55d74aa03f6964d2ed1a0b0b2e28751884"}, @@ -1627,7 +1627,7 @@ version = "2.9.0.20241206" description = "Typing stubs for python-dateutil" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["linters"] files = [ {file = "types_python_dateutil-2.9.0.20241206-py3-none-any.whl", hash = "sha256:e248a4bc70a486d3e3ec84d0dc30eec3a5f979d6e7ee4123ae043eedbb987f53"}, {file = "types_python_dateutil-2.9.0.20241206.tar.gz", hash = "sha256:18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb"}, @@ -1639,7 +1639,7 @@ version = "6.0.12.20241230" description = "Typing stubs for PyYAML" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["linters"] files = [ {file = "types_PyYAML-6.0.12.20241230-py3-none-any.whl", hash = "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6"}, {file = "types_pyyaml-6.0.12.20241230.tar.gz", hash = "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c"}, @@ -1651,7 +1651,7 @@ version = "0.1.1" description = "Typing stubs for termcolor" optional = false python-versions = "*" -groups = ["dev"] +groups = ["linters"] files = [ {file = "types-termcolor-0.1.1.tar.gz", hash = "sha256:4d9e09ce7f3267985f5280b22e25790c98cb64628b6466e1fb915dbb52ad7136"}, {file = "types_termcolor-0.1.1-py2.py3-none-any.whl", hash = "sha256:3694c312e32f71fdc0f469c334ea21645f3130d90c93cd53bcb06b1233e174d5"}, @@ -1663,12 +1663,12 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["main", "dev", "linters", "script"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] -markers = {main = "python_version < \"3.11\""} +markers = {main = "python_version < \"3.11\"", dev = "python_version < \"3.11\"", script = "python_version < \"3.11\""} [[package]] name = "urllib3" @@ -1676,7 +1676,7 @@ version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, @@ -1694,7 +1694,7 @@ version = "20.27.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["linters"] files = [ {file = "virtualenv-20.27.1-py3-none-any.whl", hash = "sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4"}, {file = "virtualenv-20.27.1.tar.gz", hash = "sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba"}, @@ -1715,7 +1715,7 @@ version = "6.0.0" description = "Filesystem events monitoring" optional = false python-versions = ">=3.9" -groups = ["dev"] +groups = ["documentation"] files = [ {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1cdb490583ebd691c012b3d6dae011000fe42edb7a82ece80965b42abd61f26"}, {file = "watchdog-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bc64ab3bdb6a04d69d4023b29422170b74681784ffb9463ed4870cf2f3e66112"}, @@ -1770,7 +1770,7 @@ version = "1.17.0" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.8" -groups = ["dev"] +groups = ["test"] files = [ {file = "wrapt-1.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a0c23b8319848426f305f9cb0c98a6e32ee68a36264f45948ccf8e7d2b941f8"}, {file = "wrapt-1.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1ca5f060e205f72bec57faae5bd817a1560fcfc4af03f414b08fa29106b7e2d"}, @@ -1845,7 +1845,7 @@ version = "3.21.0" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["main", "documentation"] markers = "python_version < \"3.10\"" files = [ {file = "zipp-3.21.0-py3-none-any.whl", hash = "sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931"}, @@ -1863,4 +1863,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.9,<4.0" -content-hash = "0ba0fceb54fee21c1f4b61a80f1e2b5f0d0eff4ac688f22a97f274d7da9a598e" +content-hash = "83c82b26a9bff591edf995c9c251e52dc23d9a4024562e1218a783ddf151fc20" diff --git a/pyproject.toml b/pyproject.toml index 3609f7ba52..a76ef78183 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,27 +95,32 @@ version_files = [ packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }] [tool.poetry.group.dev.dependencies] -# dev tool ipython = "^8.0" -# test + +[tool.poetry.group.test.dependencies] pytest = ">=7.2,<9.0" pytest-cov = ">=4,<7" pytest-mock = "^3.10" pytest-regressions = "^2.4.0" pytest-freezer = "^0.4.6" pytest-xdist = "^3.1.0" -# linter +deprecated = "^1.2.13" + +[tool.poetry.group.linters.dependencies] ruff = ">=0.5.0,<0.10.0" pre-commit = ">=2.18,<5.0" mypy = "^1.4" +types-deprecated = "^1.2.9.2" +types-python-dateutil = "^2.8.19.13" types-PyYAML = ">=5.4.3,<7.0.0" types-termcolor = "^0.1.1" -# documentation + +[tool.poetry.group.documentation.dependencies] mkdocs = "^1.4.2" mkdocs-material = "^9.1.6" -deprecated = "^1.2.13" -types-deprecated = "^1.2.9.2" -types-python-dateutil = "^2.8.19.13" + +[tool.poetry.group.script.dependencies] +# for scripts/gen_cli_help_screenshots.py rich = "^13.7.1" From 665895c19c0a46876afe4dfba02582628ce7e980 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Thu, 30 Jan 2025 22:33:47 +0800 Subject: [PATCH 044/159] docs(contributing): update minimum poetry requirment to 2.0.0 --- docs/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing.md b/docs/contributing.md index a49196277e..439e3a19f7 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -8,7 +8,7 @@ If you're a first-time contributor, you can check the issues with [good first is ## Install before contributing -1. Install [poetry](https://python-poetry.org/) `1.2.0+`, installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer) +1. Install [poetry](https://python-poetry.org/) `>=2.0.0`, installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer) 2. Install [gpg](https://gnupg.org), installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you could try [homebrew](https://brew.sh/). ## Before making a pull request From a88ecd9500b9dceb88cf5f57273f99d49f049a82 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Fri, 31 Jan 2025 08:48:18 +0800 Subject: [PATCH 045/159] ci(github-actions): replace deprecated file key with files in codecov-action --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 4f99a595c7..8df5e54c03 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -33,6 +33,6 @@ jobs: uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.xml + files: ./coverage.xml flags: unittests name: codecov-umbrella From b311b39985a4e3bfe3d917a9d0cbdee1753989f7 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Fri, 31 Jan 2025 21:40:25 +0800 Subject: [PATCH 046/159] build(pyproject.toml): add maintainers --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a76ef78183..39169a3743 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,10 @@ name = "commitizen" version = "4.1.1" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] +maintainers = [ + { name = "Wei Lee", email = "weilee.rx@gmail.com" }, + { name = " Axel H.", email = "noirbizarre@gmail.com" }, +] license = { text = "LICENSE" } readme = "docs/README.md" requires-python = ">=3.9,<4.0" From e31a31589e577a3bf7019206ecd26edab4902ebf Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Fri, 31 Jan 2025 21:40:43 +0800 Subject: [PATCH 047/159] fixup! build(pyproject.toml): add maintainers --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 39169a3743..5ea78a0ba1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ { name = "Wei Lee", email = "weilee.rx@gmail.com" }, - { name = " Axel H.", email = "noirbizarre@gmail.com" }, + { name = "Axel H.", email = "noirbizarre@gmail.com" }, ] license = { text = "LICENSE" } readme = "docs/README.md" From 95e7d5a65bfd340e0b47f7f44900dcfd127d77b0 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Fri, 31 Jan 2025 21:42:33 +0800 Subject: [PATCH 048/159] build(pyproject.toml): set version_scheme = "pep440" --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 5ea78a0ba1..76c51c474a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,6 +93,7 @@ version_files = [ "commitizen/__version__.py", ".pre-commit-config.yaml:rev:.+Commitizen", ] +version_scheme = "pep440" [tool.poetry] From 5d6369ee1c6e06f610f5a77117df909cee389b64 Mon Sep 17 00:00:00 2001 From: Michael Hirschler Date: Fri, 31 Jan 2025 13:45:29 +0100 Subject: [PATCH 049/159] docs(customization): fix yaml example --- docs/customization.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index 16ba588f10..132f4f0490 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -104,7 +104,7 @@ The equivalent example for a json config file: } ``` -And the correspondent example for a yaml json file: +And the correspondent example for a yaml file: ```yaml commitizen: @@ -115,8 +115,8 @@ commitizen: schema: ": " schema_pattern: "(feature|bug fix):(\\s.*)" bump_pattern: "^(break|new|fix|hotfix)" - commit_parser: "^(?Pfeature|bug fix):\\s(?P.*)?", - changelog_pattern: "^(feature|bug fix)?(!)?", + commit_parser: "^(?Pfeature|bug fix):\\s(?P.*)?" + changelog_pattern: "^(feature|bug fix)?(!)?" change_type_map: feature: Feat bug fix: Fix @@ -139,10 +139,10 @@ commitizen: message: Select the type of change you are committing - type: input name: message - message: Body. + message: 'Body.' - type: confirm name: show_message - message: Do you want to add body message in commit? + message: 'Do you want to add body message in commit?' ``` ### Customize configuration From 6327544cbe61cac3c03051544d3c38d537c67217 Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Mon, 24 Apr 2023 07:02:32 +0200 Subject: [PATCH 050/159] feat: draft of the --empty parameter --- commitizen/cli.py | 6 ++++++ commitizen/commands/bump.py | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/commitizen/cli.py b/commitizen/cli.py index 0b411cba60..88c186d833 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -371,6 +371,12 @@ def __call__( "help": "Determine the next version and write to stdout", "default": False, }, + { + "name": ["--empty"], + "default": False, + "help": "bump tags without new commits", + "action": "store_true", + }, ], }, { diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index 1b274061cb..7b8f5fc849 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -160,6 +160,7 @@ def __call__(self) -> None: # noqa: C901 build_metadata = self.arguments["build_metadata"] increment_mode: str = self.arguments["increment_mode"] get_next: bool = self.arguments["get_next"] + is_empty: bool | None = self.arguments["empty"] if manual_version: if increment: @@ -250,7 +251,7 @@ def __call__(self) -> None: # noqa: C901 # No commits, there is no need to create an empty tag. # Unless we previously had a prerelease. - if not commits and not current_version.is_prerelease: + if not commits and not current_version.is_prerelease and not is_empty: raise NoCommitsFoundError( "[NO_COMMITS_FOUND]\nNo new commits found." ) @@ -266,6 +267,10 @@ def __call__(self) -> None: # noqa: C901 "To avoid this error, manually specify the type of increment with `--increment`" ) + # we create an empty PATCH increment for empty tag + if increment is None and is_empty: + increment = "PATCH" + new_version = current_version.bump( increment, prerelease=prerelease, From 685e4ee1e20c5fa63011a962c18911ca16b08fee Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Sun, 21 Apr 2024 17:01:27 +0800 Subject: [PATCH 051/159] refactor(bump): rename --empty as --allow-no-commit --- commitizen/cli.py | 4 ++-- commitizen/commands/bump.py | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/commitizen/cli.py b/commitizen/cli.py index 88c186d833..72d824380d 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -372,9 +372,9 @@ def __call__( "default": False, }, { - "name": ["--empty"], + "name": ["--allow-no-commit"], "default": False, - "help": "bump tags without new commits", + "help": "bump version without eligible commits", "action": "store_true", }, ], diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index 7b8f5fc849..b82cac940f 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -160,7 +160,7 @@ def __call__(self) -> None: # noqa: C901 build_metadata = self.arguments["build_metadata"] increment_mode: str = self.arguments["increment_mode"] get_next: bool = self.arguments["get_next"] - is_empty: bool | None = self.arguments["empty"] + allow_no_commit: bool | None = self.arguments["allow_no_commit"] if manual_version: if increment: @@ -251,7 +251,11 @@ def __call__(self) -> None: # noqa: C901 # No commits, there is no need to create an empty tag. # Unless we previously had a prerelease. - if not commits and not current_version.is_prerelease and not is_empty: + if ( + not commits + and not current_version.is_prerelease + and not allow_no_commit + ): raise NoCommitsFoundError( "[NO_COMMITS_FOUND]\nNo new commits found." ) @@ -268,7 +272,7 @@ def __call__(self) -> None: # noqa: C901 ) # we create an empty PATCH increment for empty tag - if increment is None and is_empty: + if increment is None and allow_no_commit: increment = "PATCH" new_version = current_version.bump( From 3b5a2aef5be88be740d93f2c919f6522b9784d85 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Sun, 21 Apr 2024 17:02:48 +0800 Subject: [PATCH 052/159] test(bump): add test cases for "--allow-no-commit" argument for bump command --- tests/commands/test_bump_command.py | 101 ++++++++++++++++++ ...shows_description_when_use_help_option.txt | 2 + 2 files changed, 103 insertions(+) diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index 728a424107..934c0b8179 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -1543,3 +1543,104 @@ def test_bump_get_next__no_eligible_commits_raises(mocker: MockFixture): with pytest.raises(NoneIncrementExit): cli.main() + + +def test_bump_allow_no_commit_with_no_commit(mocker, tmp_commitizen_project, capsys): + with tmp_commitizen_project.as_cwd(): + # Create the first commit and bump to 1.0.0 + create_file_and_commit("feat(user)!: new file") + testargs = ["cz", "bump", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + # Verify NoCommitsFoundError should be raised + # when there's no new commit and "--allow-no-commit" is not set + with pytest.raises(NoCommitsFoundError): + testargs = ["cz", "bump"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + # bump to 1.0.1 with new commit when "--allow-no-commit" is set + testargs = ["cz", "bump", "--allow-no-commit"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + out, _ = capsys.readouterr() + assert "bump: version 1.0.0 → 1.0.1" in out + + +def test_bump_allow_no_commit_with_no_eligible_commit( + mocker, tmp_commitizen_project, capsys +): + with tmp_commitizen_project.as_cwd(): + # Create the first commit and bump to 1.0.0 + create_file_and_commit("feat(user)!: new file") + testargs = ["cz", "bump", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + # Create a commit that is ineligible to bump + create_file_and_commit("docs(bump): add description for allow no commit") + + # Verify NoneIncrementExit should be raised + # when there's no eligible bumping commit and "--allow-no-commit" is not set + with pytest.raises(NoneIncrementExit): + testargs = ["cz", "bump", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + # bump to 1.0.1 with ineligible commit when "--allow-no-commit" is set + testargs = ["cz", "bump", "--allow-no-commit"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + out, _ = capsys.readouterr() + assert "bump: version 1.0.0 → 1.0.1" in out + + +def test_bump_allow_no_commit_with_increment(mocker, tmp_commitizen_project, capsys): + with tmp_commitizen_project.as_cwd(): + # # Create the first commit and bump to 1.0.0 + create_file_and_commit("feat(user)!: new file") + testargs = ["cz", "bump", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + # Verify NoCommitsFoundError should be raised + # when there's no new commit and "--allow-no-commit" is not set + with pytest.raises(NoCommitsFoundError): + testargs = ["cz", "bump", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + # bump to 1.1.0 with no new commit when "--allow-no-commit" is set + # and increment is specified + testargs = ["cz", "bump", "--yes", "--allow-no-commit", "--increment", "MINOR"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + out, _ = capsys.readouterr() + assert "bump: version 1.0.0 → 1.1.0" in out + + +def test_bump_allow_no_commit_with_manual_version( + mocker, tmp_commitizen_project, capsys +): + with tmp_commitizen_project.as_cwd(): + # # Create the first commit and bump to 1.0.0 + create_file_and_commit("feat(user)!: new file") + testargs = ["cz", "bump", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + # Verify NoCommitsFoundError should be raised + # when there's no new commit and "--allow-no-commit" is not set + with pytest.raises(NoCommitsFoundError): + testargs = ["cz", "bump", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + # bump to 1.1.0 with no new commit when "--allow-no-commit" is set + # and increment is specified + testargs = ["cz", "bump", "--yes", "--allow-no-commit", "2.0.0"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + out, _ = capsys.readouterr() + assert "bump: version 1.0.0 → 2.0.0" in out diff --git a/tests/commands/test_bump_command/test_bump_command_shows_description_when_use_help_option.txt b/tests/commands/test_bump_command/test_bump_command_shows_description_when_use_help_option.txt index ab73bd4491..5d4438875d 100644 --- a/tests/commands/test_bump_command/test_bump_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_bump_command/test_bump_command_shows_description_when_use_help_option.txt @@ -11,6 +11,7 @@ usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog] [--version-scheme {pep440,semver,semver2}] [--version-type {pep440,semver,semver2}] [--build-metadata BUILD_METADATA] [--get-next] + [--allow-no-commit] [MANUAL_VERSION] bump semantic version based on the git log @@ -77,3 +78,4 @@ options: --build-metadata BUILD_METADATA Add additional build-metadata to the version-number --get-next Determine the next version and write to stdout + --allow-no-commit bump version without eligible commits From 2c97d0294df6c491012c7b1ab77740ba7cc4f3d1 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Sun, 21 Apr 2024 17:14:17 +0800 Subject: [PATCH 053/159] docs(bump): add description for bump "--allow-no-commit" argument --- docs/commands/bump.md | 36 +- docs/images/cli_help/cz___help.svg | 162 ++++----- docs/images/cli_help/cz_bump___help.svg | 358 ++++++++++--------- docs/images/cli_help/cz_changelog___help.svg | 190 +++++----- docs/images/cli_help/cz_check___help.svg | 134 +++---- docs/images/cli_help/cz_commit___help.svg | 110 +++--- 6 files changed, 511 insertions(+), 479 deletions(-) diff --git a/docs/commands/bump.md b/docs/commands/bump.md index afb43230e4..49c6f03434 100644 --- a/docs/commands/bump.md +++ b/docs/commands/bump.md @@ -52,7 +52,6 @@ Some examples of pep440: ![cz bump --help](../images/cli_help/cz_bump___help.svg) - ### `--files-only` Bumps the version in the files defined in `version_files` without creating a commit and tag on the git repository, @@ -178,6 +177,7 @@ If `--local-version` is used, it will bump only the local version `0.1.0` and ke If `--annotated-tag` is used, commitizen will create annotated tags. Also available via configuration, in `pyproject.toml` or `.cz.toml`. ### `--annotated-tag-message` + If `--annotated-tag-message` is used, commitizen will create annotated tags with the given message. ### `--changelog-to-stdout` @@ -276,14 +276,14 @@ cz bump --build-metadata yourmetadata Will create a version like `1.1.2+yourmetadata`. This can be useful for multiple things -* Git hash in version -* Labeling the version with additional metadata. +- Git hash in version +- Labeling the version with additional metadata. Note that Commitizen ignores everything after `+` when it bumps the version. It is therefore safe to write different build-metadata between versions. You should normally not use this functionality, but if you decide to do, keep in mind that -* Version `1.2.3+a`, and `1.2.3+b` are the same version! Tools should not use the string after `+` for version calculation. This is probably not a guarantee (example in helm) even tho it is in the spec. -* It might be problematic having the metadata in place when doing upgrades depending on what tool you use. +- Version `1.2.3+a`, and `1.2.3+b` are the same version! Tools should not use the string after `+` for version calculation. This is probably not a guarantee (example in helm) even tho it is in the spec. +- It might be problematic having the metadata in place when doing upgrades depending on what tool you use. ### `--get-next` @@ -318,6 +318,18 @@ The `--get-next` flag will raise a `NoneIncrementExit` if the found commits are For information on how to suppress this exit, see [avoid raising errors](#avoid-raising-errors). +### `--allow-no-commit` + +Allow the project version to be bumped even when there's no eligible version. This is most useful when used with `--increment {MAJOR,MINOR,PATCH}` or `[MANUL_VERSION]` + +```sh +# bump a minor version even when there's only bug fixes, documentation changes or even no commits +cz bump --incremental MINOR --allow-no-commit + +# bump version to 2.0.0 even when there's no breaking changes changes or even no commits +cz bump --allow-no-commit 2.0.0 +``` + ## Avoid raising errors Some situations from commitizen raise an exit code different than 0. @@ -389,13 +401,13 @@ cz -nr 21 bump These are used in: -* `cz bump`: Find previous release tag (exact match) and generate new tag. -* Find previous release tags in `cz changelog`. - * If `--incremental`: Using latest version found in the changelog, scan existing Git tags with 89\% similarity match. - * `--rev-range` is converted to Git tag names with `tag_format` before searching Git history. -* If the `scm` `version_provider` is used, it uses different regexes to find the previous version tags: - * If `tag_format` is set to `$version` (default): `VersionProtocol.parser` (allows `v` prefix) - * If `tag_format` is set: Custom regex similar to SemVer (not as lenient as PEP440 e.g. on dev-releases) +- `cz bump`: Find previous release tag (exact match) and generate new tag. +- Find previous release tags in `cz changelog`. + - If `--incremental`: Using latest version found in the changelog, scan existing Git tags with 89\% similarity match. + - `--rev-range` is converted to Git tag names with `tag_format` before searching Git history. +- If the `scm` `version_provider` is used, it uses different regexes to find the previous version tags: + - If `tag_format` is set to `$version` (default): `VersionProtocol.parser` (allows `v` prefix) + - If `tag_format` is set: Custom regex similar to SemVer (not as lenient as PEP440 e.g. on dev-releases) Commitizen supports 2 types of formats, a simple and a more complex. diff --git a/docs/images/cli_help/cz___help.svg b/docs/images/cli_help/cz___help.svg index 098e7df70d..22a9e4d0e7 100644 --- a/docs/images/cli_help/cz___help.svg +++ b/docs/images/cli_help/cz___help.svg @@ -19,133 +19,133 @@ font-weight: 700; } - .terminal-2205183093-matrix { + .terminal-4198725382-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-2205183093-title { + .terminal-4198725382-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-2205183093-r1 { fill: #c5c8c6 } -.terminal-2205183093-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-2205183093-r3 { fill: #d0b344 } -.terminal-2205183093-r4 { fill: #1984e9;text-decoration: underline; } -.terminal-2205183093-r5 { fill: #68a0b3;font-weight: bold } + .terminal-4198725382-r1 { fill: #c5c8c6 } +.terminal-4198725382-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-4198725382-r3 { fill: #d0b344 } +.terminal-4198725382-r4 { fill: #1984e9;text-decoration: underline; } +.terminal-4198725382-r5 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -157,45 +157,45 @@ - + - - $ cz --help -usage: cz [-h][--config CONFIG][--debug][-n NAME][-nr NO_RAISE] -{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} -... - -Commitizen is a cli tool to generate conventional commits. -For more information about the topic go to https://conventionalcommits.org/ - -options: -  -h, --help            show this help message and exit -  --config CONFIG       the path of configuration file -  --debug               use debug mode -  -n, --name NAME       use the given commitizen (default: -                        cz_conventional_commits) -  -nr, --no-raise NO_RAISE -                        comma separated error codes that won't rise error, -                        e.g: cz -nr 1,2,3 bump. See codes at -https://commitizen- -                        tools.github.io/commitizen/exit_codes/ - -commands: -{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} -    init                init commitizen configuration -    commit (c)          create new commit -    ls                  show available commitizens -    example             show commit example -    info                show information about the cz -    schema              show commit schema -    bump                bump semantic version based on the git log -    changelog (ch)      generate changelog (note that it will overwrite -                        existing file) -    check               validates that a commit message matches the commitizen -                        schema -    version             get the version of the installed commitizen or the -                        current project (default: installed commitizen) - + + $ cz --help +usage: cz [-h][--config CONFIG][--debug][-n NAME][-nr NO_RAISE] +{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} +... + +Commitizen is a cli tool to generate conventional commits. +For more information about the topic go to https://conventionalcommits.org/ + +options: +  -h, --help            show this help message and exit +  --config CONFIG       the path of configuration file +  --debug               use debug mode +  -n NAME, --name NAME  use the given commitizen (default: +                        cz_conventional_commits) +  -nr NO_RAISE, --no-raise NO_RAISE +                        comma separated error codes that won't rise error, +                        e.g: cz -nr 1,2,3 bump. See codes at +https://commitizen- +                        tools.github.io/commitizen/exit_codes/ + +commands: +{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} +    init                init commitizen configuration +    commit (c)          create new commit +    ls                  show available commitizens +    example             show commit example +    info                show information about the cz +    schema              show commit schema +    bump                bump semantic version based on the git log +    changelog (ch)      generate changelog (note that it will overwrite +                        existing file) +    check               validates that a commit message matches the commitizen +                        schema +    version             get the version of the installed commitizen or the +                        current project (default: installed commitizen) + diff --git a/docs/images/cli_help/cz_bump___help.svg b/docs/images/cli_help/cz_bump___help.svg index 4030b1ba90..659b68b955 100644 --- a/docs/images/cli_help/cz_bump___help.svg +++ b/docs/images/cli_help/cz_bump___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + - + - + - - $ cz bump --help -usage: cz bump [-h][--dry-run][--files-only][--local-version][--changelog] -[--no-verify][--yes][--tag-format TAG_FORMAT] -[--bump-message BUMP_MESSAGE][--prerelease {alpha,beta,rc}] -[--devrelease DEVRELEASE][--increment {MAJOR,MINOR,PATCH}] -[--increment-mode {linear,exact}][--check-consistency] -[--annotated-tag] -[--annotated-tag-message ANNOTATED_TAG_MESSAGE][--gpg-sign] -[--changelog-to-stdout][--git-output-to-stderr][--retry] -[--major-version-zero][--template TEMPLATE][--extra EXTRA] -[--file-name FILE_NAME][--prerelease-offset PRERELEASE_OFFSET] -[--version-scheme {pep440,semver,semver2}] -[--version-type {pep440,semver,semver2}] -[--build-metadata BUILD_METADATA][--get-next] -[MANUAL_VERSION] - -bump semantic version based on the git log - -positional arguments: -  MANUAL_VERSION        bump to the given version (e.g: 1.5.3) - -options: -  -h, --help            show this help message and exit -  --dry-run             show output to stdout, no commit, no modified files -  --files-only          bump version in the files from the config -  --local-version       bump only the local version portion -  --changelog, -ch      generate the changelog for the newest version -  --no-verify           this option bypasses the pre-commit and commit-msg -                        hooks -  --yes                 accept automatically questions done -  --tag-format TAG_FORMAT -                        the format used to tag the commit and read it, use it -                        in existing projects, wrap around simple quotes -  --bump-message BUMP_MESSAGE -                        template used to create the release commit, useful -                        when working with CI -  --prerelease, -pr {alpha,beta,rc} -                        choose type of prerelease -  --devrelease, -d DEVRELEASE -                        specify non-negative integer for dev. release -  --increment {MAJOR,MINOR,PATCH} -                        manually specify the desired increment -  --increment-mode {linear,exact} -                        set the method by which the new version is chosen. -'linear'(default) guesses the next version based on -                        typical linear version progression, such that bumping -                        of a pre-release with lower precedence than the -                        current pre-release phase maintains the current phase -                        of higher precedence. 'exact' applies the changes that -                        have been specified (or determined from the commit -                        log) without interpretation, such that the increment -                        and pre-release are always honored -  --check-consistency, -cc -                        check consistency among versions defined in commitizen -                        configuration and version_files -  --annotated-tag, -at  create annotated tag instead of lightweight one -  --annotated-tag-message, -atm ANNOTATED_TAG_MESSAGE -                        create annotated tag message -  --gpg-sign, -s        sign tag instead of lightweight one -  --changelog-to-stdout -                        Output changelog to the stdout -  --git-output-to-stderr -                        Redirect git output to stderr -  --retry               retry commit if it fails the 1st time -  --major-version-zero  keep major version at zero, even for breaking changes -  --template, -t TEMPLATE -                        changelog template file name (relative to the current -                        working directory) -  --extra, -e EXTRA     a changelog extra variable (in the form 'key=value') -  --file-name FILE_NAME -                        file name of changelog (default: 'CHANGELOG.md') -  --prerelease-offset PRERELEASE_OFFSET -                        start pre-releases with this offset -  --version-scheme {pep440,semver,semver2} -                        choose version scheme -  --version-type {pep440,semver,semver2} -                        Deprecated, use --version-scheme -  --build-metadata BUILD_METADATA -                        Add additional build-metadata to the version-number -  --get-next            Determine the next version and write to stdout - + + $ cz bump --help +usage: cz bump [-h][--dry-run][--files-only][--local-version][--changelog] +[--no-verify][--yes][--tag-format TAG_FORMAT] +[--bump-message BUMP_MESSAGE][--prerelease {alpha,beta,rc}] +[--devrelease DEVRELEASE][--increment {MAJOR,MINOR,PATCH}] +[--increment-mode {linear,exact}][--check-consistency] +[--annotated-tag] +[--annotated-tag-message ANNOTATED_TAG_MESSAGE][--gpg-sign] +[--changelog-to-stdout][--git-output-to-stderr][--retry] +[--major-version-zero][--template TEMPLATE][--extra EXTRA] +[--file-name FILE_NAME][--prerelease-offset PRERELEASE_OFFSET] +[--version-scheme {pep440,semver,semver2}] +[--version-type {pep440,semver,semver2}] +[--build-metadata BUILD_METADATA][--get-next] +[--allow-no-commit] +[MANUAL_VERSION] + +bump semantic version based on the git log + +positional arguments: +  MANUAL_VERSION        bump to the given version (e.g: 1.5.3) + +options: +  -h, --help            show this help message and exit +  --dry-run             show output to stdout, no commit, no modified files +  --files-only          bump version in the files from the config +  --local-version       bump only the local version portion +  --changelog, -ch      generate the changelog for the newest version +  --no-verify           this option bypasses the pre-commit and commit-msg +                        hooks +  --yes                 accept automatically questions done +  --tag-format TAG_FORMAT +                        the format used to tag the commit and read it, use it +                        in existing projects, wrap around simple quotes +  --bump-message BUMP_MESSAGE +                        template used to create the release commit, useful +                        when working with CI +  --prerelease {alpha,beta,rc}, -pr {alpha,beta,rc} +                        choose type of prerelease +  --devrelease DEVRELEASE, -d DEVRELEASE +                        specify non-negative integer for dev. release +  --increment {MAJOR,MINOR,PATCH} +                        manually specify the desired increment +  --increment-mode {linear,exact} +                        set the method by which the new version is chosen. +'linear'(default) guesses the next version based on +                        typical linear version progression, such that bumping +                        of a pre-release with lower precedence than the +                        current pre-release phase maintains the current phase +                        of higher precedence. 'exact' applies the changes that +                        have been specified (or determined from the commit +                        log) without interpretation, such that the increment +                        and pre-release are always honored +  --check-consistency, -cc +                        check consistency among versions defined in commitizen +                        configuration and version_files +  --annotated-tag, -at  create annotated tag instead of lightweight one +  --annotated-tag-message ANNOTATED_TAG_MESSAGE, -atm ANNOTATED_TAG_MESSAGE +                        create annotated tag message +  --gpg-sign, -s        sign tag instead of lightweight one +  --changelog-to-stdout +                        Output changelog to the stdout +  --git-output-to-stderr +                        Redirect git output to stderr +  --retry               retry commit if it fails the 1st time +  --major-version-zero  keep major version at zero, even for breaking changes +  --template TEMPLATE, -t TEMPLATE +                        changelog template file name (relative to the current +                        working directory) +  --extra EXTRA, -e EXTRA +                        a changelog extra variable (in the form 'key=value') +  --file-name FILE_NAME +                        file name of changelog (default: 'CHANGELOG.md') +  --prerelease-offset PRERELEASE_OFFSET +                        start pre-releases with this offset +  --version-scheme {pep440,semver,semver2} +                        choose version scheme +  --version-type {pep440,semver,semver2} +                        Deprecated, use --version-scheme +  --build-metadata BUILD_METADATA +                        Add additional build-metadata to the version-number +  --get-next            Determine the next version and write to stdout +  --allow-no-commit     bump version without eligible commits + diff --git a/docs/images/cli_help/cz_changelog___help.svg b/docs/images/cli_help/cz_changelog___help.svg index 1160ccf6cf..8cb3fcf2fe 100644 --- a/docs/images/cli_help/cz_changelog___help.svg +++ b/docs/images/cli_help/cz_changelog___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - - $ cz changelog --help -usage: cz changelog [-h][--dry-run][--file-name FILE_NAME] -[--unreleased-version UNRELEASED_VERSION][--incremental] -[--start-rev START_REV][--merge-prerelease] -[--version-scheme {pep440,semver,semver2}] -[--export-template EXPORT_TEMPLATE][--template TEMPLATE] -[--extra EXTRA] - - -generate changelog (note that it will overwrite existing file) - -positional arguments: -  rev_range             generates changelog for the given version (e.g: 1.5.3) -                        or version range (e.g: 1.5.3..1.7.9) - -options: -  -h, --help            show this help message and exit -  --dry-run             show changelog to stdout -  --file-name FILE_NAME -                        file name of changelog (default: 'CHANGELOG.md') -  --unreleased-version UNRELEASED_VERSION -                        set the value for the new version (use the tag value), -                        instead of using unreleased -  --incremental         generates changelog from last created version, useful -                        if the changelog has been manually modified -  --start-rev START_REV -                        start rev of the changelog. If not set, it will -                        generate changelog from the start -  --merge-prerelease    collect all changes from prereleases into next non- -                        prerelease. If not set, it will include prereleases in -                        the changelog -  --version-scheme {pep440,semver,semver2} -                        choose version scheme -  --export-template EXPORT_TEMPLATE -                        Export the changelog template into this file instead -                        of rendering it -  --template, -t TEMPLATE -                        changelog template file name (relative to the current -                        working directory) -  --extra, -e EXTRA     a changelog extra variable (in the form 'key=value') - + + $ cz changelog --help +usage: cz changelog [-h][--dry-run][--file-name FILE_NAME] +[--unreleased-version UNRELEASED_VERSION][--incremental] +[--start-rev START_REV][--merge-prerelease] +[--version-scheme {pep440,semver,semver2}] +[--export-template EXPORT_TEMPLATE][--template TEMPLATE] +[--extra EXTRA] + + +generate changelog (note that it will overwrite existing file) + +positional arguments: +  rev_range             generates changelog for the given version (e.g: 1.5.3) +                        or version range (e.g: 1.5.3..1.7.9) + +options: +  -h, --help            show this help message and exit +  --dry-run             show changelog to stdout +  --file-name FILE_NAME +                        file name of changelog (default: 'CHANGELOG.md') +  --unreleased-version UNRELEASED_VERSION +                        set the value for the new version (use the tag value), +                        instead of using unreleased +  --incremental         generates changelog from last created version, useful +                        if the changelog has been manually modified +  --start-rev START_REV +                        start rev of the changelog. If not set, it will +                        generate changelog from the start +  --merge-prerelease    collect all changes from prereleases into next non- +                        prerelease. If not set, it will include prereleases in +                        the changelog +  --version-scheme {pep440,semver,semver2} +                        choose version scheme +  --export-template EXPORT_TEMPLATE +                        Export the changelog template into this file instead +                        of rendering it +  --template TEMPLATE, -t TEMPLATE +                        changelog template file name (relative to the current +                        working directory) +  --extra EXTRA, -e EXTRA +                        a changelog extra variable (in the form 'key=value') + diff --git a/docs/images/cli_help/cz_check___help.svg b/docs/images/cli_help/cz_check___help.svg index 690bfec684..922a6458a6 100644 --- a/docs/images/cli_help/cz_check___help.svg +++ b/docs/images/cli_help/cz_check___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - - $ cz check --help -usage: cz check [-h][--commit-msg-file COMMIT_MSG_FILE | -                --rev-range REV_RANGE | -m MESSAGE][--allow-abort] -[--allowed-prefixes [ALLOWED_PREFIXES ...]] -[-l MESSAGE_LENGTH_LIMIT] - -validates that a commit message matches the commitizen schema - -options: -  -h, --help            show this help message and exit -  --commit-msg-file COMMIT_MSG_FILE -                        ask for the name of the temporal file that contains -                        the commit message. Using it in a git hook script: -MSG_FILE=$1 -  --rev-range REV_RANGE -                        a range of git rev to check. e.g, master..HEAD -  -m, --message MESSAGE -                        commit message that needs to be checked -  --allow-abort         allow empty commit messages, which typically abort a -                        commit -  --allowed-prefixes [ALLOWED_PREFIXES ...] -                        allowed commit message prefixes. If the message starts -                        by one of these prefixes, the message won't be checked -                        against the regex -  -l, --message-length-limit MESSAGE_LENGTH_LIMIT -                        length limit of the commit message; 0 for no limit - + + $ cz check --help +usage: cz check [-h] +[--commit-msg-file COMMIT_MSG_FILE | --rev-range REV_RANGE | -m  +MESSAGE] +[--allow-abort][--allowed-prefixes [ALLOWED_PREFIXES ...]] +[-l MESSAGE_LENGTH_LIMIT] + +validates that a commit message matches the commitizen schema + +options: +  -h, --help            show this help message and exit +  --commit-msg-file COMMIT_MSG_FILE +                        ask for the name of the temporal file that contains +                        the commit message. Using it in a git hook script: +MSG_FILE=$1 +  --rev-range REV_RANGE +                        a range of git rev to check. e.g, master..HEAD +  -m MESSAGE, --message MESSAGE +                        commit message that needs to be checked +  --allow-abort         allow empty commit messages, which typically abort a +                        commit +  --allowed-prefixes [ALLOWED_PREFIXES ...] +                        allowed commit message prefixes. If the message starts +                        by one of these prefixes, the message won't be checked +                        against the regex +  -l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT +                        length limit of the commit message; 0 for no limit + diff --git a/docs/images/cli_help/cz_commit___help.svg b/docs/images/cli_help/cz_commit___help.svg index 5aea02232f..0346c40588 100644 --- a/docs/images/cli_help/cz_commit___help.svg +++ b/docs/images/cli_help/cz_commit___help.svg @@ -19,95 +19,95 @@ font-weight: 700; } - .terminal-463778956-matrix { + .terminal-1670560432-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-463778956-title { + .terminal-1670560432-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-463778956-r1 { fill: #c5c8c6 } -.terminal-463778956-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-463778956-r3 { fill: #68a0b3;font-weight: bold } + .terminal-1670560432-r1 { fill: #c5c8c6 } +.terminal-1670560432-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-1670560432-r3 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -119,33 +119,33 @@ - + - - $ cz commit --help -usage: cz commit [-h][--retry][--no-retry][--dry-run] -[--write-message-to-file FILE_PATH][-s][-a][-e] -[-l MESSAGE_LENGTH_LIMIT][--] - -create new commit - -options: -  -h, --help            show this help message and exit -  --retry               retry last commit -  --no-retry            skip retry if retry_after_failure is set to true -  --dry-run             show output to stdout, no commit, no modified files -  --write-message-to-file FILE_PATH -                        write message to file before committing (can be -                        combined with --dry-run) -  -s, --signoff         sign off the commit -  -a, --all             Tell the command to automatically stage files that -                        have been modified and deleted, but new files you have -                        not told Git about are not affected. -  -e, --edit            edit the commit message before committing -  -l, --message-length-limit MESSAGE_LENGTH_LIMIT -                        length limit of the commit message; 0 for no limit -  --                    Positional arguments separator (recommended) - + + $ cz commit --help +usage: cz commit [-h][--retry][--no-retry][--dry-run] +[--write-message-to-file FILE_PATH][-s][-a][-e] +[-l MESSAGE_LENGTH_LIMIT][--] + +create new commit + +options: +  -h, --help            show this help message and exit +  --retry               retry last commit +  --no-retry            skip retry if retry_after_failure is set to true +  --dry-run             show output to stdout, no commit, no modified files +  --write-message-to-file FILE_PATH +                        write message to file before committing (can be +                        combined with --dry-run) +  -s, --signoff         sign off the commit +  -a, --all             Tell the command to automatically stage files that +                        have been modified and deleted, but new files you have +                        not told Git about are not affected. +  -e, --edit            edit the commit message before committing +  -l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT +                        length limit of the commit message; 0 for no limit +  --                    Positional arguments separator (recommended) + From 98ae920d1fb97617e6dd42ae16a928bb1842f646 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 01:13:48 +0000 Subject: [PATCH 054/159] =?UTF-8?q?bump:=20version=204.1.1=20=E2=86=92=204?= =?UTF-8?q?.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 10 ++++++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ee5c84c96..470d1f1621 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.1.1 # automatically updated by Commitizen + rev: v4.2.0 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 3687908b19..e8a573f8ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v4.2.0 (2025-02-07) + +### Feat + +- draft of the --empty parameter + +### Refactor + +- **bump**: rename --empty as --allow-no-commit + ## v4.1.1 (2025-01-26) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 72aa75832f..0fd7811c0d 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.1.1" +__version__ = "4.2.0" diff --git a/pyproject.toml b/pyproject.toml index 76c51c474a..47d83785cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.1.1" +version = "4.2.0" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -86,7 +86,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.1.1" +version = "4.2.0" tag_format = "v$version" version_files = [ "pyproject.toml:version", From d4dfd3340d311203b74a42ae0a730504c462bc30 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 01:14:18 +0000 Subject: [PATCH 055/159] docs(cli/screenshots): update CLI screenshots [skip ci] --- docs/images/cli_help/cz___help.svg | 162 ++++----- docs/images/cli_help/cz_bump___help.svg | 358 +++++++++---------- docs/images/cli_help/cz_changelog___help.svg | 190 +++++----- docs/images/cli_help/cz_check___help.svg | 134 ++++--- docs/images/cli_help/cz_commit___help.svg | 110 +++--- 5 files changed, 471 insertions(+), 483 deletions(-) diff --git a/docs/images/cli_help/cz___help.svg b/docs/images/cli_help/cz___help.svg index 22a9e4d0e7..098e7df70d 100644 --- a/docs/images/cli_help/cz___help.svg +++ b/docs/images/cli_help/cz___help.svg @@ -19,133 +19,133 @@ font-weight: 700; } - .terminal-4198725382-matrix { + .terminal-2205183093-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-4198725382-title { + .terminal-2205183093-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-4198725382-r1 { fill: #c5c8c6 } -.terminal-4198725382-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-4198725382-r3 { fill: #d0b344 } -.terminal-4198725382-r4 { fill: #1984e9;text-decoration: underline; } -.terminal-4198725382-r5 { fill: #68a0b3;font-weight: bold } + .terminal-2205183093-r1 { fill: #c5c8c6 } +.terminal-2205183093-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-2205183093-r3 { fill: #d0b344 } +.terminal-2205183093-r4 { fill: #1984e9;text-decoration: underline; } +.terminal-2205183093-r5 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -157,45 +157,45 @@ - + - - $ cz --help -usage: cz [-h][--config CONFIG][--debug][-n NAME][-nr NO_RAISE] -{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} -... - -Commitizen is a cli tool to generate conventional commits. -For more information about the topic go to https://conventionalcommits.org/ - -options: -  -h, --help            show this help message and exit -  --config CONFIG       the path of configuration file -  --debug               use debug mode -  -n NAME, --name NAME  use the given commitizen (default: -                        cz_conventional_commits) -  -nr NO_RAISE, --no-raise NO_RAISE -                        comma separated error codes that won't rise error, -                        e.g: cz -nr 1,2,3 bump. See codes at -https://commitizen- -                        tools.github.io/commitizen/exit_codes/ - -commands: -{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} -    init                init commitizen configuration -    commit (c)          create new commit -    ls                  show available commitizens -    example             show commit example -    info                show information about the cz -    schema              show commit schema -    bump                bump semantic version based on the git log -    changelog (ch)      generate changelog (note that it will overwrite -                        existing file) -    check               validates that a commit message matches the commitizen -                        schema -    version             get the version of the installed commitizen or the -                        current project (default: installed commitizen) - + + $ cz --help +usage: cz [-h][--config CONFIG][--debug][-n NAME][-nr NO_RAISE] +{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} +... + +Commitizen is a cli tool to generate conventional commits. +For more information about the topic go to https://conventionalcommits.org/ + +options: +  -h, --help            show this help message and exit +  --config CONFIG       the path of configuration file +  --debug               use debug mode +  -n, --name NAME       use the given commitizen (default: +                        cz_conventional_commits) +  -nr, --no-raise NO_RAISE +                        comma separated error codes that won't rise error, +                        e.g: cz -nr 1,2,3 bump. See codes at +https://commitizen- +                        tools.github.io/commitizen/exit_codes/ + +commands: +{init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} +    init                init commitizen configuration +    commit (c)          create new commit +    ls                  show available commitizens +    example             show commit example +    info                show information about the cz +    schema              show commit schema +    bump                bump semantic version based on the git log +    changelog (ch)      generate changelog (note that it will overwrite +                        existing file) +    check               validates that a commit message matches the commitizen +                        schema +    version             get the version of the installed commitizen or the +                        current project (default: installed commitizen) + diff --git a/docs/images/cli_help/cz_bump___help.svg b/docs/images/cli_help/cz_bump___help.svg index 659b68b955..7f27636ddf 100644 --- a/docs/images/cli_help/cz_bump___help.svg +++ b/docs/images/cli_help/cz_bump___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz bump --help -usage: cz bump [-h][--dry-run][--files-only][--local-version][--changelog] -[--no-verify][--yes][--tag-format TAG_FORMAT] -[--bump-message BUMP_MESSAGE][--prerelease {alpha,beta,rc}] -[--devrelease DEVRELEASE][--increment {MAJOR,MINOR,PATCH}] -[--increment-mode {linear,exact}][--check-consistency] -[--annotated-tag] -[--annotated-tag-message ANNOTATED_TAG_MESSAGE][--gpg-sign] -[--changelog-to-stdout][--git-output-to-stderr][--retry] -[--major-version-zero][--template TEMPLATE][--extra EXTRA] -[--file-name FILE_NAME][--prerelease-offset PRERELEASE_OFFSET] -[--version-scheme {pep440,semver,semver2}] -[--version-type {pep440,semver,semver2}] -[--build-metadata BUILD_METADATA][--get-next] -[--allow-no-commit] -[MANUAL_VERSION] - -bump semantic version based on the git log - -positional arguments: -  MANUAL_VERSION        bump to the given version (e.g: 1.5.3) - -options: -  -h, --help            show this help message and exit -  --dry-run             show output to stdout, no commit, no modified files -  --files-only          bump version in the files from the config -  --local-version       bump only the local version portion -  --changelog, -ch      generate the changelog for the newest version -  --no-verify           this option bypasses the pre-commit and commit-msg -                        hooks -  --yes                 accept automatically questions done -  --tag-format TAG_FORMAT -                        the format used to tag the commit and read it, use it -                        in existing projects, wrap around simple quotes -  --bump-message BUMP_MESSAGE -                        template used to create the release commit, useful -                        when working with CI -  --prerelease {alpha,beta,rc}, -pr {alpha,beta,rc} -                        choose type of prerelease -  --devrelease DEVRELEASE, -d DEVRELEASE -                        specify non-negative integer for dev. release -  --increment {MAJOR,MINOR,PATCH} -                        manually specify the desired increment -  --increment-mode {linear,exact} -                        set the method by which the new version is chosen. -'linear'(default) guesses the next version based on -                        typical linear version progression, such that bumping -                        of a pre-release with lower precedence than the -                        current pre-release phase maintains the current phase -                        of higher precedence. 'exact' applies the changes that -                        have been specified (or determined from the commit -                        log) without interpretation, such that the increment -                        and pre-release are always honored -  --check-consistency, -cc -                        check consistency among versions defined in commitizen -                        configuration and version_files -  --annotated-tag, -at  create annotated tag instead of lightweight one -  --annotated-tag-message ANNOTATED_TAG_MESSAGE, -atm ANNOTATED_TAG_MESSAGE -                        create annotated tag message -  --gpg-sign, -s        sign tag instead of lightweight one -  --changelog-to-stdout -                        Output changelog to the stdout -  --git-output-to-stderr -                        Redirect git output to stderr -  --retry               retry commit if it fails the 1st time -  --major-version-zero  keep major version at zero, even for breaking changes -  --template TEMPLATE, -t TEMPLATE -                        changelog template file name (relative to the current -                        working directory) -  --extra EXTRA, -e EXTRA -                        a changelog extra variable (in the form 'key=value') -  --file-name FILE_NAME -                        file name of changelog (default: 'CHANGELOG.md') -  --prerelease-offset PRERELEASE_OFFSET -                        start pre-releases with this offset -  --version-scheme {pep440,semver,semver2} -                        choose version scheme -  --version-type {pep440,semver,semver2} -                        Deprecated, use --version-scheme -  --build-metadata BUILD_METADATA -                        Add additional build-metadata to the version-number -  --get-next            Determine the next version and write to stdout -  --allow-no-commit     bump version without eligible commits - + + $ cz bump --help +usage: cz bump [-h][--dry-run][--files-only][--local-version][--changelog] +[--no-verify][--yes][--tag-format TAG_FORMAT] +[--bump-message BUMP_MESSAGE][--prerelease {alpha,beta,rc}] +[--devrelease DEVRELEASE][--increment {MAJOR,MINOR,PATCH}] +[--increment-mode {linear,exact}][--check-consistency] +[--annotated-tag] +[--annotated-tag-message ANNOTATED_TAG_MESSAGE][--gpg-sign] +[--changelog-to-stdout][--git-output-to-stderr][--retry] +[--major-version-zero][--template TEMPLATE][--extra EXTRA] +[--file-name FILE_NAME][--prerelease-offset PRERELEASE_OFFSET] +[--version-scheme {pep440,semver,semver2}] +[--version-type {pep440,semver,semver2}] +[--build-metadata BUILD_METADATA][--get-next] +[--allow-no-commit] +[MANUAL_VERSION] + +bump semantic version based on the git log + +positional arguments: +  MANUAL_VERSION        bump to the given version (e.g: 1.5.3) + +options: +  -h, --help            show this help message and exit +  --dry-run             show output to stdout, no commit, no modified files +  --files-only          bump version in the files from the config +  --local-version       bump only the local version portion +  --changelog, -ch      generate the changelog for the newest version +  --no-verify           this option bypasses the pre-commit and commit-msg +                        hooks +  --yes                 accept automatically questions done +  --tag-format TAG_FORMAT +                        the format used to tag the commit and read it, use it +                        in existing projects, wrap around simple quotes +  --bump-message BUMP_MESSAGE +                        template used to create the release commit, useful +                        when working with CI +  --prerelease, -pr {alpha,beta,rc} +                        choose type of prerelease +  --devrelease, -d DEVRELEASE +                        specify non-negative integer for dev. release +  --increment {MAJOR,MINOR,PATCH} +                        manually specify the desired increment +  --increment-mode {linear,exact} +                        set the method by which the new version is chosen. +'linear'(default) guesses the next version based on +                        typical linear version progression, such that bumping +                        of a pre-release with lower precedence than the +                        current pre-release phase maintains the current phase +                        of higher precedence. 'exact' applies the changes that +                        have been specified (or determined from the commit +                        log) without interpretation, such that the increment +                        and pre-release are always honored +  --check-consistency, -cc +                        check consistency among versions defined in commitizen +                        configuration and version_files +  --annotated-tag, -at  create annotated tag instead of lightweight one +  --annotated-tag-message, -atm ANNOTATED_TAG_MESSAGE +                        create annotated tag message +  --gpg-sign, -s        sign tag instead of lightweight one +  --changelog-to-stdout +                        Output changelog to the stdout +  --git-output-to-stderr +                        Redirect git output to stderr +  --retry               retry commit if it fails the 1st time +  --major-version-zero  keep major version at zero, even for breaking changes +  --template, -t TEMPLATE +                        changelog template file name (relative to the current +                        working directory) +  --extra, -e EXTRA     a changelog extra variable (in the form 'key=value') +  --file-name FILE_NAME +                        file name of changelog (default: 'CHANGELOG.md') +  --prerelease-offset PRERELEASE_OFFSET +                        start pre-releases with this offset +  --version-scheme {pep440,semver,semver2} +                        choose version scheme +  --version-type {pep440,semver,semver2} +                        Deprecated, use --version-scheme +  --build-metadata BUILD_METADATA +                        Add additional build-metadata to the version-number +  --get-next            Determine the next version and write to stdout +  --allow-no-commit     bump version without eligible commits + diff --git a/docs/images/cli_help/cz_changelog___help.svg b/docs/images/cli_help/cz_changelog___help.svg index 8cb3fcf2fe..1160ccf6cf 100644 --- a/docs/images/cli_help/cz_changelog___help.svg +++ b/docs/images/cli_help/cz_changelog___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz changelog --help -usage: cz changelog [-h][--dry-run][--file-name FILE_NAME] -[--unreleased-version UNRELEASED_VERSION][--incremental] -[--start-rev START_REV][--merge-prerelease] -[--version-scheme {pep440,semver,semver2}] -[--export-template EXPORT_TEMPLATE][--template TEMPLATE] -[--extra EXTRA] - - -generate changelog (note that it will overwrite existing file) - -positional arguments: -  rev_range             generates changelog for the given version (e.g: 1.5.3) -                        or version range (e.g: 1.5.3..1.7.9) - -options: -  -h, --help            show this help message and exit -  --dry-run             show changelog to stdout -  --file-name FILE_NAME -                        file name of changelog (default: 'CHANGELOG.md') -  --unreleased-version UNRELEASED_VERSION -                        set the value for the new version (use the tag value), -                        instead of using unreleased -  --incremental         generates changelog from last created version, useful -                        if the changelog has been manually modified -  --start-rev START_REV -                        start rev of the changelog. If not set, it will -                        generate changelog from the start -  --merge-prerelease    collect all changes from prereleases into next non- -                        prerelease. If not set, it will include prereleases in -                        the changelog -  --version-scheme {pep440,semver,semver2} -                        choose version scheme -  --export-template EXPORT_TEMPLATE -                        Export the changelog template into this file instead -                        of rendering it -  --template TEMPLATE, -t TEMPLATE -                        changelog template file name (relative to the current -                        working directory) -  --extra EXTRA, -e EXTRA -                        a changelog extra variable (in the form 'key=value') - + + $ cz changelog --help +usage: cz changelog [-h][--dry-run][--file-name FILE_NAME] +[--unreleased-version UNRELEASED_VERSION][--incremental] +[--start-rev START_REV][--merge-prerelease] +[--version-scheme {pep440,semver,semver2}] +[--export-template EXPORT_TEMPLATE][--template TEMPLATE] +[--extra EXTRA] + + +generate changelog (note that it will overwrite existing file) + +positional arguments: +  rev_range             generates changelog for the given version (e.g: 1.5.3) +                        or version range (e.g: 1.5.3..1.7.9) + +options: +  -h, --help            show this help message and exit +  --dry-run             show changelog to stdout +  --file-name FILE_NAME +                        file name of changelog (default: 'CHANGELOG.md') +  --unreleased-version UNRELEASED_VERSION +                        set the value for the new version (use the tag value), +                        instead of using unreleased +  --incremental         generates changelog from last created version, useful +                        if the changelog has been manually modified +  --start-rev START_REV +                        start rev of the changelog. If not set, it will +                        generate changelog from the start +  --merge-prerelease    collect all changes from prereleases into next non- +                        prerelease. If not set, it will include prereleases in +                        the changelog +  --version-scheme {pep440,semver,semver2} +                        choose version scheme +  --export-template EXPORT_TEMPLATE +                        Export the changelog template into this file instead +                        of rendering it +  --template, -t TEMPLATE +                        changelog template file name (relative to the current +                        working directory) +  --extra, -e EXTRA     a changelog extra variable (in the form 'key=value') + diff --git a/docs/images/cli_help/cz_check___help.svg b/docs/images/cli_help/cz_check___help.svg index 922a6458a6..690bfec684 100644 --- a/docs/images/cli_help/cz_check___help.svg +++ b/docs/images/cli_help/cz_check___help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + - - $ cz check --help -usage: cz check [-h] -[--commit-msg-file COMMIT_MSG_FILE | --rev-range REV_RANGE | -m  -MESSAGE] -[--allow-abort][--allowed-prefixes [ALLOWED_PREFIXES ...]] -[-l MESSAGE_LENGTH_LIMIT] - -validates that a commit message matches the commitizen schema - -options: -  -h, --help            show this help message and exit -  --commit-msg-file COMMIT_MSG_FILE -                        ask for the name of the temporal file that contains -                        the commit message. Using it in a git hook script: -MSG_FILE=$1 -  --rev-range REV_RANGE -                        a range of git rev to check. e.g, master..HEAD -  -m MESSAGE, --message MESSAGE -                        commit message that needs to be checked -  --allow-abort         allow empty commit messages, which typically abort a -                        commit -  --allowed-prefixes [ALLOWED_PREFIXES ...] -                        allowed commit message prefixes. If the message starts -                        by one of these prefixes, the message won't be checked -                        against the regex -  -l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT -                        length limit of the commit message; 0 for no limit - + + $ cz check --help +usage: cz check [-h][--commit-msg-file COMMIT_MSG_FILE | +                --rev-range REV_RANGE | -m MESSAGE][--allow-abort] +[--allowed-prefixes [ALLOWED_PREFIXES ...]] +[-l MESSAGE_LENGTH_LIMIT] + +validates that a commit message matches the commitizen schema + +options: +  -h, --help            show this help message and exit +  --commit-msg-file COMMIT_MSG_FILE +                        ask for the name of the temporal file that contains +                        the commit message. Using it in a git hook script: +MSG_FILE=$1 +  --rev-range REV_RANGE +                        a range of git rev to check. e.g, master..HEAD +  -m, --message MESSAGE +                        commit message that needs to be checked +  --allow-abort         allow empty commit messages, which typically abort a +                        commit +  --allowed-prefixes [ALLOWED_PREFIXES ...] +                        allowed commit message prefixes. If the message starts +                        by one of these prefixes, the message won't be checked +                        against the regex +  -l, --message-length-limit MESSAGE_LENGTH_LIMIT +                        length limit of the commit message; 0 for no limit + diff --git a/docs/images/cli_help/cz_commit___help.svg b/docs/images/cli_help/cz_commit___help.svg index 0346c40588..5aea02232f 100644 --- a/docs/images/cli_help/cz_commit___help.svg +++ b/docs/images/cli_help/cz_commit___help.svg @@ -19,95 +19,95 @@ font-weight: 700; } - .terminal-1670560432-matrix { + .terminal-463778956-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1670560432-title { + .terminal-463778956-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1670560432-r1 { fill: #c5c8c6 } -.terminal-1670560432-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-1670560432-r3 { fill: #68a0b3;font-weight: bold } + .terminal-463778956-r1 { fill: #c5c8c6 } +.terminal-463778956-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-463778956-r3 { fill: #68a0b3;font-weight: bold } - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -119,33 +119,33 @@ - + - - $ cz commit --help -usage: cz commit [-h][--retry][--no-retry][--dry-run] -[--write-message-to-file FILE_PATH][-s][-a][-e] -[-l MESSAGE_LENGTH_LIMIT][--] - -create new commit - -options: -  -h, --help            show this help message and exit -  --retry               retry last commit -  --no-retry            skip retry if retry_after_failure is set to true -  --dry-run             show output to stdout, no commit, no modified files -  --write-message-to-file FILE_PATH -                        write message to file before committing (can be -                        combined with --dry-run) -  -s, --signoff         sign off the commit -  -a, --all             Tell the command to automatically stage files that -                        have been modified and deleted, but new files you have -                        not told Git about are not affected. -  -e, --edit            edit the commit message before committing -  -l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT -                        length limit of the commit message; 0 for no limit -  --                    Positional arguments separator (recommended) - + + $ cz commit --help +usage: cz commit [-h][--retry][--no-retry][--dry-run] +[--write-message-to-file FILE_PATH][-s][-a][-e] +[-l MESSAGE_LENGTH_LIMIT][--] + +create new commit + +options: +  -h, --help            show this help message and exit +  --retry               retry last commit +  --no-retry            skip retry if retry_after_failure is set to true +  --dry-run             show output to stdout, no commit, no modified files +  --write-message-to-file FILE_PATH +                        write message to file before committing (can be +                        combined with --dry-run) +  -s, --signoff         sign off the commit +  -a, --all             Tell the command to automatically stage files that +                        have been modified and deleted, but new files you have +                        not told Git about are not affected. +  -e, --edit            edit the commit message before committing +  -l, --message-length-limit MESSAGE_LENGTH_LIMIT +                        length limit of the commit message; 0 for no limit +  --                    Positional arguments separator (recommended) + From fe13eba654dbb569dde56848f7ae883b8b63fce7 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Thu, 30 Jan 2025 21:54:40 +0800 Subject: [PATCH 056/159] style(hooks): improve type annotation --- hooks/post-commit.py | 5 +++-- hooks/prepare-commit-msg.py | 26 ++++++++++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/hooks/post-commit.py b/hooks/post-commit.py index 6444e5ca84..c7dea825bd 100755 --- a/hooks/post-commit.py +++ b/hooks/post-commit.py @@ -8,7 +8,7 @@ exit(1) -def post_commit(): +def post_commit() -> None: backup_file = Path(get_backup_file_path()) # remove backup file if it exists @@ -17,4 +17,5 @@ def post_commit(): if __name__ == "__main__": - exit(post_commit()) + post_commit() + exit(0) diff --git a/hooks/prepare-commit-msg.py b/hooks/prepare-commit-msg.py index d1ccf169cf..e666fa673b 100755 --- a/hooks/prepare-commit-msg.py +++ b/hooks/prepare-commit-msg.py @@ -13,22 +13,19 @@ exit(1) -def prepare_commit_msg(commit_msg_file: Path) -> int: +def prepare_commit_msg(commit_msg_file: str) -> int: # check if the commit message needs to be generated using commitizen - if ( - subprocess.run( - [ - "cz", - "check", - "--commit-msg-file", - commit_msg_file, - ], - capture_output=True, - ).returncode - != 0 - ): + exit_code = subprocess.run( + [ + "cz", + "check", + "--commit-msg-file", + commit_msg_file, + ], + capture_output=True, + ).returncode + if exit_code != 0: backup_file = Path(get_backup_file_path()) - if backup_file.is_file(): # confirm if commit message from backup file should be reused answer = input("retry with previous message? [y/N]: ") @@ -54,6 +51,7 @@ def prepare_commit_msg(commit_msg_file: Path) -> int: # write message to backup file shutil.copyfile(commit_msg_file, backup_file) + return 0 if __name__ == "__main__": From b4dc83284dc8c9729032a774a037df1d1f2397d5 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Thu, 30 Jan 2025 21:55:41 +0800 Subject: [PATCH 057/159] docs(hooks): fix missing link --- docs/tutorials/auto_prepare_commit_message.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/auto_prepare_commit_message.md b/docs/tutorials/auto_prepare_commit_message.md index 3011142679..7e8295b7c8 100644 --- a/docs/tutorials/auto_prepare_commit_message.md +++ b/docs/tutorials/auto_prepare_commit_message.md @@ -25,7 +25,7 @@ commitizen and use the generated commit message for the commit. ## Installation -Copy the hooks from [here](https://github.com/commitizen-tools/hooks) into the `.git/hooks` folder and make them +Copy the hooks from [here](https://github.com/commitizen-tools/commitizen/tree/master/hooks) into the `.git/hooks` folder and make them executable by running the following commands from the root of your Git repository: ```bash From 7663adcf36b4bc12ab5a80f85a2c5478db2264d5 Mon Sep 17 00:00:00 2001 From: "Axel H." Date: Sat, 8 Feb 2025 00:54:22 +0100 Subject: [PATCH 058/159] ci(poe): use `poethepoet` as script runner for dev and ci and use poetry dependencies groups in ci Fix #724 --- .github/pull_request_template.md | 2 +- .github/workflows/docspublish.yml | 12 ++++--- .github/workflows/pythonpackage.yml | 6 ++-- .github/workflows/pythonpublish.yml | 10 +++--- .pre-commit-config.yaml | 11 +++--- docs/contributing.md | 8 ++--- pyproject.toml | 54 +++++++++++++++++++++++++++++ scripts/format | 10 ------ scripts/publish | 2 -- scripts/test | 10 ------ 10 files changed, 77 insertions(+), 48 deletions(-) delete mode 100755 scripts/format delete mode 100755 scripts/publish delete mode 100755 scripts/test diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 14bee6b434..0064604fba 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,7 +10,7 @@ Please fill in the following content to let us know better about this change. ## Checklist - [ ] Add test cases to all the changes you introduce -- [ ] Run `./scripts/format` and `./scripts/test` locally to ensure this change passes linter check and test +- [ ] Run `poetry all` locally to ensure this change passes linter check and test - [ ] Test the changes on the local machine manually - [ ] Update the documentation for the changes diff --git a/.github/workflows/docspublish.yml b/.github/workflows/docspublish.yml index f318b86858..a871d3c379 100644 --- a/.github/workflows/docspublish.yml +++ b/.github/workflows/docspublish.yml @@ -19,12 +19,12 @@ jobs: python-version: "3.x" - name: Install dependencies run: | - python -m pip install -U pip poetry + python -m pip install -U pip poetry poethepoet poetry --version - poetry install + poetry install --only main,script - name: Update CLI screenshots run: | - poetry run python scripts/gen_cli_help_screenshots.py + poetry doc:screenshots - name: Commit and push updated CLI screenshots run: | git config --global user.name "github-actions[bot]" @@ -55,12 +55,14 @@ jobs: python-version: "3.x" - name: Install dependencies run: | - python -m pip install -U mkdocs mkdocs-material + python -m pip install -U pip poetry poethepoet + poetry --version + poetry install --no-root --only documentation - name: Build docs env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - python -m mkdocs build + poetry doc:build - name: Generate Sponsors 💖 uses: JamesIves/github-sponsors-readme-action@v1 with: diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 8df5e54c03..f2363745cb 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -19,14 +19,14 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install -U pip poetry + python -m pip install -U pip poetry poethepoet poetry --version - poetry install + poetry install --only main,linters,test - name: Run tests and linters run: | git config --global user.email "action@github.com" git config --global user.name "GitHub Action" - SKIP=no-commit-to-branch,commitizen-branch poetry run pre-commit run --all-files --hook-stage pre-push + poetry ci shell: bash - name: Upload coverage to Codecov if: runner.os == 'Linux' diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index e3b3aa6f30..dc522bc0fd 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -19,12 +19,10 @@ jobs: python-version: "3.x" - name: Install dependencies run: | - python -m pip install -U pip poetry mkdocs mkdocs-material + python -m pip install -U pip poetry poetry --version - poetry install - name: Publish env: - PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - ./scripts/publish + POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} + POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: poetry publish --build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 470d1f1621..5db6862aeb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,6 @@ default_install_hook_types: default_stages: - pre-commit - - pre-push repos: - repo: meta @@ -55,21 +54,19 @@ repos: - id: commitizen-branch stages: - post-commit - - pre-push - repo: local hooks: - id: format - name: format + name: Format language: system pass_filenames: false - entry: ./scripts/format + entry: poetry format types: [ python ] - id: linter and test - name: linter and test + name: Linters language: system pass_filenames: false - stages: [ pre-push ] - entry: ./scripts/test + entry: poetry lint types: [ python ] diff --git a/docs/contributing.md b/docs/contributing.md index 439e3a19f7..0da1707da6 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -16,16 +16,16 @@ If you're a first-time contributor, you can check the issues with [good first is 1. Fork [the repository](https://github.com/commitizen-tools/commitizen). 2. Clone the repository from your GitHub. 3. Setup development environment through [poetry](https://python-poetry.org/) (`poetry install`). -4. Setup [pre-commit](https://pre-commit.com/) hook (`poetry run pre-commit install`) +4. Setup [pre-commit](https://pre-commit.com/) hook (`poetry setup-pre-commit`) 5. Check out a new branch and add your modification. 6. Add test cases for all your changes. (We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.) 7. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. We follow [conventional commits](https://www.conventionalcommits.org/). -8. Run `./scripts/format` and `./scripts/test` to ensure you follow the coding style and the tests pass. -9. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (through running `scripts/gen_cli_help_screenshots.py`). +8. Run `poetry all` to ensure you follow the coding style and the tests pass. +9. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (through running `poetry doc:screenshots`). 9. **Do not** update the `CHANGELOG.md`, it will be automatically created after merging to `master`. 10. **Do not** update the versions in the project, they will be automatically updated. -10. If your changes are about documentation. Run `poetry run mkdocs serve` to serve documentation locally and check whether there is any warning or error. +10. If your changes are about documentation. Run `poetry doc` to serve documentation locally and check whether there is any warning or error. 11. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏 ## Use of GitHub Labels diff --git a/pyproject.toml b/pyproject.toml index 47d83785cd..56131bef5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,6 +99,9 @@ version_scheme = "pep440" [tool.poetry] packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }] +[tool.poetry.requires-plugins] +"poethepoet" = ">=0.32.2" + [tool.poetry.group.dev.dependencies] ipython = "^8.0" @@ -161,6 +164,9 @@ omit = [ [tool.pytest.ini_options] addopts = "--strict-markers" +testpaths = [ + "tests/", +] [tool.ruff] line-length = 88 @@ -202,3 +208,51 @@ ignore_missing_imports = true skip = '.git*,*.svg,*.lock' check-hidden = true ignore-words-list = 'asend' + +[tool.poe] +poetry_command = "" + +[tool.poe.tasks] +format.help = "Format the code" +format.sequence = [ + {cmd = "ruff check --fix commitizen tests"}, + {cmd = "ruff format commitizen tests"}, +] + +lint.help = "Lint the code" +lint.sequence = [ + {cmd = "ruff check commitizen/ tests/ --fix"}, + {cmd = "mypy commitizen/ tests/"}, +] + +test.help = "Run the test suite" +test.cmd = "pytest -n 3 --dist=loadfile" + +cover.help = "Run the test suite with coverage" +cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen" + +all.help = "Run all tasks" +all.sequence = [ + "format", + "lint", + "cover", +] + +"doc:screenshots".help = "Render documentation screeenshots" +"doc:screenshots".script = "scripts.gen_cli_help_screenshots:gen_cli_help_screenshots" + +"doc:build".help = "Build the documentation" +"doc:build".cmd = "mkdocs build" + +doc.help = "Live documentation server" +doc.cmd = "mkdocs serve" + +ci.help = "Run all tasks in CI" +ci.sequence = [ + {cmd="pre-commit run --all-files"}, + "cover", +] +ci.env = {SKIP = "no-commit-to-branch"} + +setup-pre-commit.help = "Install pre-commit hooks" +setup-pre-commit.cmd = "pre-commit install" diff --git a/scripts/format b/scripts/format deleted file mode 100755 index 0ffe29ba4f..0000000000 --- a/scripts/format +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh -set -e - -export PREFIX="poetry run python -m " - -set -x - -# This is needed for running import sorting -${PREFIX}ruff check --fix commitizen tests -${PREFIX}ruff format commitizen tests diff --git a/scripts/publish b/scripts/publish deleted file mode 100755 index 4d31f1188e..0000000000 --- a/scripts/publish +++ /dev/null @@ -1,2 +0,0 @@ -# Publish to pypi -poetry publish --build -u $PYPI_USERNAME -p $PYPI_PASSWORD diff --git a/scripts/test b/scripts/test deleted file mode 100755 index 894228b41f..0000000000 --- a/scripts/test +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env sh -set -e - -export PREFIX='poetry run python -m ' -export REGEX='^(?![.]|venv).*' - -${PREFIX}pytest -n 3 --dist=loadfile --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen tests/ -${PREFIX}ruff check commitizen/ tests/ --fix -${PREFIX}mypy commitizen/ tests/ -${PREFIX}commitizen -nr 3 check --rev-range origin/master.. From 69203030925ccac0202575484b3ef8309b5332ae Mon Sep 17 00:00:00 2001 From: "Axel H." Date: Sat, 8 Feb 2025 02:09:32 +0100 Subject: [PATCH 059/159] ci(tox): add `test:all` command to run the test suite on all support Python versions using `tox` --- poetry.lock | 130 +++++++++++++++++++++++++++++++++++++++++++------ pyproject.toml | 15 ++++++ 2 files changed, 131 insertions(+), 14 deletions(-) diff --git a/poetry.lock b/poetry.lock index 723dceddd9..073e1bc247 100644 --- a/poetry.lock +++ b/poetry.lock @@ -49,6 +49,18 @@ files = [ [package.extras] dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] +[[package]] +name = "cachetools" +version = "5.5.1" +description = "Extensible memoizing collections and decorators" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "cachetools-5.5.1-py3-none-any.whl", hash = "sha256:b76651fdc3b24ead3c648bbdeeb940c1b04d365b38b4af66788f9ec4a81d42bb"}, + {file = "cachetools-5.5.1.tar.gz", hash = "sha256:70f238fbba50383ef62e55c6aff6d9673175fe59f7c6782c7a0b9e38f4a9df95"}, +] + [[package]] name = "certifi" version = "2024.8.30" @@ -73,6 +85,18 @@ files = [ {file = "cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560"}, ] +[[package]] +name = "chardet" +version = "5.2.0" +description = "Universal encoding detector for Python 3" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970"}, + {file = "chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7"}, +] + [[package]] name = "charset-normalizer" version = "3.4.1" @@ -328,7 +352,7 @@ version = "0.3.9" description = "Distribution utilities" optional = false python-versions = "*" -groups = ["linters"] +groups = ["dev", "linters"] files = [ {file = "distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87"}, {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"}, @@ -386,7 +410,7 @@ version = "3.16.1" description = "A platform independent file lock." optional = false python-versions = ">=3.8" -groups = ["linters"] +groups = ["dev", "linters"] files = [ {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, @@ -909,7 +933,7 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" -groups = ["main", "documentation", "test"] +groups = ["main", "dev", "documentation", "test"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -981,7 +1005,7 @@ version = "4.3.6" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" -groups = ["documentation", "linters"] +groups = ["dev", "documentation", "linters"] files = [ {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, @@ -998,7 +1022,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" -groups = ["test"] +groups = ["dev", "test"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -1104,6 +1128,26 @@ pyyaml = "*" [package.extras] extra = ["pygments (>=2.12)"] +[[package]] +name = "pyproject-api" +version = "1.9.0" +description = "API to interact with the python pyproject.toml based projects" +optional = false +python-versions = ">=3.9" +groups = ["dev"] +files = [ + {file = "pyproject_api-1.9.0-py3-none-any.whl", hash = "sha256:326df9d68dea22d9d98b5243c46e3ca3161b07a1b9b18e213d1e24fd0e605766"}, + {file = "pyproject_api-1.9.0.tar.gz", hash = "sha256:7e8a9854b2dfb49454fae421cb86af43efbb2b2454e5646ffb7623540321ae6e"}, +] + +[package.dependencies] +packaging = ">=24.2" +tomli = {version = ">=2.2.1", markers = "python_version < \"3.11\""} + +[package.extras] +docs = ["furo (>=2024.8.6)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "setuptools (>=75.8)"] + [[package]] name = "pytest" version = "8.3.4" @@ -1570,16 +1614,46 @@ tests = ["pytest", "pytest-cov"] [[package]] name = "tomli" -version = "2.1.0" +version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" -groups = ["linters", "test"] -files = [ - {file = "tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391"}, - {file = "tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8"}, -] -markers = {linters = "python_version < \"3.11\"", test = "python_full_version <= \"3.11.0a6\""} +groups = ["dev", "linters", "test"] +files = [ + {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, + {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee"}, + {file = "tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106"}, + {file = "tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8"}, + {file = "tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff"}, + {file = "tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b"}, + {file = "tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea"}, + {file = "tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222"}, + {file = "tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd"}, + {file = "tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e"}, + {file = "tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98"}, + {file = "tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4"}, + {file = "tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7"}, + {file = "tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281"}, + {file = "tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2"}, + {file = "tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744"}, + {file = "tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec"}, + {file = "tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69"}, + {file = "tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc"}, + {file = "tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff"}, +] +markers = {dev = "python_version < \"3.11\"", linters = "python_version < \"3.11\"", test = "python_full_version <= \"3.11.0a6\""} [[package]] name = "tomlkit" @@ -1593,6 +1667,34 @@ files = [ {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, ] +[[package]] +name = "tox" +version = "4.24.1" +description = "tox is a generic virtualenv management and test command line tool" +optional = false +python-versions = ">=3.8" +groups = ["dev"] +files = [ + {file = "tox-4.24.1-py3-none-any.whl", hash = "sha256:57ba7df7d199002c6df8c2db9e6484f3de6ca8f42013c083ea2d4d1e5c6bdc75"}, + {file = "tox-4.24.1.tar.gz", hash = "sha256:083a720adbc6166fff0b7d1df9d154f9d00bfccb9403b8abf6bc0ee435d6a62e"}, +] + +[package.dependencies] +cachetools = ">=5.5" +chardet = ">=5.2" +colorama = ">=0.4.6" +filelock = ">=3.16.1" +packaging = ">=24.2" +platformdirs = ">=4.3.6" +pluggy = ">=1.5" +pyproject-api = ">=1.8" +tomli = {version = ">=2.1", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.12.2", markers = "python_version < \"3.11\""} +virtualenv = ">=20.27.1" + +[package.extras] +test = ["devpi-process (>=1.0.2)", "pytest (>=8.3.3)", "pytest-mock (>=3.14)"] + [[package]] name = "traitlets" version = "5.14.3" @@ -1694,7 +1796,7 @@ version = "20.27.1" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.8" -groups = ["linters"] +groups = ["dev", "linters"] files = [ {file = "virtualenv-20.27.1-py3-none-any.whl", hash = "sha256:f11f1b8a29525562925f745563bfd48b189450f61fb34c4f9cc79dd5aa32a1f4"}, {file = "virtualenv-20.27.1.tar.gz", hash = "sha256:142c6be10212543b32c6c45d3d3893dff89112cc588b7d0879ae5a1ec03a47ba"}, @@ -1863,4 +1965,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.9,<4.0" -content-hash = "83c82b26a9bff591edf995c9c251e52dc23d9a4024562e1218a783ddf151fc20" +content-hash = "b0f8544806163bc0dddc039eb313f9d82119b845b3a19dedc381e9c88e8f4466" diff --git a/pyproject.toml b/pyproject.toml index 56131bef5e..11a3837dac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,6 +104,7 @@ packages = [{ include = "commitizen" }, { include = "commitizen/py.typed" }] [tool.poetry.group.dev.dependencies] ipython = "^8.0" +tox = ">4" [tool.poetry.group.test.dependencies] pytest = ">=7.2,<9.0" @@ -168,6 +169,17 @@ testpaths = [ "tests/", ] +[tool.tox] +requires = ["tox>=4.22"] +env_list = ["3.9", "3.10", "3.11", "3.12", "3.13"] + +[tool.tox.env_run_base] +description = "Run tests suite against Python {base_python}" +skip_install = true +deps = ["poetry>=2.0"] +commands_pre = [["poetry", "install", "--only", "main,test"]] +commands = [["pytest", { replace = "posargs", extend = true}]] + [tool.ruff] line-length = 88 @@ -228,6 +240,9 @@ lint.sequence = [ test.help = "Run the test suite" test.cmd = "pytest -n 3 --dist=loadfile" +"test:all".help = "Run the test suite on all supported Python versions" +"test:all".cmd = "tox --parallel" + cover.help = "Run the test suite with coverage" cover.ref = "test --cov-report term-missing --cov-report=xml:coverage.xml --cov=commitizen" From fe3b726268679892b3ce9e1ad08b8ed48b9f2761 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Fri, 7 Feb 2025 13:28:01 +0100 Subject: [PATCH 060/159] fix(bump): add debugging to bump command --- commitizen/bump.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/commitizen/bump.py b/commitizen/bump.py index 2351dbd7ec..908899eb0e 100644 --- a/commitizen/bump.py +++ b/commitizen/bump.py @@ -4,6 +4,7 @@ import re from collections import OrderedDict from glob import iglob +from logging import getLogger from string import Template from typing import cast @@ -14,6 +15,8 @@ VERSION_TYPES = [None, PATCH, MINOR, MAJOR] +logger = getLogger("commitizen") + def find_increment( commits: list[GitCommit], regex: str, increments_map: dict | OrderedDict @@ -38,7 +41,15 @@ def find_increment( new_increment = increments_map[match_pattern] break + if new_increment is None: + logger.debug( + f"no increment needed for '{found_keyword}' in '{message}'" + ) + if VERSION_TYPES.index(increment) < VERSION_TYPES.index(new_increment): + logger.debug( + f"increment detected is '{new_increment}' due to '{found_keyword}' in '{message}'" + ) increment = new_increment if increment == MAJOR: From 8519ca470e88f8c7eb30dfe31cad2b0dd8acfea2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Feb 2025 15:24:57 +0000 Subject: [PATCH 061/159] =?UTF-8?q?bump:=20version=204.2.0=20=E2=86=92=204?= =?UTF-8?q?.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5db6862aeb..3149a3658f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.2.0 # automatically updated by Commitizen + rev: v4.2.1 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index e8a573f8ef..ddcf5ff204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.2.1 (2025-02-08) + +### Fix + +- **bump**: add debugging to bump + ## v4.2.0 (2025-02-07) ### Feat diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 0fd7811c0d..aef46acb47 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.2.0" +__version__ = "4.2.1" diff --git a/pyproject.toml b/pyproject.toml index 11a3837dac..a2f9d7923b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.2.0" +version = "4.2.1" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -86,7 +86,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.2.0" +version = "4.2.1" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 43ee8a06b2ff003f45e8975cf9487a802cdf6d89 Mon Sep 17 00:00:00 2001 From: Matheus Cardoso Date: Sun, 9 Feb 2025 14:35:27 -0300 Subject: [PATCH 062/159] docs(tutorials): Add "stages" explicitly to the hook example As mentioned here: https://github.com/commitizen-tools/commitizen/issues/177#issuecomment-621939385, without the stages explicitly set, the hook always fails. --- docs/tutorials/auto_check.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tutorials/auto_check.md b/docs/tutorials/auto_check.md index ede8759e68..2fce57f9bd 100644 --- a/docs/tutorials/auto_check.md +++ b/docs/tutorials/auto_check.md @@ -25,6 +25,7 @@ repos: rev: v1.17.0 hooks: - id: commitizen + stages: [commit-msg] ``` - Step 3: Install the configuration into git hook through `pre-commit` From 295f9757f42e7f2287fa9608e2a65e59fb821f2b Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Tue, 11 Feb 2025 23:24:09 +0800 Subject: [PATCH 063/159] ci(github-actions): add check-commit task --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a2f9d7923b..24c3153b45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -237,6 +237,9 @@ lint.sequence = [ {cmd = "mypy commitizen/ tests/"}, ] +check-commit.help = "Check the commit message" +check-commit.cmd = "cz -nr 3 check --rev-range origin/master.." + test.help = "Run the test suite" test.cmd = "pytest -n 3 --dist=loadfile" @@ -251,6 +254,7 @@ all.sequence = [ "format", "lint", "cover", + "check-commit" ] "doc:screenshots".help = "Render documentation screeenshots" From d831c9995c17e14a8835599fe0405a6fa17d46b2 Mon Sep 17 00:00:00 2001 From: Christian Kagerer Date: Mon, 17 Feb 2025 15:32:20 +0100 Subject: [PATCH 064/159] fix(bump): manual version bump if prerelease offset is configured If you use the prerelase offset in the .cz.toml, as in the following example, no bump with a manual version number is possible. The error occurs when bumping with manual version number: cz bump 9.8.7 --prerelease-offset cannot be combined with MANUAL_VERSION ```toml [tool.commitizen] changelog_incremental = true tag_format = "v$version" update_changelog_on_bump = true version = "1.2.0b13" prerelease_offset = 1 ``` --- commitizen/commands/bump.py | 5 ----- docs/commands/bump.md | 2 +- tests/commands/test_bump_command.py | 17 ----------------- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index b82cac940f..8e9f0f181b 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -187,11 +187,6 @@ def __call__(self) -> None: # noqa: C901 "--major-version-zero cannot be combined with MANUAL_VERSION" ) - if prerelease_offset: - raise NotAllowed( - "--prerelease-offset cannot be combined with MANUAL_VERSION" - ) - if get_next: raise NotAllowed("--get-next cannot be combined with MANUAL_VERSION") diff --git a/docs/commands/bump.md b/docs/commands/bump.md index 49c6f03434..efdba76257 100644 --- a/docs/commands/bump.md +++ b/docs/commands/bump.md @@ -599,7 +599,7 @@ post_bump_hooks = [ ### `prerelease_offset` -Offset with which to start counting prereleses. +Offset with which to start counting prereleases. Defaults to: `0` diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index 934c0b8179..52e2defde0 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -1041,23 +1041,6 @@ def test_bump_with_hooks_and_increment(mocker: MockFixture, tmp_commitizen_proje assert tag_exists is True -@pytest.mark.usefixtures("tmp_commitizen_project") -def test_bump_manual_version_disallows_prerelease_offset(mocker): - create_file_and_commit("feat: new file") - - manual_version = "0.2.0" - testargs = ["cz", "bump", "--yes", "--prerelease-offset", "42", manual_version] - mocker.patch.object(sys, "argv", testargs) - - with pytest.raises(NotAllowed) as excinfo: - cli.main() - - expected_error_message = ( - "--prerelease-offset cannot be combined with MANUAL_VERSION" - ) - assert expected_error_message in str(excinfo.value) - - @pytest.mark.usefixtures("tmp_git_project") def test_bump_use_version_provider(mocker: MockFixture): mock = mocker.MagicMock(name="provider") From a330ac72b48927d99ea01ade8982236d4aa54f40 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Feb 2025 13:36:26 +0000 Subject: [PATCH 065/159] =?UTF-8?q?bump:=20version=204.2.1=20=E2=86=92=204?= =?UTF-8?q?.2.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3149a3658f..ba6ec51bae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.2.1 # automatically updated by Commitizen + rev: v4.2.2 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index ddcf5ff204..5ee93c0430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.2.2 (2025-02-18) + +### Fix + +- **bump**: manual version bump if prerelease offset is configured + ## v4.2.1 (2025-02-08) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index aef46acb47..2e905e44da 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.2.1" +__version__ = "4.2.2" diff --git a/pyproject.toml b/pyproject.toml index 24c3153b45..c63fe4d238 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.2.1" +version = "4.2.2" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -86,7 +86,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.2.1" +version = "4.2.2" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 7805412e33b191504ebfd59c26bc3f2efea082f1 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Fri, 31 Jan 2025 22:39:34 +0800 Subject: [PATCH 066/159] feat(providers): add uv_provider closes: #1349 --- commitizen/providers/uv_provider.py | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 commitizen/providers/uv_provider.py diff --git a/commitizen/providers/uv_provider.py b/commitizen/providers/uv_provider.py new file mode 100644 index 0000000000..36c8a49ad3 --- /dev/null +++ b/commitizen/providers/uv_provider.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from pathlib import Path +from typing import TYPE_CHECKING + +import tomlkit + +from commitizen.providers.base_provider import TomlProvider + +if TYPE_CHECKING: + import tomlkit.items + + +class UvProvider(TomlProvider): + """ + uv.lock and pyproject.tom version management + """ + + filename = "pyproject.toml" + lock_filename = "uv.lock" + + @property + def lock_file(self) -> Path: + return Path() / self.lock_filename + + def set_version(self, version: str) -> None: + super().set_version(version) + self.set_lock_version(version) + + def set_lock_version(self, version: str) -> None: + pyproject_toml_content = tomlkit.parse(self.file.read_text()) + project_name = pyproject_toml_content["project"]["name"] # type: ignore[index] + + document = tomlkit.parse(self.lock_file.read_text()) + + packages: tomlkit.items.AoT = document["package"] # type: ignore[assignment] + for i, package in enumerate(packages): + if package["name"] == project_name: + document["package"][i]["version"] = version # type: ignore[index] + break + self.lock_file.write_text(tomlkit.dumps(document)) From c2def94bee5d9b9b20b57951a1d042abdcbd4699 Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Tue, 18 Feb 2025 21:29:30 +0800 Subject: [PATCH 067/159] test(providers/uv_provider): add test case test_uv_provider --- commitizen/providers/__init__.py | 2 + pyproject.toml | 21 ++-- tests/providers/test_uv_provider.py | 97 +++++++++++++++++++ .../test_uv_provider/test_uv_provider.lock | 42 ++++++++ .../test_uv_provider/test_uv_provider.toml | 8 ++ 5 files changed, 159 insertions(+), 11 deletions(-) create mode 100644 tests/providers/test_uv_provider.py create mode 100644 tests/providers/test_uv_provider/test_uv_provider.lock create mode 100644 tests/providers/test_uv_provider/test_uv_provider.toml diff --git a/commitizen/providers/__init__.py b/commitizen/providers/__init__.py index 3fd4ab1bfd..9cf4ce5927 100644 --- a/commitizen/providers/__init__.py +++ b/commitizen/providers/__init__.py @@ -18,6 +18,7 @@ from commitizen.providers.pep621_provider import Pep621Provider from commitizen.providers.poetry_provider import PoetryProvider from commitizen.providers.scm_provider import ScmProvider +from commitizen.providers.uv_provider import UvProvider __all__ = [ "get_provider", @@ -28,6 +29,7 @@ "Pep621Provider", "PoetryProvider", "ScmProvider", + "UvProvider", ] PROVIDER_ENTRYPOINT = "commitizen.provider" diff --git a/pyproject.toml b/pyproject.toml index c63fe4d238..416032db11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,7 @@ npm = "commitizen.providers:NpmProvider" pep621 = "commitizen.providers:Pep621Provider" poetry = "commitizen.providers:PoetryProvider" scm = "commitizen.providers:ScmProvider" +uv = "commitizen.providers:UvProvider" [project.entry-points."commitizen.scheme"] pep440 = "commitizen.version_schemes:Pep440" @@ -165,9 +166,7 @@ omit = [ [tool.pytest.ini_options] addopts = "--strict-markers" -testpaths = [ - "tests/", -] +testpaths = ["tests/"] [tool.tox] requires = ["tox>=4.22"] @@ -178,7 +177,7 @@ description = "Run tests suite against Python {base_python}" skip_install = true deps = ["poetry>=2.0"] commands_pre = [["poetry", "install", "--only", "main,test"]] -commands = [["pytest", { replace = "posargs", extend = true}]] +commands = [["pytest", { replace = "posargs", extend = true }]] [tool.ruff] line-length = 88 @@ -227,14 +226,14 @@ poetry_command = "" [tool.poe.tasks] format.help = "Format the code" format.sequence = [ - {cmd = "ruff check --fix commitizen tests"}, - {cmd = "ruff format commitizen tests"}, + { cmd = "ruff check --fix commitizen tests" }, + { cmd = "ruff format commitizen tests" }, ] lint.help = "Lint the code" lint.sequence = [ - {cmd = "ruff check commitizen/ tests/ --fix"}, - {cmd = "mypy commitizen/ tests/"}, + { cmd = "ruff check commitizen/ tests/ --fix" }, + { cmd = "mypy commitizen/ tests/" }, ] check-commit.help = "Check the commit message" @@ -254,7 +253,7 @@ all.sequence = [ "format", "lint", "cover", - "check-commit" + "check-commit", ] "doc:screenshots".help = "Render documentation screeenshots" @@ -268,10 +267,10 @@ doc.cmd = "mkdocs serve" ci.help = "Run all tasks in CI" ci.sequence = [ - {cmd="pre-commit run --all-files"}, + { cmd = "pre-commit run --all-files" }, "cover", ] -ci.env = {SKIP = "no-commit-to-branch"} +ci.env = { SKIP = "no-commit-to-branch" } setup-pre-commit.help = "Install pre-commit hooks" setup-pre-commit.cmd = "pre-commit install" diff --git a/tests/providers/test_uv_provider.py b/tests/providers/test_uv_provider.py new file mode 100644 index 0000000000..4093709376 --- /dev/null +++ b/tests/providers/test_uv_provider.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from commitizen.config.base_config import BaseConfig +from commitizen.providers import get_provider +from commitizen.providers.uv_provider import UvProvider + +if TYPE_CHECKING: + from pytest_regressions.file_regression import FileRegressionFixture + + +PYPROJECT_TOML = """ +[project] +name = "test-uv" +version = "4.2.1" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.13" +dependencies = ["commitizen==4.2.1"] +""" + +UV_LOCK_SIMPLIFIED = """ +version = 1 +revision = 1 +requires-python = ">=3.13" + +[[package]] +name = "commitizen" +version = "4.2.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "argcomplete" }, + { name = "charset-normalizer" }, + { name = "colorama" }, + { name = "decli" }, + { name = "jinja2" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "questionary" }, + { name = "termcolor" }, + { name = "tomlkit" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d8/a3/77ffc9aee014cbf46c84c9f156a1ddef2d4c7cfb87d567decf2541464245/commitizen-4.2.1.tar.gz", hash = "sha256:5255416f6d6071068159f0b97605777f3e25d00927ff157b7a8d01efeda7b952", size = 50645 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/57/ce/2f5d8ebe8376991b5f805e9f33d20c7f4c9ca6155bdbda761117dc41dff1/commitizen-4.2.1-py3-none-any.whl", hash = "sha256:a347889e0fe408c3b920a34130d8f35616be3ea8ac6b7b20c5b9aac19762661b", size = 72646 }, +] + +[[package]] +name = "decli" +version = "0.6.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3d/a0/a4658f93ecb589f479037b164dc13c68d108b50bf6594e54c820749f97ac/decli-0.6.2.tar.gz", hash = "sha256:36f71eb55fd0093895efb4f416ec32b7f6e00147dda448e3365cf73ceab42d6f", size = 7424 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bf/70/3ea48dc9e958d7d66c44c9944809181f1ca79aaef25703c023b5092d34ff/decli-0.6.2-py3-none-any.whl", hash = "sha256:2fc84106ce9a8f523ed501ca543bdb7e416c064917c12a59ebdc7f311a97b7ed", size = 7854 }, +] + +[[package]] +name = "test-uv" +version = "4.2.1" +source = { virtual = "." } +dependencies = [ + { name = "commitizen" }, +] +""" + + +def test_uv_provider( + config: BaseConfig, tmpdir, file_regression: FileRegressionFixture +): + with tmpdir.as_cwd(): + pyproject_toml_file = tmpdir / UvProvider.filename + pyproject_toml_file.write_text(PYPROJECT_TOML, encoding="utf-8") + + uv_lock_file = tmpdir / UvProvider.lock_filename + uv_lock_file.write_text(UV_LOCK_SIMPLIFIED, encoding="utf-8") + + config.settings["version_provider"] = "uv" + + provider = get_provider(config) + assert isinstance(provider, UvProvider) + assert provider.get_version() == "4.2.1" + + provider.set_version("100.100.100") + assert provider.get_version() == "100.100.100" + + updated_pyproject_toml_content = pyproject_toml_file.read_text(encoding="utf-8") + updated_uv_lock_content = uv_lock_file.read_text(encoding="utf-8") + + for content in (updated_pyproject_toml_content, updated_uv_lock_content): + # updated project version + assert "100.100.100" in content + # commitizen version which was the same as project version and should not be affected + assert "4.2.1" in content + + file_regression.check(updated_pyproject_toml_content, extension=".toml") + file_regression.check(updated_uv_lock_content, extension=".lock") diff --git a/tests/providers/test_uv_provider/test_uv_provider.lock b/tests/providers/test_uv_provider/test_uv_provider.lock new file mode 100644 index 0000000000..d353763ce3 --- /dev/null +++ b/tests/providers/test_uv_provider/test_uv_provider.lock @@ -0,0 +1,42 @@ + +version = 1 +revision = 1 +requires-python = ">=3.13" + +[[package]] +name = "commitizen" +version = "4.2.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "argcomplete" }, + { name = "charset-normalizer" }, + { name = "colorama" }, + { name = "decli" }, + { name = "jinja2" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "questionary" }, + { name = "termcolor" }, + { name = "tomlkit" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d8/a3/77ffc9aee014cbf46c84c9f156a1ddef2d4c7cfb87d567decf2541464245/commitizen-4.2.1.tar.gz", hash = "sha256:5255416f6d6071068159f0b97605777f3e25d00927ff157b7a8d01efeda7b952", size = 50645 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/57/ce/2f5d8ebe8376991b5f805e9f33d20c7f4c9ca6155bdbda761117dc41dff1/commitizen-4.2.1-py3-none-any.whl", hash = "sha256:a347889e0fe408c3b920a34130d8f35616be3ea8ac6b7b20c5b9aac19762661b", size = 72646 }, +] + +[[package]] +name = "decli" +version = "0.6.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3d/a0/a4658f93ecb589f479037b164dc13c68d108b50bf6594e54c820749f97ac/decli-0.6.2.tar.gz", hash = "sha256:36f71eb55fd0093895efb4f416ec32b7f6e00147dda448e3365cf73ceab42d6f", size = 7424 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bf/70/3ea48dc9e958d7d66c44c9944809181f1ca79aaef25703c023b5092d34ff/decli-0.6.2-py3-none-any.whl", hash = "sha256:2fc84106ce9a8f523ed501ca543bdb7e416c064917c12a59ebdc7f311a97b7ed", size = 7854 }, +] + +[[package]] +name = "test-uv" +version = "100.100.100" +source = { virtual = "." } +dependencies = [ + { name = "commitizen" }, +] diff --git a/tests/providers/test_uv_provider/test_uv_provider.toml b/tests/providers/test_uv_provider/test_uv_provider.toml new file mode 100644 index 0000000000..9fdb6eb5aa --- /dev/null +++ b/tests/providers/test_uv_provider/test_uv_provider.toml @@ -0,0 +1,8 @@ + +[project] +name = "test-uv" +version = "100.100.100" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.13" +dependencies = ["commitizen==4.2.1"] From 9639da1539720377a39777fcde309e8426cdbf6f Mon Sep 17 00:00:00 2001 From: Wei Lee Date: Tue, 18 Feb 2025 21:44:15 +0800 Subject: [PATCH 068/159] ci(pre-commit): ignore test file eof --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba6ec51bae..392d1c040c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: hooks: - id: check-vcs-permalinks - id: end-of-file-fixer - exclude: "tests/((commands|data)/|test_).+" + exclude: "tests/((commands|data|providers/test_uv_provider)/|test_).+" - id: trailing-whitespace args: [ --markdown-linebreak-ext=md ] exclude: '\.svg$' From 63191a3ef4cf6aa4953f5b3be2a6c30fa9687430 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 28 Feb 2025 05:00:36 +0000 Subject: [PATCH 069/159] =?UTF-8?q?bump:=20version=204.2.2=20=E2=86=92=204?= =?UTF-8?q?.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 392d1c040c..dd16cc9cc4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.2.2 # automatically updated by Commitizen + rev: v4.3.0 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ee93c0430..fa7409d227 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.3.0 (2025-02-28) + +### Feat + +- **providers**: add uv_provider + ## v4.2.2 (2025-02-18) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 2e905e44da..111dc9172a 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.2.2" +__version__ = "4.3.0" diff --git a/pyproject.toml b/pyproject.toml index 416032db11..0c03a6d508 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.2.2" +version = "4.3.0" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -87,7 +87,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.2.2" +version = "4.3.0" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 5306cbf2436284e61b4e092c4e4e9e82c1317fcc Mon Sep 17 00:00:00 2001 From: "Axel H." Date: Sun, 17 Nov 2024 19:49:55 +0100 Subject: [PATCH 070/159] refactor(get_tag_regexes): dedup tag regexes definition --- commitizen/defaults.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/commitizen/defaults.py b/commitizen/defaults.py index d776e38d7a..45b6500e0b 100644 --- a/commitizen/defaults.py +++ b/commitizen/defaults.py @@ -138,17 +138,15 @@ class Settings(TypedDict, total=False): def get_tag_regexes( version_regex: str, ) -> dict[str, str]: + regexs = { + "version": version_regex, + "major": r"(?P\d+)", + "minor": r"(?P\d+)", + "patch": r"(?P\d+)", + "prerelease": r"(?P\w+\d+)?", + "devrelease": r"(?P\.dev\d+)?", + } return { - "$version": version_regex, - "$major": r"(?P\d+)", - "$minor": r"(?P\d+)", - "$patch": r"(?P\d+)", - "$prerelease": r"(?P\w+\d+)?", - "$devrelease": r"(?P\.dev\d+)?", - "${version}": version_regex, - "${major}": r"(?P\d+)", - "${minor}": r"(?P\d+)", - "${patch}": r"(?P\d+)", - "${prerelease}": r"(?P\w+\d+)?", - "${devrelease}": r"(?P\.dev\d+)?", + **{f"${k}": v for k, v in regexs.items()}, + **{f"${{{k}}}": v for k, v in regexs.items()}, } From 74554c2b4244341cda0f0db177fb78fa99d86646 Mon Sep 17 00:00:00 2001 From: "Axel H." Date: Mon, 18 Nov 2024 03:54:21 +0100 Subject: [PATCH 071/159] feat(tags): adds `legacy_tag_formats` and `ignored_tag_formats` settings --- commitizen/bump.py | 30 +- commitizen/changelog.py | 84 ++---- commitizen/changelog_formats/asciidoc.py | 23 +- commitizen/changelog_formats/base.py | 28 +- commitizen/changelog_formats/markdown.py | 25 +- .../changelog_formats/restructuredtext.py | 31 +-- commitizen/changelog_formats/textile.py | 28 +- commitizen/commands/bump.py | 38 +-- commitizen/commands/changelog.py | 39 ++- commitizen/commands/init.py | 2 +- commitizen/defaults.py | 6 +- commitizen/providers/scm_provider.py | 66 +---- commitizen/tags.py | 257 ++++++++++++++++++ commitizen/version_schemes.py | 12 +- docs/config.md | 20 ++ docs/faq.md | 33 +++ docs/tutorials/monorepo_guidance.md | 2 + docs/tutorials/tag_format.md | 101 +++++++ mkdocs.yml | 1 + tests/commands/test_bump_command.py | 29 ++ tests/commands/test_changelog_command.py | 242 ++++++++++++++--- ...from_rev_version_range_with_legacy_tags.md | 17 ++ ...changelog_incremental_change_tag_format.md | 17 ++ tests/providers/test_scm_provider.py | 23 ++ tests/test_bump_normalize_tag.py | 5 +- tests/test_changelog.py | 115 +++++++- tests/test_changelog_format_asciidoc.py | 19 +- tests/test_changelog_format_markdown.py | 19 +- .../test_changelog_format_restructuredtext.py | 5 + tests/test_changelog_format_textile.py | 19 +- tests/test_conf.py | 4 + tests/test_version_schemes.py | 14 +- 32 files changed, 982 insertions(+), 372 deletions(-) create mode 100644 commitizen/tags.py create mode 100644 docs/tutorials/tag_format.md create mode 100644 tests/commands/test_changelog_command/test_changelog_from_rev_version_range_with_legacy_tags.md create mode 100644 tests/commands/test_changelog_command/test_changelog_incremental_change_tag_format.md diff --git a/commitizen/bump.py b/commitizen/bump.py index 908899eb0e..adfab64cb0 100644 --- a/commitizen/bump.py +++ b/commitizen/bump.py @@ -11,7 +11,7 @@ from commitizen.defaults import MAJOR, MINOR, PATCH, bump_message, encoding from commitizen.exceptions import CurrentVersionNotFoundError from commitizen.git import GitCommit, smart_open -from commitizen.version_schemes import DEFAULT_SCHEME, Increment, Version, VersionScheme +from commitizen.version_schemes import Increment, Version VERSION_TYPES = [None, PATCH, MINOR, MAJOR] @@ -142,34 +142,6 @@ def _version_to_regex(version: str) -> str: return version.replace(".", r"\.").replace("+", r"\+") -def normalize_tag( - version: Version | str, - tag_format: str, - scheme: VersionScheme | None = None, -) -> str: - """The tag and the software version might be different. - - That's why this function exists. - - Example: - | tag | version (PEP 0440) | - | --- | ------- | - | v0.9.0 | 0.9.0 | - | ver1.0.0 | 1.0.0 | - | ver1.0.0.a0 | 1.0.0a0 | - """ - scheme = scheme or DEFAULT_SCHEME - version = scheme(version) if isinstance(version, str) else version - - major, minor, patch = version.release - prerelease = version.prerelease or "" - - t = Template(tag_format) - return t.safe_substitute( - version=version, major=major, minor=minor, patch=patch, prerelease=prerelease - ) - - def create_commit_message( current_version: Version | str, new_version: Version | str, diff --git a/commitizen/changelog.py b/commitizen/changelog.py index 7f300354b6..95bf21d6f9 100644 --- a/commitizen/changelog.py +++ b/commitizen/changelog.py @@ -42,21 +42,13 @@ Template, ) -from commitizen import out -from commitizen.bump import normalize_tag from commitizen.cz.base import ChangelogReleaseHook -from commitizen.defaults import get_tag_regexes from commitizen.exceptions import InvalidConfigurationError, NoCommitsFoundError from commitizen.git import GitCommit, GitTag -from commitizen.version_schemes import ( - DEFAULT_SCHEME, - BaseVersion, - InvalidVersion, -) +from commitizen.tags import TagRules if TYPE_CHECKING: from commitizen.cz.base import MessageBuilderHook - from commitizen.version_schemes import VersionScheme @dataclass @@ -69,50 +61,19 @@ class Metadata: unreleased_end: int | None = None latest_version: str | None = None latest_version_position: int | None = None + latest_version_tag: str | None = None + + def __post_init__(self): + if self.latest_version and not self.latest_version_tag: + # Test syntactic sugar + # latest version tag is optional if same as latest version + self.latest_version_tag = self.latest_version def get_commit_tag(commit: GitCommit, tags: list[GitTag]) -> GitTag | None: return next((tag for tag in tags if tag.rev == commit.rev), None) -def tag_included_in_changelog( - tag: GitTag, - used_tags: list, - merge_prerelease: bool, - scheme: VersionScheme = DEFAULT_SCHEME, -) -> bool: - if tag in used_tags: - return False - - try: - version = scheme(tag.name) - except InvalidVersion: - return False - - if merge_prerelease and version.is_prerelease: - return False - - return True - - -def get_version_tags( - scheme: type[BaseVersion], tags: list[GitTag], tag_format: str -) -> list[GitTag]: - valid_tags: list[GitTag] = [] - TAG_FORMAT_REGEXS = get_tag_regexes(scheme.parser.pattern) - tag_format_regex = tag_format - for pattern, regex in TAG_FORMAT_REGEXS.items(): - tag_format_regex = tag_format_regex.replace(pattern, regex) - for tag in tags: - if re.match(tag_format_regex, tag.name): - valid_tags.append(tag) - else: - out.warn( - f"InvalidVersion {tag.name} doesn't match configured tag format {tag_format}" - ) - return valid_tags - - def generate_tree_from_commits( commits: list[GitCommit], tags: list[GitTag], @@ -122,13 +83,13 @@ def generate_tree_from_commits( change_type_map: dict[str, str] | None = None, changelog_message_builder_hook: MessageBuilderHook | None = None, changelog_release_hook: ChangelogReleaseHook | None = None, - merge_prerelease: bool = False, - scheme: VersionScheme = DEFAULT_SCHEME, + rules: TagRules | None = None, ) -> Iterable[dict]: pat = re.compile(changelog_pattern) map_pat = re.compile(commit_parser, re.MULTILINE) body_map_pat = re.compile(commit_parser, re.MULTILINE | re.DOTALL) current_tag: GitTag | None = None + rules = rules or TagRules() # Check if the latest commit is not tagged if commits: @@ -148,8 +109,10 @@ def generate_tree_from_commits( for commit in commits: commit_tag = get_commit_tag(commit, tags) - if commit_tag is not None and tag_included_in_changelog( - commit_tag, used_tags, merge_prerelease, scheme=scheme + if ( + commit_tag + and commit_tag not in used_tags + and rules.include_in_changelog(commit_tag) ): used_tags.append(commit_tag) release = { @@ -343,8 +306,7 @@ def get_smart_tag_range( def get_oldest_and_newest_rev( tags: list[GitTag], version: str, - tag_format: str, - scheme: VersionScheme | None = None, + rules: TagRules, ) -> tuple[str | None, str | None]: """Find the tags for the given version. @@ -358,22 +320,28 @@ def get_oldest_and_newest_rev( oldest, newest = version.split("..") except ValueError: newest = version - newest_tag = normalize_tag(newest, tag_format=tag_format, scheme=scheme) + if not (newest_tag := rules.find_tag_for(tags, newest)): + raise NoCommitsFoundError("Could not find a valid revision range.") oldest_tag = None + oldest_tag_name = None if oldest: - oldest_tag = normalize_tag(oldest, tag_format=tag_format, scheme=scheme) + if not (oldest_tag := rules.find_tag_for(tags, oldest)): + raise NoCommitsFoundError("Could not find a valid revision range.") + oldest_tag_name = oldest_tag.name - tags_range = get_smart_tag_range(tags, newest=newest_tag, oldest=oldest_tag) + tags_range = get_smart_tag_range( + tags, newest=newest_tag.name, oldest=oldest_tag_name + ) if not tags_range: raise NoCommitsFoundError("Could not find a valid revision range.") oldest_rev: str | None = tags_range[-1].name - newest_rev = newest_tag + newest_rev = newest_tag.name # check if it's the first tag created # and it's also being requested as part of the range - if oldest_rev == tags[-1].name and oldest_rev == oldest_tag: + if oldest_rev == tags[-1].name and oldest_rev == oldest_tag_name: return None, newest_rev # when they are the same, and it's also the diff --git a/commitizen/changelog_formats/asciidoc.py b/commitizen/changelog_formats/asciidoc.py index 6007a56d16..ed3e8607bd 100644 --- a/commitizen/changelog_formats/asciidoc.py +++ b/commitizen/changelog_formats/asciidoc.py @@ -1,36 +1,25 @@ from __future__ import annotations import re +from typing import TYPE_CHECKING from .base import BaseFormat +if TYPE_CHECKING: + from commitizen.tags import VersionTag + class AsciiDoc(BaseFormat): extension = "adoc" RE_TITLE = re.compile(r"^(?P=+) (?P.*)$") - def parse_version_from_title(self, line: str) -> str | None: + def parse_version_from_title(self, line: str) -> VersionTag | None: m = self.RE_TITLE.match(line) if not m: return None # Capture last match as AsciiDoc use postfixed URL labels - matches = list(re.finditer(self.version_parser, m.group("title"))) - if not matches: - return None - if "version" in matches[-1].groupdict(): - return matches[-1].group("version") - partial_matches = matches[-1].groupdict() - try: - partial_version = f"{partial_matches['major']}.{partial_matches['minor']}.{partial_matches['patch']}" - except KeyError: - return None - - if partial_matches.get("prerelease"): - partial_version = f"{partial_version}-{partial_matches['prerelease']}" - if partial_matches.get("devrelease"): - partial_version = f"{partial_version}{partial_matches['devrelease']}" - return partial_version + return self.tag_rules.search_version(m.group("title"), last=True) def parse_title_level(self, line: str) -> int | None: m = self.RE_TITLE.match(line) diff --git a/commitizen/changelog_formats/base.py b/commitizen/changelog_formats/base.py index 53527a060c..f69cf8f00f 100644 --- a/commitizen/changelog_formats/base.py +++ b/commitizen/changelog_formats/base.py @@ -1,14 +1,12 @@ from __future__ import annotations import os -import re from abc import ABCMeta -from re import Pattern from typing import IO, Any, ClassVar from commitizen.changelog import Metadata from commitizen.config.base_config import BaseConfig -from commitizen.defaults import get_tag_regexes +from commitizen.tags import TagRules, VersionTag from commitizen.version_schemes import get_version_scheme from . import ChangelogFormat @@ -28,15 +26,12 @@ def __init__(self, config: BaseConfig): self.config = config self.encoding = self.config.settings["encoding"] self.tag_format = self.config.settings["tag_format"] - - @property - def version_parser(self) -> Pattern: - tag_regex: str = self.tag_format - version_regex = get_version_scheme(self.config).parser.pattern - TAG_FORMAT_REGEXS = get_tag_regexes(version_regex) - for pattern, regex in TAG_FORMAT_REGEXS.items(): - tag_regex = tag_regex.replace(pattern, regex) - return re.compile(tag_regex) + self.tag_rules = TagRules( + scheme=get_version_scheme(self.config.settings), + tag_format=self.tag_format, + legacy_tag_formats=self.config.settings["legacy_tag_formats"], + ignored_tag_formats=self.config.settings["ignored_tag_formats"], + ) def get_metadata(self, filepath: str) -> Metadata: if not os.path.isfile(filepath): @@ -63,9 +58,10 @@ def get_metadata_from_file(self, file: IO[Any]) -> Metadata: meta.unreleased_end = index # Try to find the latest release done - version = self.parse_version_from_title(line) - if version: - meta.latest_version = version + parsed = self.parse_version_from_title(line) + if parsed: + meta.latest_version = parsed.version + meta.latest_version_tag = parsed.tag meta.latest_version_position = index break # there's no need for more info if meta.unreleased_start is not None and meta.unreleased_end is None: @@ -73,7 +69,7 @@ def get_metadata_from_file(self, file: IO[Any]) -> Metadata: return meta - def parse_version_from_title(self, line: str) -> str | None: + def parse_version_from_title(self, line: str) -> VersionTag | None: """ Extract the version from a title line if any """ diff --git a/commitizen/changelog_formats/markdown.py b/commitizen/changelog_formats/markdown.py index 29c1cce54a..e3d30fe174 100644 --- a/commitizen/changelog_formats/markdown.py +++ b/commitizen/changelog_formats/markdown.py @@ -1,9 +1,13 @@ from __future__ import annotations import re +from typing import TYPE_CHECKING from .base import BaseFormat +if TYPE_CHECKING: + from commitizen.tags import VersionTag + class Markdown(BaseFormat): extension = "md" @@ -12,28 +16,11 @@ class Markdown(BaseFormat): RE_TITLE = re.compile(r"^(?P#+) (?P.*)$") - def parse_version_from_title(self, line: str) -> str | None: + def parse_version_from_title(self, line: str) -> VersionTag | None: m = self.RE_TITLE.match(line) if not m: return None - m = re.search(self.version_parser, m.group("title")) - if not m: - return None - if "version" in m.groupdict(): - return m.group("version") - matches = m.groupdict() - try: - partial_version = ( - f"{matches['major']}.{matches['minor']}.{matches['patch']}" - ) - except KeyError: - return None - - if matches.get("prerelease"): - partial_version = f"{partial_version}-{matches['prerelease']}" - if matches.get("devrelease"): - partial_version = f"{partial_version}{matches['devrelease']}" - return partial_version + return self.tag_rules.search_version(m.group("title")) def parse_title_level(self, line: str) -> int | None: m = self.RE_TITLE.match(line) diff --git a/commitizen/changelog_formats/restructuredtext.py b/commitizen/changelog_formats/restructuredtext.py index 8bcf9a4a4f..b7e4e105a1 100644 --- a/commitizen/changelog_formats/restructuredtext.py +++ b/commitizen/changelog_formats/restructuredtext.py @@ -1,6 +1,5 @@ from __future__ import annotations -import re import sys from itertools import zip_longest from typing import IO, TYPE_CHECKING, Any, Union @@ -64,31 +63,11 @@ def get_metadata_from_file(self, file: IO[Any]) -> Metadata: elif unreleased_title_kind and unreleased_title_kind == kind: meta.unreleased_end = index # Try to find the latest release done - m = re.search(self.version_parser, title) - if m: - matches = m.groupdict() - if "version" in matches: - version = m.group("version") - meta.latest_version = version - meta.latest_version_position = index - break # there's no need for more info - try: - partial_version = ( - f"{matches['major']}.{matches['minor']}.{matches['patch']}" - ) - if matches.get("prerelease"): - partial_version = ( - f"{partial_version}-{matches['prerelease']}" - ) - if matches.get("devrelease"): - partial_version = ( - f"{partial_version}{matches['devrelease']}" - ) - meta.latest_version = partial_version - meta.latest_version_position = index - break - except KeyError: - pass + if version := self.tag_rules.search_version(title): + meta.latest_version = version[0] + meta.latest_version_tag = version[1] + meta.latest_version_position = index + break if meta.unreleased_start is not None and meta.unreleased_end is None: meta.unreleased_end = ( meta.latest_version_position if meta.latest_version else index + 1 diff --git a/commitizen/changelog_formats/textile.py b/commitizen/changelog_formats/textile.py index 8750f0056c..6693e5e002 100644 --- a/commitizen/changelog_formats/textile.py +++ b/commitizen/changelog_formats/textile.py @@ -1,39 +1,23 @@ from __future__ import annotations import re +from typing import TYPE_CHECKING from .base import BaseFormat +if TYPE_CHECKING: + from commitizen.tags import VersionTag + class Textile(BaseFormat): extension = "textile" RE_TITLE = re.compile(r"^h(?P<level>\d)\. (?P<title>.*)$") - def parse_version_from_title(self, line: str) -> str | None: + def parse_version_from_title(self, line: str) -> VersionTag | None: if not self.RE_TITLE.match(line): return None - m = re.search(self.version_parser, line) - if not m: - return None - if "version" in m.groupdict(): - return m.group("version") - matches = m.groupdict() - if not all( - [ - version_segment in matches - for version_segment in ("major", "minor", "patch") - ] - ): - return None - - partial_version = f"{matches['major']}.{matches['minor']}.{matches['patch']}" - - if matches.get("prerelease"): - partial_version = f"{partial_version}-{matches['prerelease']}" - if matches.get("devrelease"): - partial_version = f"{partial_version}{matches['devrelease']}" - return partial_version + return self.tag_rules.search_version(line) def parse_title_level(self, line: str) -> int | None: m = self.RE_TITLE.match(line) diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index 8e9f0f181b..60853094f9 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -2,6 +2,7 @@ import warnings from logging import getLogger +from typing import cast import questionary @@ -9,6 +10,7 @@ from commitizen.changelog_formats import get_changelog_format from commitizen.commands.changelog import Changelog from commitizen.config import BaseConfig +from commitizen.defaults import Settings from commitizen.exceptions import ( BumpCommitFailedError, BumpTagFailedError, @@ -24,6 +26,7 @@ NoVersionSpecifiedError, ) from commitizen.providers import get_provider +from commitizen.tags import TagRules from commitizen.version_schemes import ( Increment, InvalidVersion, @@ -84,7 +87,7 @@ def __init__(self, config: BaseConfig, arguments: dict): ) ) self.scheme = get_version_scheme( - self.config, arguments["version_scheme"] or deprecated_version_type + self.config.settings, arguments["version_scheme"] or deprecated_version_type ) self.file_name = arguments["file_name"] or self.config.settings.get( "changelog_file" @@ -98,18 +101,20 @@ def __init__(self, config: BaseConfig, arguments: dict): ) self.extras = arguments["extras"] - def is_initial_tag(self, current_tag_version: str, is_yes: bool = False) -> bool: + def is_initial_tag( + self, current_tag: git.GitTag | None, is_yes: bool = False + ) -> bool: """Check if reading the whole git tree up to HEAD is needed.""" is_initial = False - if not git.tag_exist(current_tag_version): + if not current_tag: if is_yes: is_initial = True else: - out.info(f"Tag {current_tag_version} could not be found. ") + out.info("No tag matching configuration could not be found.") out.info( "Possible causes:\n" "- version in configuration is not the current version\n" - "- tag_format is missing, check them using 'git tag --list'\n" + "- tag_format or legacy_tag_formats is missing, check them using 'git tag --list'\n" ) is_initial = questionary.confirm("Is this the first tag created?").ask() return is_initial @@ -143,7 +148,6 @@ def __call__(self) -> None: # noqa: C901 except TypeError: raise NoVersionSpecifiedError() - tag_format: str = self.bump_settings["tag_format"] bump_commit_message: str = self.bump_settings["bump_message"] version_files: list[str] = self.bump_settings["version_files"] major_version_zero: bool = self.bump_settings["major_version_zero"] @@ -221,13 +225,13 @@ def __call__(self) -> None: # noqa: C901 or self.changelog_config ) - current_tag_version: str = bump.normalize_tag( - current_version, - tag_format=tag_format, - scheme=self.scheme, + rules = TagRules.from_settings(cast(Settings, self.bump_settings)) + current_tag = rules.find_tag_for(git.get_tags(), current_version) + current_tag_version = getattr( + current_tag, "name", rules.normalize_tag(current_version) ) - is_initial = self.is_initial_tag(current_tag_version, is_yes) + is_initial = self.is_initial_tag(current_tag, is_yes) if manual_version: try: @@ -239,10 +243,10 @@ def __call__(self) -> None: # noqa: C901 ) from exc else: if increment is None: - if is_initial: - commits = git.get_commits() + if current_tag: + commits = git.get_commits(current_tag.name) else: - commits = git.get_commits(current_tag_version) + commits = git.get_commits() # No commits, there is no need to create an empty tag. # Unless we previously had a prerelease. @@ -280,11 +284,7 @@ def __call__(self) -> None: # noqa: C901 exact_increment=increment_mode == "exact", ) - new_tag_version = bump.normalize_tag( - new_version, - tag_format=tag_format, - scheme=self.scheme, - ) + new_tag_version = rules.normalize_tag(new_version) message = bump.create_commit_message( current_version, new_version, bump_commit_message ) diff --git a/commitizen/commands/changelog.py b/commitizen/commands/changelog.py index 25e644aaef..80a72651e4 100644 --- a/commitizen/commands/changelog.py +++ b/commitizen/commands/changelog.py @@ -6,7 +6,7 @@ from pathlib import Path from typing import Callable, cast -from commitizen import bump, changelog, defaults, factory, git, out +from commitizen import changelog, defaults, factory, git, out from commitizen.changelog_formats import get_changelog_format from commitizen.config import BaseConfig from commitizen.cz.base import ChangelogReleaseHook, MessageBuilderHook @@ -20,6 +20,7 @@ NotAllowed, ) from commitizen.git import GitTag, smart_open +from commitizen.tags import TagRules from commitizen.version_schemes import get_version_scheme @@ -53,7 +54,9 @@ def __init__(self, config: BaseConfig, args): ) self.dry_run = args["dry_run"] - self.scheme = get_version_scheme(self.config, args.get("version_scheme")) + self.scheme = get_version_scheme( + self.config.settings, args.get("version_scheme") + ) current_version = ( args.get("current_version", config.settings.get("version")) or "" @@ -73,9 +76,14 @@ def __init__(self, config: BaseConfig, args): self.tag_format: str = ( args.get("tag_format") or self.config.settings["tag_format"] ) - self.merge_prerelease = args.get( - "merge_prerelease" - ) or self.config.settings.get("changelog_merge_prerelease") + self.tag_rules = TagRules( + scheme=self.scheme, + tag_format=self.tag_format, + legacy_tag_formats=self.config.settings["legacy_tag_formats"], + ignored_tag_formats=self.config.settings["ignored_tag_formats"], + merge_prereleases=args.get("merge_prerelease") + or self.config.settings["changelog_merge_prerelease"], + ) self.template = ( args.get("template") @@ -152,7 +160,6 @@ def __call__(self): changelog_release_hook: ChangelogReleaseHook | None = ( self.cz.changelog_release_hook ) - merge_prerelease = self.merge_prerelease if self.export_template_to: return self.export_template() @@ -168,28 +175,19 @@ def __call__(self): # Don't continue if no `file_name` specified. assert self.file_name - tags = ( - changelog.get_version_tags(self.scheme, git.get_tags(), self.tag_format) - or [] - ) + tags = self.tag_rules.get_version_tags(git.get_tags(), warn=True) end_rev = "" if self.incremental: changelog_meta = self.changelog_format.get_metadata(self.file_name) if changelog_meta.latest_version: - latest_tag_version: str = bump.normalize_tag( - changelog_meta.latest_version, - tag_format=self.tag_format, - scheme=self.scheme, - ) start_rev = self._find_incremental_rev( - strip_local_version(latest_tag_version), tags + strip_local_version(changelog_meta.latest_version_tag), tags ) if self.rev_range: start_rev, end_rev = changelog.get_oldest_and_newest_rev( tags, - version=self.rev_range, - tag_format=self.tag_format, - scheme=self.scheme, + self.rev_range, + self.tag_rules, ) commits = git.get_commits(start=start_rev, end=end_rev, args="--topo-order") if not commits and ( @@ -205,8 +203,7 @@ def __call__(self): change_type_map=change_type_map, changelog_message_builder_hook=changelog_message_builder_hook, changelog_release_hook=changelog_release_hook, - merge_prerelease=merge_prerelease, - scheme=self.scheme, + rules=self.tag_rules, ) if self.change_type_order: tree = changelog.order_changelog_tree(tree, self.change_type_order) diff --git a/commitizen/commands/init.py b/commitizen/commands/init.py index ffc5e3eb3b..e39dfbe291 100644 --- a/commitizen/commands/init.py +++ b/commitizen/commands/init.py @@ -98,7 +98,7 @@ def __call__(self): version_provider = self._ask_version_provider() # select tag = self._ask_tag() # confirm & select version_scheme = self._ask_version_scheme() # select - version = get_version_scheme(self.config, version_scheme)(tag) + version = get_version_scheme(self.config.settings, version_scheme)(tag) tag_format = self._ask_tag_format(tag) # confirm & text update_changelog_on_bump = self._ask_update_changelog_on_bump() # confirm major_version_zero = self._ask_major_version_zero(version) # confirm diff --git a/commitizen/defaults.py b/commitizen/defaults.py index 45b6500e0b..0b78e1b0bb 100644 --- a/commitizen/defaults.py +++ b/commitizen/defaults.py @@ -2,7 +2,7 @@ import pathlib from collections import OrderedDict -from collections.abc import Iterable, MutableMapping +from collections.abc import Iterable, MutableMapping, Sequence from typing import Any, TypedDict # Type @@ -35,6 +35,8 @@ class Settings(TypedDict, total=False): version_scheme: str | None version_type: str | None tag_format: str + legacy_tag_formats: Sequence[str] + ignored_tag_formats: Sequence[str] bump_message: str | None retry_after_failure: bool allow_abort: bool @@ -77,6 +79,8 @@ class Settings(TypedDict, total=False): "version_provider": "commitizen", "version_scheme": None, "tag_format": "$version", # example v$version + "legacy_tag_formats": [], + "ignored_tag_formats": [], "bump_message": None, # bumped v$current_version to $new_version "retry_after_failure": False, "allow_abort": False, diff --git a/commitizen/providers/scm_provider.py b/commitizen/providers/scm_provider.py index 33e470cfc6..cb575148cb 100644 --- a/commitizen/providers/scm_provider.py +++ b/commitizen/providers/scm_provider.py @@ -1,17 +1,8 @@ from __future__ import annotations -import re -from typing import Callable - -from commitizen.defaults import get_tag_regexes from commitizen.git import get_tags from commitizen.providers.base_provider import VersionProvider -from commitizen.version_schemes import ( - InvalidVersion, - Version, - VersionProtocol, - get_version_scheme, -) +from commitizen.tags import TagRules class ScmProvider(VersionProvider): @@ -23,57 +14,14 @@ class ScmProvider(VersionProvider): It is meant for `setuptools-scm` or any package manager `*-scm` provider. """ - TAG_FORMAT_REGEXS = get_tag_regexes(r"(?P<version>.+)") - - def _tag_format_matcher(self) -> Callable[[str], VersionProtocol | None]: - version_scheme = get_version_scheme(self.config) - pattern = self.config.settings["tag_format"] - if pattern == "$version": - pattern = version_scheme.parser.pattern - for var, tag_pattern in self.TAG_FORMAT_REGEXS.items(): - pattern = pattern.replace(var, tag_pattern) - - regex = re.compile(f"^{pattern}$", re.VERBOSE) - - def matcher(tag: str) -> Version | None: - match = regex.match(tag) - if not match: - return None - groups = match.groupdict() - if "version" in groups: - ver = groups["version"] - elif "major" in groups: - ver = "".join( - ( - groups["major"], - f".{groups['minor']}" if groups.get("minor") else "", - f".{groups['patch']}" if groups.get("patch") else "", - groups["prerelease"] if groups.get("prerelease") else "", - groups["devrelease"] if groups.get("devrelease") else "", - ) - ) - elif pattern == version_scheme.parser.pattern: - ver = tag - else: - return None - - try: - return version_scheme(ver) - except InvalidVersion: - return None - - return matcher - def get_version(self) -> str: - matcher = self._tag_format_matcher() - matches = sorted( - version - for t in get_tags(reachable_only=True) - if (version := matcher(t.name)) - ) - if not matches: + rules = TagRules.from_settings(self.config.settings) + tags = get_tags(reachable_only=True) + version_tags = rules.get_version_tags(tags) + versions = sorted(rules.extract_version(t) for t in version_tags) + if not versions: return "0.0.0" - return str(matches[-1]) + return str(versions[-1]) def set_version(self, version: str): # Not necessary diff --git a/commitizen/tags.py b/commitizen/tags.py new file mode 100644 index 0000000000..962e428ef2 --- /dev/null +++ b/commitizen/tags.py @@ -0,0 +1,257 @@ +from __future__ import annotations + +import re +import warnings +from collections.abc import Sequence +from dataclasses import dataclass, field +from functools import cached_property +from string import Template +from typing import TYPE_CHECKING, NamedTuple + +from typing_extensions import Self + +from commitizen import out +from commitizen.defaults import DEFAULT_SETTINGS, Settings, get_tag_regexes +from commitizen.git import GitTag +from commitizen.version_schemes import ( + DEFAULT_SCHEME, + InvalidVersion, + Version, + VersionScheme, + get_version_scheme, +) + +if TYPE_CHECKING: + from commitizen.version_schemes import VersionScheme + + +class VersionTag(NamedTuple): + """Represent a version and its matching tag form.""" + + version: str + tag: str + + +@dataclass +class TagRules: + """ + Encapsulate tag-related rules. + + It allows to filter or match tags according to rules provided in settings: + - `tag_format`: the current format of the tags generated on `bump` + - `legacy_tag_formats`: previous known formats of the tag + - `ignored_tag_formats`: known formats that should be ignored + - `merge_prereleases`: if `True`, prereleases will be merged with their release counterpart + - `version_scheme`: the version scheme to use, which will be used to parse and format versions + + This class is meant to abstract and centralize all the logic related to tags. + To ensure consistency, it is recommended to use this class to handle tags. + + Example: + + ```py + settings = DEFAULT_SETTINGS.clone() + settings.update({ + "tag_format": "v{version}" + "legacy_tag_formats": ["version{version}", "ver{version}"], + "ignored_tag_formats": ["ignored{version}"], + }) + + rules = TagRules.from_settings(settings) + + assert rules.is_version_tag("v1.0.0") + assert rules.is_version_tag("version1.0.0") + assert rules.is_version_tag("ver1.0.0") + assert not rules.is_version_tag("ignored1.0.0", warn=True) # Does not warn + assert not rules.is_version_tag("warn1.0.0", warn=True) # Does warn + + assert rules.search_version("# My v1.0.0 version").version == "1.0.0" + assert rules.extract_version("v1.0.0") == Version("1.0.0") + try: + assert rules.extract_version("not-a-v1.0.0") + except InvalidVersion: + print "Does not match a tag format" + ``` + """ + + scheme: VersionScheme = DEFAULT_SCHEME + tag_format: str = DEFAULT_SETTINGS["tag_format"] + legacy_tag_formats: Sequence[str] = field(default_factory=list) + ignored_tag_formats: Sequence[str] = field(default_factory=list) + merge_prereleases: bool = False + + @cached_property + def version_regexes(self) -> Sequence[re.Pattern]: + """Regexes for all legit tag formats, current and legacy""" + tag_formats = [self.tag_format, *self.legacy_tag_formats] + regexes = (self._format_regex(p) for p in tag_formats) + return [re.compile(r) for r in regexes] + + @cached_property + def ignored_regexes(self) -> Sequence[re.Pattern]: + """Regexes for known but ignored tag formats""" + regexes = (self._format_regex(p, star=True) for p in self.ignored_tag_formats) + return [re.compile(r) for r in regexes] + + def _format_regex(self, tag_pattern: str, star: bool = False) -> str: + """ + Format a tag pattern into a regex pattern. + + If star is `True`, the `*` character will be considered as a wildcard. + """ + tag_regexes = get_tag_regexes(self.scheme.parser.pattern) + format_regex = tag_pattern.replace("*", "(?:.*?)") if star else tag_pattern + for pattern, regex in tag_regexes.items(): + format_regex = format_regex.replace(pattern, regex) + return format_regex + + def is_version_tag(self, tag: str | GitTag, warn: bool = False) -> bool: + """ + True if a given tag is a legit version tag. + + if `warn` is `True`, it will print a warning message if the tag is not a version tag. + """ + tag = tag.name if isinstance(tag, GitTag) else tag + is_legit = any(regex.match(tag) for regex in self.version_regexes) + if warn and not is_legit and not self.is_ignored_tag(tag): + out.warn(f"InvalidVersion {tag} doesn't match any configured tag format") + return is_legit + + def is_ignored_tag(self, tag: str | GitTag) -> bool: + """True if a given tag can be ignored""" + tag = tag.name if isinstance(tag, GitTag) else tag + return any(regex.match(tag) for regex in self.ignored_regexes) + + def get_version_tags( + self, tags: Sequence[GitTag], warn: bool = False + ) -> Sequence[GitTag]: + """Filter in version tags and warn on unexpected tags""" + return [tag for tag in tags if self.is_version_tag(tag, warn)] + + def extract_version(self, tag: GitTag) -> Version: + """ + Extract a version from the tag as defined in tag formats. + + Raises `InvalidVersion` if the tag does not match any format. + """ + candidates = ( + m for regex in self.version_regexes if (m := regex.fullmatch(tag.name)) + ) + if not (m := next(candidates, None)): + raise InvalidVersion() + if "version" in m.groupdict(): + return self.scheme(m.group("version")) + + parts = m.groupdict() + version = parts["major"] + + if minor := parts.get("minor"): + version = f"{version}.{minor}" + if patch := parts.get("patch"): + version = f"{version}.{patch}" + + if parts.get("prerelease"): + version = f"{version}-{parts['prerelease']}" + if parts.get("devrelease"): + version = f"{version}{parts['devrelease']}" + return self.scheme(version) + + def include_in_changelog(self, tag: GitTag) -> bool: + """Check if a tag should be included in the changelog""" + try: + version = self.extract_version(tag) + except InvalidVersion: + return False + + if self.merge_prereleases and version.is_prerelease: + return False + + return True + + def search_version(self, text: str, last: bool = False) -> VersionTag | None: + """ + Search the first or last version tag occurrence in text. + + It searches for complete versions only (aka `major`, `minor` and `patch`) + """ + candidates = ( + m for regex in self.version_regexes if len(m := list(regex.finditer(text))) + ) + if not (matches := next(candidates, [])): + return None + + match = matches[-1 if last else 0] + + if "version" in match.groupdict(): + return VersionTag(match.group("version"), match.group(0)) + + parts = match.groupdict() + try: + version = f"{parts['major']}.{parts['minor']}.{parts['patch']}" + except KeyError: + return None + + if parts.get("prerelease"): + version = f"{version}-{parts['prerelease']}" + if parts.get("devrelease"): + version = f"{version}{parts['devrelease']}" + return VersionTag(version, match.group(0)) + + def normalize_tag( + self, version: Version | str, tag_format: str | None = None + ) -> str: + """ + The tag and the software version might be different. + + That's why this function exists. + + Example: + | tag | version (PEP 0440) | + | --- | ------- | + | v0.9.0 | 0.9.0 | + | ver1.0.0 | 1.0.0 | + | ver1.0.0.a0 | 1.0.0a0 | + """ + version = self.scheme(version) if isinstance(version, str) else version + tag_format = tag_format or self.tag_format + + major, minor, patch = version.release + prerelease = version.prerelease or "" + + t = Template(tag_format) + return t.safe_substitute( + version=version, + major=major, + minor=minor, + patch=patch, + prerelease=prerelease, + ) + + def find_tag_for( + self, tags: Sequence[GitTag], version: Version | str + ) -> GitTag | None: + """Find the first matching tag for a given version.""" + version = self.scheme(version) if isinstance(version, str) else version + possible_tags = [ + self.normalize_tag(version, f) + for f in (self.tag_format, *self.legacy_tag_formats) + ] + candidates = [t for t in tags if any(t.name == p for p in possible_tags)] + if len(candidates) > 1: + warnings.warn( + UserWarning( + f"Multiple tags found for version {version}: {', '.join(t.name for t in candidates)}" + ) + ) + return next(iter(candidates), None) + + @classmethod + def from_settings(cls, settings: Settings) -> Self: + """Extract tag rules from settings""" + return cls( + scheme=get_version_scheme(settings), + tag_format=settings["tag_format"], + legacy_tag_formats=settings["legacy_tag_formats"], + ignored_tag_formats=settings["ignored_tag_formats"], + merge_prereleases=settings["changelog_merge_prerelease"], + ) diff --git a/commitizen/version_schemes.py b/commitizen/version_schemes.py index 554864e3bf..2486be58c8 100644 --- a/commitizen/version_schemes.py +++ b/commitizen/version_schemes.py @@ -22,8 +22,7 @@ from packaging.version import InvalidVersion # noqa: F401: Rexpose the common exception from packaging.version import Version as _BaseVersion -from commitizen.config.base_config import BaseConfig -from commitizen.defaults import MAJOR, MINOR, PATCH +from commitizen.defaults import MAJOR, MINOR, PATCH, Settings from commitizen.exceptions import VersionSchemeUnknown if TYPE_CHECKING: @@ -42,7 +41,7 @@ Increment: TypeAlias = Literal["MAJOR", "MINOR", "PATCH"] Prerelease: TypeAlias = Literal["alpha", "beta", "rc"] -DEFAULT_VERSION_PARSER = r"v?(?P<version>([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?(\w+)?)" +DEFAULT_VERSION_PARSER = r"v?(?P<version>([0-9]+)\.([0-9]+)(?:\.([0-9]+))?(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z.]+)?(\w+)?)" @runtime_checkable @@ -408,14 +407,15 @@ def __str__(self) -> str: """All known registered version schemes""" -def get_version_scheme(config: BaseConfig, name: str | None = None) -> VersionScheme: +def get_version_scheme(settings: Settings, name: str | None = None) -> VersionScheme: """ Get the version scheme as defined in the configuration or from an overridden `name` :raises VersionSchemeUnknown: if the version scheme is not found. """ - deprecated_setting: str | None = config.settings.get("version_type") + # TODO: Remove the deprecated `version_type` handling + deprecated_setting: str | None = settings.get("version_type") if deprecated_setting: warnings.warn( DeprecationWarning( @@ -423,7 +423,7 @@ def get_version_scheme(config: BaseConfig, name: str | None = None) -> VersionSc "Please use `version_scheme` instead" ) ) - name = name or config.settings.get("version_scheme") or deprecated_setting + name = name or settings.get("version_scheme") or deprecated_setting if not name: return DEFAULT_SCHEME diff --git a/docs/config.md b/docs/config.md index 210b5d7ff8..5ec1894872 100644 --- a/docs/config.md +++ b/docs/config.md @@ -51,6 +51,26 @@ Default: `$version` Format for the git tag, useful for old projects, that use a convention like `"v1.2.1"`. [Read more][tag_format] +### `legacy_tag_formats` + +Type: `list` + +Default: `[ ]` + +Legacy git tag formats, useful for old projects that changed tag format. +Tags matching those formats will be recognized as version tags and be included in the changelog. +Each entry use the the syntax as [`tag_format`](#tag_format). [Read more][tag_format] + +### `ignored_tag_formats` + +Type: `list` + +Default: `[ ]` + +Tags matching those formats will be totally ignored and won't raise a warning. +Each entry use the the syntax as [`tag_format`](#tag_format) with the addition of `*` +that will match everything (non-greedy). [Read more][tag_format] + ### `update_changelog_on_bump` Type: `bool` diff --git a/docs/faq.md b/docs/faq.md index 4bcb2bc7cf..29d9f40512 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -107,3 +107,36 @@ If you would like to learn more about both schemes, there are plenty of good res [#173]: https://github.com/commitizen-tools/commitizen/issues/173 [#385]: https://github.com/commitizen-tools/commitizen/pull/385 + +## How to change the tag format ? + +You can use the [`legacy_tag_formats`](config.md#legacy_tag_formats) to list old tag formats. +New bumped tags will be in the new format but old ones will still work for: +- changelog generation (full, incremental and version range) +- bump new version computation (automatically guessed or increment given) + + +So given if you change from `myproject-$version` to `${version}` and then `v${version}`, +your commitizen configuration will look like this: + +```toml +tag_format = "v${version}" +legacy_tag_formats = [ + "${version}", + "myproject-$version", +] +``` + +## How to avoid warnings for expected non-version tags + +You can explicitly ignore them with [`ignored_tag_formats`](config.md#ignored_tag_formats). + +```toml +tag_format = "v${version}" +ignored_tag_formats = [ + "stable", + "component-*", + "env/*", + "v${major}.${minor}", +] +``` diff --git a/docs/tutorials/monorepo_guidance.md b/docs/tutorials/monorepo_guidance.md index ba6d70fd82..817f92321d 100644 --- a/docs/tutorials/monorepo_guidance.md +++ b/docs/tutorials/monorepo_guidance.md @@ -27,6 +27,7 @@ Sample `.cz.toml` for each component: name = "cz_customize" version = "0.0.0" tag_format = "${version}-library-b" # the component name can be a prefix or suffix with or without a separator +ignored_tag_formats = ["${version}-library-*"] # Avoid noise from other tags update_changelog_on_bump = true ``` @@ -36,6 +37,7 @@ update_changelog_on_bump = true name = "cz_customize" version = "0.0.0" tag_format = "${version}-library-z" +ignored_tag_formats = ["${version}-library-*"] # Avoid noise from other tags update_changelog_on_bump = true ``` diff --git a/docs/tutorials/tag_format.md b/docs/tutorials/tag_format.md new file mode 100644 index 0000000000..59c42bea13 --- /dev/null +++ b/docs/tutorials/tag_format.md @@ -0,0 +1,101 @@ +# Managing tag formats + +## Tag format and version scheme + +For most projects, the tag format is simply the version number which is set like this: + +```yaml +[tool.commitizen] +tag_format: $version +version_scheme: pep440 +``` + +As this is the default value so you don't have to specify it. + +This setting means that: + +- The tag generated on bump will have this format: `1.0.0` : + - the version is generated following PEP440 scheme + - the tag is exactly the generated version +- All tags having this format will be recognized as version tag when: + - searching the last while bumping a release + - searching previous versions while: + - generating incremental changelog + - generating a changelog for a version range +- The changelog versions (section titles) will have this format +- The `scm` version provider will identify the current version using this tag format + +The version format will change depending on your configured version scheme. +For most, it will only impact pre-releases and [developmental releases](dev_releases.md) formats (i.e. `1.0.0-rc.1` vs. `1.0.0.rc1`) + +But you may need a different tagging convention, let's say using `semver` and prefixed with a `v`. +In this case you will define your settings like this: + +```yaml +[tool.commitizen] +tag_format: v${version} +version_scheme: semver +``` + +As a result, the tag generated on bump will have this format: `v1.0.0` and the version will be generated following `semver` scheme. + +!!! note + Both `$version` and `${version}` syntaxes are strictly equivalent. You can use the one you prefer. + +See [the `version_scheme` section in `bump` command documentation](../commands/bump.md#version_scheme) for more details on version schemes and how to define your own. +See [`tag_format`](../config.md#tag_format) and [`version_scheme`](../config.md#version_scheme) settings in [Configuration reference](../config.md) for more details on these settings. + +## Changing convention + +Now, let's say you need to change the tag format for some reason (company convention, [migration to a monorepo](monorepo_guidance.md)...). +You will obviously want to keep all those features working as expected. + +Commitizen can deal with it as long as you provide the legacy tag format in the configuration. + +Using the previous example, let say you want to move from `v${version}` to `component-${version}`. +Then `component-${version}` will be the new tag format and `v${version}` the legacy one. + +```yaml +[tool.commitizen] +tag_format: component-${version} +legacy_tag_formats: + - v${version} +``` + +This way, you won't loose your version history, you'll still be able to generate you changelog properly +and on the next version bump, your last version in the form `v${version}` will be properly recognizef if you use the `scm` version provider. +Your new tag will be in the form `component-${version}`. + +## Known tags to ignore + +Now let's say you have some known tags you want to ignore, either because they are not versions, either because they are not versions of the component you are dealing with. +As a consequence, you don't want them to trigger a warning because Commitizen detected an unknown tag format: + +Then you can tell Commitizen about it using the [`ignored_tag_formats`](../config.md#ignored_tag_formats) setting: + +```yaml +[tool.commitizen] +ignored_tag_formats: + - prod + - other-component-${version} + - prefix-* +``` + +This will ignore: + +- The `prod` tag +- Any version tag prefixed with `other-component-` +- Any tag prefixed with `prefix-` + + +!!! tip + Note the `*` in the `prefix-*` pattern. This is a wildcard and only exists for `ignored_tag_formats`. + It will match any string from any length. This allows to exclude by prefix, whether it is followed by a version or not. + +!!! tip + If you don't want to be warned when Commitizen detect an unknown tag, you can by setting: + ``` + [tool.commitizen] + ignored_tag_formats = ["*"] + ``` + But be aware that you will not be warned if you have a typo in your tag formats. diff --git a/mkdocs.yml b/mkdocs.yml index f6a7eaa421..6a642161d2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -47,6 +47,7 @@ nav: - Customization: "customization.md" - Tutorials: - Writing commits: "tutorials/writing_commits.md" + - Managing tags formats: "tutorials/tag_format.md" - Auto check commits: "tutorials/auto_check.md" - Auto prepare commit message: "tutorials/auto_prepare_commit_message.md" - GitLab CI: "tutorials/gitlab_ci.md" diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index 52e2defde0..b5ff7e6edb 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -7,6 +7,7 @@ from textwrap import dedent from unittest.mock import MagicMock, call +import py import pytest from pytest_mock import MockFixture @@ -1627,3 +1628,31 @@ def test_bump_allow_no_commit_with_manual_version( cli.main() out, _ = capsys.readouterr() assert "bump: version 1.0.0 → 2.0.0" in out + + +def test_bump_detect_legacy_tags_from_scm( + tmp_commitizen_project: py.path.local, mocker: MockFixture +): + project_root = Path(tmp_commitizen_project) + tmp_commitizen_cfg_file = project_root / "pyproject.toml" + tmp_commitizen_cfg_file.write_text( + "\n".join( + [ + "[tool.commitizen]", + 'version_provider = "scm"', + 'tag_format = "v$version"', + "legacy_tag_formats = [", + ' "legacy-${version}"', + "]", + ] + ), + ) + create_file_and_commit("feat: new file") + create_tag("legacy-0.4.2") + create_file_and_commit("feat: new file") + + testargs = ["cz", "bump", "--increment", "patch", "--changelog"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + assert git.tag_exist("v0.4.3") diff --git a/tests/commands/test_changelog_command.py b/tests/commands/test_changelog_command.py index a6ff7db2d8..f794b8d9f3 100644 --- a/tests/commands/test_changelog_command.py +++ b/tests/commands/test_changelog_command.py @@ -8,6 +8,7 @@ from dateutil import relativedelta from jinja2 import FileSystemLoader from pytest_mock import MockFixture +from pytest_regressions.file_regression import FileRegressionFixture from commitizen import __file__ as commitizen_init from commitizen import cli, git @@ -954,8 +955,17 @@ def test_changelog_from_rev_latest_version_from_arg( @pytest.mark.usefixtures("tmp_commitizen_project") @pytest.mark.freeze_time("2022-02-13") -def test_changelog_from_rev_single_version_not_found( - mocker: MockFixture, config_path, changelog_path +@pytest.mark.parametrize( + "rev_range,tag", + ( + pytest.param("0.8.0", "0.2.0", id="single-not-found"), + pytest.param("0.1.0..0.3.0", "0.3.0", id="lower-bound-not-found"), + pytest.param("0.1.0..0.3.0", "0.1.0", id="upper-bound-not-found"), + pytest.param("0.3.0..0.4.0", "0.2.0", id="none-found"), + ), +) +def test_changelog_from_rev_range_not_found( + mocker: MockFixture, config_path, rev_range: str, tag: str ): """Provides an invalid revision ID to changelog command""" with open(config_path, "a", encoding="utf-8") as f: @@ -963,26 +973,46 @@ def test_changelog_from_rev_single_version_not_found( # create commit and tag create_file_and_commit("feat: new file") - testargs = ["cz", "bump", "--yes"] + create_tag(tag) + create_file_and_commit("feat: new file") + create_tag("1.0.0") + + testargs = ["cz", "changelog", rev_range] # it shouldn't exist mocker.patch.object(sys, "argv", testargs) - cli.main() + with pytest.raises(NoCommitsFoundError) as excinfo: + cli.main() - wait_for_tag() + assert "Could not find a valid revision" in str(excinfo) - create_file_and_commit("feat: after 0.2.0") - create_file_and_commit("feat: another feature") - testargs = ["cz", "bump", "--yes"] - mocker.patch.object(sys, "argv", testargs) - cli.main() - wait_for_tag() +@pytest.mark.usefixtures("tmp_commitizen_project") +@pytest.mark.freeze_time("2022-02-13") +def test_changelog_multiple_matching_tags( + mocker: MockFixture, config_path, changelog_path +): + with open(config_path, "a", encoding="utf-8") as f: + f.write('tag_format = "new-$version"\nlegacy_tag_formats = ["legacy-$version"]') + + create_file_and_commit("feat: new file") + create_tag("legacy-1.0.0") + create_file_and_commit("feat: new file") + create_tag("legacy-2.0.0") + create_tag("new-2.0.0") - testargs = ["cz", "changelog", "0.8.0"] # it shouldn't exist + testargs = ["cz", "changelog", "1.0.0..2.0.0"] # it shouldn't exist mocker.patch.object(sys, "argv", testargs) - with pytest.raises(NoCommitsFoundError) as excinfo: + with pytest.warns() as warnings: cli.main() - assert "Could not find a valid revision" in str(excinfo) + assert len(warnings) == 1 + warning = warnings[0] + assert "Multiple tags found for version 2.0.0" in str(warning.message) + + with open(changelog_path) as f: + out = f.read() + + # Ensure only one tag is rendered + assert out.count("2.0.0") == 1 @pytest.mark.usefixtures("tmp_commitizen_project") @@ -1016,34 +1046,6 @@ def test_changelog_from_rev_range_default_tag_format( assert "new file" not in out -@pytest.mark.usefixtures("tmp_commitizen_project") -@pytest.mark.freeze_time("2022-02-13") -def test_changelog_from_rev_range_version_not_found(mocker: MockFixture, config_path): - """Provides an invalid end revision ID to changelog command""" - with open(config_path, "a", encoding="utf-8") as f: - f.write('tag_format = "$version"\n') - - # create commit and tag - create_file_and_commit("feat: new file") - testargs = ["cz", "bump", "--yes"] - mocker.patch.object(sys, "argv", testargs) - cli.main() - - create_file_and_commit("feat: after 0.2.0") - create_file_and_commit("feat: another feature") - - testargs = ["cz", "bump", "--yes"] - mocker.patch.object(sys, "argv", testargs) - cli.main() - - testargs = ["cz", "changelog", "0.5.0..0.8.0"] # it shouldn't exist - mocker.patch.object(sys, "argv", testargs) - with pytest.raises(NoCommitsFoundError) as excinfo: - cli.main() - - assert "Could not find a valid revision" in str(excinfo) - - @pytest.mark.usefixtures("tmp_commitizen_project") @pytest.mark.freeze_time("2022-02-13") def test_changelog_from_rev_version_range_including_first_tag( @@ -1116,6 +1118,41 @@ def test_changelog_from_rev_version_range_from_arg( file_regression.check(out, extension=".md") +@pytest.mark.usefixtures("tmp_commitizen_project") +@pytest.mark.freeze_time("2022-02-13") +def test_changelog_from_rev_version_range_with_legacy_tags( + mocker: MockFixture, config_path, changelog_path, file_regression +): + mocker.patch("commitizen.git.GitTag.date", "2022-02-13") + + changelog = Path(changelog_path) + Path(config_path).write_text( + "\n".join( + [ + "[tool.commitizen]", + 'version_provider = "scm"', + 'tag_format = "v$version"', + "legacy_tag_formats = [", + ' "legacy-${version}",', + ' "old-${version}",', + "]", + ] + ), + ) + + create_file_and_commit("feat: new file") + create_tag("old-0.2.0") + create_file_and_commit("feat: new file") + create_tag("legacy-0.3.0") + create_file_and_commit("feat: new file") + create_tag("legacy-0.4.0") + + testargs = ["cz", "changelog", "0.2.0..0.4.0"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + file_regression.check(changelog.read_text(), extension=".md") + + @pytest.mark.usefixtures("tmp_commitizen_project") @pytest.mark.freeze_time("2022-02-13") def test_changelog_from_rev_version_with_big_range_from_arg( @@ -1639,6 +1676,127 @@ def test_changelog_only_tag_matching_tag_format_included_suffix_sep( assert "## 0.2.0 (2021-06-11)" not in out +@pytest.mark.usefixtures("tmp_commitizen_project") +def test_changelog_legacy_tags( + mocker: MockFixture, + changelog_path: Path, + config_path: Path, +): + with open(config_path, "a", encoding="utf-8") as f: + f.writelines( + [ + 'tag_format = "v${version}"\n', + "legacy_tag_formats = [\n", + ' "older-${version}",\n', + ' "oldest-${version}",\n', + "]\n", + ] + ) + create_file_and_commit("feat: new file") + git.tag("oldest-0.1.0") + create_file_and_commit("feat: new file") + git.tag("older-0.2.0") + create_file_and_commit("feat: another new file") + git.tag("v0.3.0") + create_file_and_commit("feat: another new file") + git.tag("not-0.3.1") + testargs = ["cz", "bump", "--changelog", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + out = open(changelog_path).read() + assert "## v0.3.0" in out + assert "## older-0.2.0" in out + assert "## oldest-0.1.0" in out + assert "## v0.3.0" in out + assert "## not-0.3.1" not in out + + +@pytest.mark.usefixtures("tmp_commitizen_project") +@pytest.mark.freeze_time("2024-11-18") +def test_changelog_incremental_change_tag_format( + mocker: MockFixture, + changelog_path: Path, + config_path: Path, + file_regression: FileRegressionFixture, +): + mocker.patch("commitizen.git.GitTag.date", "2024-11-18") + config = Path(config_path) + base_config = config.read_text() + config.write_text( + "\n".join( + ( + base_config, + 'tag_format = "older-${version}"', + ) + ) + ) + create_file_and_commit("feat: new file") + git.tag("older-0.1.0") + create_file_and_commit("feat: new file") + git.tag("older-0.2.0") + mocker.patch.object(sys, "argv", ["cz", "changelog"]) + cli.main() + + config.write_text( + "\n".join( + ( + base_config, + 'tag_format = "v${version}"', + 'legacy_tag_formats = ["older-${version}"]', + ) + ) + ) + create_file_and_commit("feat: another new file") + git.tag("v0.3.0") + mocker.patch.object(sys, "argv", ["cz", "changelog", "--incremental"]) + cli.main() + out = open(changelog_path).read() + assert "## v0.3.0" in out + assert "## older-0.2.0" in out + assert "## older-0.1.0" in out + file_regression.check(out, extension=".md") + + +@pytest.mark.usefixtures("tmp_commitizen_project") +def test_changelog_ignored_tags( + mocker: MockFixture, + changelog_path: Path, + config_path: Path, + capsys: pytest.CaptureFixture, +): + with open(config_path, "a", encoding="utf-8") as f: + f.writelines( + [ + 'tag_format = "v${version}"\n', + "ignored_tag_formats = [\n", + ' "ignored",\n', + ' "ignore-${version}",\n', + "]\n", + ] + ) + create_file_and_commit("feat: new file") + git.tag("ignore-0.1.0") + create_file_and_commit("feat: new file") + git.tag("ignored") + create_file_and_commit("feat: another new file") + git.tag("v0.3.0") + create_file_and_commit("feat: another new file") + git.tag("not-ignored") + testargs = ["cz", "bump", "--changelog", "--yes"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + out = open(changelog_path).read() + _, err = capsys.readouterr() + assert "## ignore-0.1.0" not in out + assert "InvalidVersion ignore-0.1.0" not in err + assert "## ignored" not in out + assert "InvalidVersion ignored" not in err + assert "## not-ignored" not in out + assert "InvalidVersion not-ignored" in err + assert "## v0.3.0" in out + assert "InvalidVersion v0.3.0" not in err + + def test_changelog_template_extra_quotes( mocker: MockFixture, tmp_commitizen_project: Path, diff --git a/tests/commands/test_changelog_command/test_changelog_from_rev_version_range_with_legacy_tags.md b/tests/commands/test_changelog_command/test_changelog_from_rev_version_range_with_legacy_tags.md new file mode 100644 index 0000000000..5d37333aa5 --- /dev/null +++ b/tests/commands/test_changelog_command/test_changelog_from_rev_version_range_with_legacy_tags.md @@ -0,0 +1,17 @@ +## legacy-0.4.0 (2022-02-13) + +### Feat + +- new file + +## legacy-0.3.0 (2022-02-13) + +### Feat + +- new file + +## old-0.2.0 (2022-02-13) + +### Feat + +- new file diff --git a/tests/commands/test_changelog_command/test_changelog_incremental_change_tag_format.md b/tests/commands/test_changelog_command/test_changelog_incremental_change_tag_format.md new file mode 100644 index 0000000000..2f0cc2909e --- /dev/null +++ b/tests/commands/test_changelog_command/test_changelog_incremental_change_tag_format.md @@ -0,0 +1,17 @@ +## v0.3.0 (2024-11-18) + +### Feat + +- another new file + +## older-0.2.0 (2024-11-18) + +### Feat + +- new file + +## older-0.1.0 (2024-11-18) + +### Feat + +- new file diff --git a/tests/providers/test_scm_provider.py b/tests/providers/test_scm_provider.py index 01e7ab9943..9d955b2323 100644 --- a/tests/providers/test_scm_provider.py +++ b/tests/providers/test_scm_provider.py @@ -113,3 +113,26 @@ def test_scm_provider_default_with_commits_and_tags(config: BaseConfig): merge_branch("master") assert provider.get_version() == "1.1.0rc0" + + +@pytest.mark.usefixtures("tmp_git_project") +def test_scm_provider_detect_legacy_tags(config: BaseConfig): + config.settings["version_provider"] = "scm" + config.settings["tag_format"] = "v${version}" + config.settings["legacy_tag_formats"] = [ + "legacy-${version}", + "old-${version}", + ] + provider = get_provider(config) + + create_file_and_commit("test: fake commit") + create_tag("old-0.4.1") + assert provider.get_version() == "0.4.1" + + create_file_and_commit("test: fake commit") + create_tag("legacy-0.4.2") + assert provider.get_version() == "0.4.2" + + create_file_and_commit("test: fake commit") + create_tag("v0.5.0") + assert provider.get_version() == "0.5.0" diff --git a/tests/test_bump_normalize_tag.py b/tests/test_bump_normalize_tag.py index c1eb696afd..895acbd71a 100644 --- a/tests/test_bump_normalize_tag.py +++ b/tests/test_bump_normalize_tag.py @@ -1,6 +1,6 @@ import pytest -from commitizen import bump +from commitizen.tags import TagRules conversion = [ (("1.2.3", "v$version"), "v1.2.3"), @@ -18,5 +18,6 @@ @pytest.mark.parametrize("test_input,expected", conversion) def test_create_tag(test_input, expected): version, format = test_input - new_tag = bump.normalize_tag(version, format) + rules = TagRules() + new_tag = rules.normalize_tag(version, format) assert new_tag == expected diff --git a/tests/test_changelog.py b/tests/test_changelog.py index 76ee80600b..accbf5d33c 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -1,4 +1,5 @@ import re +from dataclasses import dataclass from pathlib import Path from typing import Optional @@ -11,6 +12,7 @@ ConventionalCommitsCz, ) from commitizen.exceptions import InvalidConfigurationError +from commitizen.version_schemes import Pep440 COMMITS_DATA = [ { @@ -522,12 +524,14 @@ def test_get_commit_tag_is_None(gitcommits, tags): @pytest.mark.parametrize("test_input", TAGS) def test_valid_tag_included_in_changelog(test_input): tag = git.GitTag(*test_input) - assert changelog.tag_included_in_changelog(tag, [], False) + rules = changelog.TagRules() + assert rules.include_in_changelog(tag) def test_invalid_tag_included_in_changelog(): tag = git.GitTag("not_a_version", "rev", "date") - assert not changelog.tag_included_in_changelog(tag, [], False) + rules = changelog.TagRules() + assert not rules.include_in_changelog(tag) COMMITS_TREE = ( @@ -1080,8 +1084,11 @@ def test_invalid_tag_included_in_changelog(): def test_generate_tree_from_commits(gitcommits, tags, merge_prereleases): parser = ConventionalCommitsCz.commit_parser changelog_pattern = ConventionalCommitsCz.bump_pattern + rules = changelog.TagRules( + merge_prereleases=merge_prereleases, + ) tree = changelog.generate_tree_from_commits( - gitcommits, tags, parser, changelog_pattern, merge_prerelease=merge_prereleases + gitcommits, tags, parser, changelog_pattern, rules=rules ) expected = ( COMMITS_TREE_AFTER_MERGED_PRERELEASES if merge_prereleases else COMMITS_TREE @@ -1451,3 +1458,105 @@ def test_get_smart_tag_range_returns_an_extra_for_a_single_tag(tags): start = tags[0] # len here is 1, but we expect one more tag as designed res = changelog.get_smart_tag_range(tags, start.name) assert 2 == len(res) + + +@dataclass +class TagDef: + name: str + is_version: bool + is_legacy: bool + is_ignored: bool + + +TAGS_PARAMS = ( + pytest.param(TagDef("1.2.3", True, False, False), id="version"), + # We test with `v-` prefix as `v` prefix is a special case kept for backward compatibility + pytest.param(TagDef("v-1.2.3", False, True, False), id="v-prefix"), + pytest.param(TagDef("project-1.2.3", False, True, False), id="project-prefix"), + pytest.param(TagDef("ignored", False, False, True), id="ignored"), + pytest.param(TagDef("unknown", False, False, False), id="unknown"), +) + + +@pytest.mark.parametrize("tag", TAGS_PARAMS) +def test_tag_rules_tag_format_only(tag: TagDef): + rules = changelog.TagRules(Pep440, "$version") + assert rules.is_version_tag(tag.name) is tag.is_version + + +@pytest.mark.parametrize("tag", TAGS_PARAMS) +def test_tag_rules_with_legacy_tags(tag: TagDef): + rules = changelog.TagRules( + scheme=Pep440, + tag_format="$version", + legacy_tag_formats=["v-$version", "project-${version}"], + ) + assert rules.is_version_tag(tag.name) is tag.is_version or tag.is_legacy + + +@pytest.mark.parametrize("tag", TAGS_PARAMS) +def test_tag_rules_with_ignored_tags(tag: TagDef): + rules = changelog.TagRules( + scheme=Pep440, tag_format="$version", ignored_tag_formats=["ignored"] + ) + assert rules.is_ignored_tag(tag.name) is tag.is_ignored + + +def test_tags_rules_get_version_tags(capsys: pytest.CaptureFixture): + tags = [ + git.GitTag("v1.1.0", "17efb44d2cd16f6621413691a543e467c7d2dda6", "2019-04-14"), + git.GitTag("v1.0.0", "aa44a92d68014d0da98965c0c2cb8c07957d4362", "2019-03-01"), + git.GitTag("1.0.0b2", "aab33d13110f26604fb786878856ec0b9e5fc32b", "2019-01-18"), + git.GitTag( + "project-not-a-version", + "7c7e96b723c2aaa1aec3a52561f680adf0b60e97", + "2019-01-17", + ), + git.GitTag( + "not-a-version", "c52eca6f74f844ab3ffbde61d98ef96071e132b7", "2018-12-17" + ), + git.GitTag( + "star-something", "c52eca6f74f844ab3ffbde61d98fe96071e132b2", "2018-11-12" + ), + git.GitTag("known", "b3f89892222340150e32631ae6b7aab65230036f", "2018-09-22"), + git.GitTag( + "ignored-0.9.3", "684e0259cc95c7c5e94854608cd3dcebbd53219e", "2018-09-22" + ), + git.GitTag( + "project-0.9.3", "dacc86159b260ee98eb5f57941c99ba731a01399", "2018-07-28" + ), + git.GitTag( + "anything-0.9", "5141f54503d2e1cf39bd666c0ca5ab5eb78772ab", "2018-01-10" + ), + git.GitTag( + "project-0.9.2", "1541f54503d2e1cf39bd777c0ca5ab5eb78772ba", "2017-11-11" + ), + git.GitTag( + "ignored-0.9.1", "46e9032e18a819e466618c7a014bcb0e9981af9e", "2017-11-11" + ), + ] + + rules = changelog.TagRules( + scheme=Pep440, + tag_format="v$version", + legacy_tag_formats=["$version", "project-${version}"], + ignored_tag_formats=[ + "known", + "ignored-${version}", + "star-*", + "*-${major}.${minor}", + ], + ) + + version_tags = rules.get_version_tags(tags, warn=True) + assert {t.name for t in version_tags} == { + "v1.1.0", + "v1.0.0", + "1.0.0b2", + "project-0.9.3", + "project-0.9.2", + } + + captured = capsys.readouterr() + assert captured.err.count("InvalidVersion") == 2 + assert captured.err.count("not-a-version") == 2 diff --git a/tests/test_changelog_format_asciidoc.py b/tests/test_changelog_format_asciidoc.py index 0c5930df46..59ca56191e 100644 --- a/tests/test_changelog_format_asciidoc.py +++ b/tests/test_changelog_format_asciidoc.py @@ -55,6 +55,7 @@ """ EXPECTED_C = Metadata( latest_version="1.0.0", + latest_version_tag="v1.0.0", latest_version_position=3, unreleased_end=3, unreleased_start=1, @@ -105,20 +106,21 @@ def format(config: BaseConfig) -> AsciiDoc: @pytest.fixture def format_with_tags(config: BaseConfig, request) -> AsciiDoc: config.settings["tag_format"] = request.param + config.settings["legacy_tag_formats"] = ["legacy-${version}"] return AsciiDoc(config) VERSIONS_EXAMPLES = [ - ("== [1.0.0] - 2017-06-20", "1.0.0"), + ("== [1.0.0] - 2017-06-20", ("1.0.0", "1.0.0")), ( "= https://github.com/angular/angular/compare/10.0.0-next.2...10.0.0-next.3[10.0.0-next.3] (2020-04-22)", - "10.0.0-next.3", + ("10.0.0-next.3", "10.0.0-next.3"), ), - ("=== 0.19.1 (Jan 7, 2020)", "0.19.1"), - ("== 1.0.0", "1.0.0"), - ("== v1.0.0", "1.0.0"), - ("== v1.0.0 - (2012-24-32)", "1.0.0"), - ("= version 2020.03.24", "2020.03.24"), + ("=== 0.19.1 (Jan 7, 2020)", ("0.19.1", "0.19.1")), + ("== 1.0.0", ("1.0.0", "1.0.0")), + ("== v1.0.0", ("1.0.0", "v1.0.0")), + ("== v1.0.0 - (2012-24-32)", ("1.0.0", "v1.0.0")), + ("= version 2020.03.24", ("2020.03.24", "2020.03.24")), ("== [Unreleased]", None), ("All notable changes to this project will be documented in this file.", None), ("= Changelog", None), @@ -128,7 +130,7 @@ def format_with_tags(config: BaseConfig, request) -> AsciiDoc: @pytest.mark.parametrize("line_from_changelog,output_version", VERSIONS_EXAMPLES) def test_changelog_detect_version( - line_from_changelog: str, output_version: str, format: AsciiDoc + line_from_changelog: str, output_version: tuple[str, str] | None, format: AsciiDoc ): version = format.parse_version_from_title(line_from_changelog) assert version == output_version @@ -186,6 +188,7 @@ def test_get_matadata( "1-0-0-a1.dev1-example", "1.0.0-a1.dev1", ), + pytest.param("new-${version}", "legacy-1.0.0", "1.0.0"), ), indirect=["format_with_tags"], ) diff --git a/tests/test_changelog_format_markdown.py b/tests/test_changelog_format_markdown.py index 52612b8e2b..e1f0d67311 100644 --- a/tests/test_changelog_format_markdown.py +++ b/tests/test_changelog_format_markdown.py @@ -55,6 +55,7 @@ """ EXPECTED_C = Metadata( latest_version="1.0.0", + latest_version_tag="v1.0.0", latest_version_position=3, unreleased_end=3, unreleased_start=1, @@ -105,20 +106,21 @@ def format(config: BaseConfig) -> Markdown: @pytest.fixture def format_with_tags(config: BaseConfig, request) -> Markdown: config.settings["tag_format"] = request.param + config.settings["legacy_tag_formats"] = ["legacy-${version}"] return Markdown(config) VERSIONS_EXAMPLES = [ - ("## [1.0.0] - 2017-06-20", "1.0.0"), + ("## [1.0.0] - 2017-06-20", ("1.0.0", "1.0.0")), ( "# [10.0.0-next.3](https://github.com/angular/angular/compare/10.0.0-next.2...10.0.0-next.3) (2020-04-22)", - "10.0.0-next.3", + ("10.0.0-next.3", "10.0.0-next.3"), ), - ("### 0.19.1 (Jan 7, 2020)", "0.19.1"), - ("## 1.0.0", "1.0.0"), - ("## v1.0.0", "1.0.0"), - ("## v1.0.0 - (2012-24-32)", "1.0.0"), - ("# version 2020.03.24", "2020.03.24"), + ("### 0.19.1 (Jan 7, 2020)", ("0.19.1", "0.19.1")), + ("## 1.0.0", ("1.0.0", "1.0.0")), + ("## v1.0.0", ("1.0.0", "v1.0.0")), + ("## v1.0.0 - (2012-24-32)", ("1.0.0", "v1.0.0")), + ("# version 2020.03.24", ("2020.03.24", "2020.03.24")), ("## [Unreleased]", None), ("All notable changes to this project will be documented in this file.", None), ("# Changelog", None), @@ -128,7 +130,7 @@ def format_with_tags(config: BaseConfig, request) -> Markdown: @pytest.mark.parametrize("line_from_changelog,output_version", VERSIONS_EXAMPLES) def test_changelog_detect_version( - line_from_changelog: str, output_version: str, format: Markdown + line_from_changelog: str, output_version: tuple[str, str] | None, format: Markdown ): version = format.parse_version_from_title(line_from_changelog) assert version == output_version @@ -191,6 +193,7 @@ def test_get_matadata( "1-0-0-a1.dev1-example", "1.0.0-a1.dev1", ), + pytest.param("new-${version}", "legacy-1.0.0", "1.0.0"), ), indirect=["format_with_tags"], ) diff --git a/tests/test_changelog_format_restructuredtext.py b/tests/test_changelog_format_restructuredtext.py index 11356ae28f..74b6b736f9 100644 --- a/tests/test_changelog_format_restructuredtext.py +++ b/tests/test_changelog_format_restructuredtext.py @@ -22,6 +22,7 @@ def case( content: str, latest_version: str | None = None, latest_version_position: int | None = None, + latest_version_tag: str | None = None, unreleased_start: int | None = None, unreleased_end: int | None = None, ): @@ -30,6 +31,7 @@ def case( dedent(content).strip(), Metadata( latest_version=latest_version, + latest_version_tag=latest_version_tag, latest_version_position=latest_version_position, unreleased_start=unreleased_start, unreleased_end=unreleased_end, @@ -93,6 +95,7 @@ def case( ====== """, latest_version="1.0.0", + latest_version_tag="v1.0.0", latest_version_position=3, unreleased_start=0, unreleased_end=3, @@ -303,6 +306,7 @@ def format(config: BaseConfig) -> RestructuredText: @pytest.fixture def format_with_tags(config: BaseConfig, request) -> RestructuredText: config.settings["tag_format"] = request.param + config.settings["legacy_tag_formats"] = ["legacy-${version}"] return RestructuredText(config) @@ -357,6 +361,7 @@ def test_is_overlined_title(format: RestructuredText, text: str, expected: bool) "1-0-0-a1.dev1-example", "1.0.0-a1.dev1", ), + pytest.param("new-${version}", "legacy-1.0.0", "1.0.0"), ), indirect=["format_with_tags"], ) diff --git a/tests/test_changelog_format_textile.py b/tests/test_changelog_format_textile.py index 3fac5c1756..eb03484ad5 100644 --- a/tests/test_changelog_format_textile.py +++ b/tests/test_changelog_format_textile.py @@ -55,6 +55,7 @@ """ EXPECTED_C = Metadata( latest_version="1.0.0", + latest_version_tag="v1.0.0", latest_version_position=3, unreleased_end=3, unreleased_start=1, @@ -98,20 +99,21 @@ def format(config: BaseConfig) -> Textile: @pytest.fixture def format_with_tags(config: BaseConfig, request) -> Textile: config.settings["tag_format"] = request.param + config.settings["legacy_tag_formats"] = ["legacy-${version}"] return Textile(config) VERSIONS_EXAMPLES = [ - ("h2. [1.0.0] - 2017-06-20", "1.0.0"), + ("h2. [1.0.0] - 2017-06-20", ("1.0.0", "1.0.0")), ( 'h1. "10.0.0-next.3":https://github.com/angular/angular/compare/10.0.0-next.2...10.0.0-next.3 (2020-04-22)', - "10.0.0-next.3", + ("10.0.0-next.3", "10.0.0-next.3"), ), - ("h3. 0.19.1 (Jan 7, 2020)", "0.19.1"), - ("h2. 1.0.0", "1.0.0"), - ("h2. v1.0.0", "1.0.0"), - ("h2. v1.0.0 - (2012-24-32)", "1.0.0"), - ("h1. version 2020.03.24", "2020.03.24"), + ("h3. 0.19.1 (Jan 7, 2020)", ("0.19.1", "0.19.1")), + ("h2. 1.0.0", ("1.0.0", "1.0.0")), + ("h2. v1.0.0", ("1.0.0", "v1.0.0")), + ("h2. v1.0.0 - (2012-24-32)", ("1.0.0", "v1.0.0")), + ("h1. version 2020.03.24", ("2020.03.24", "2020.03.24")), ("h2. [Unreleased]", None), ("All notable changes to this project will be documented in this file.", None), ("h1. Changelog", None), @@ -121,7 +123,7 @@ def format_with_tags(config: BaseConfig, request) -> Textile: @pytest.mark.parametrize("line_from_changelog,output_version", VERSIONS_EXAMPLES) def test_changelog_detect_version( - line_from_changelog: str, output_version: str, format: Textile + line_from_changelog: str, output_version: tuple[str, str] | None, format: Textile ): version = format.parse_version_from_title(line_from_changelog) assert version == output_version @@ -179,6 +181,7 @@ def test_get_matadata( "1-0-0-a1.dev1-example", "1.0.0-a1.dev1", ), + pytest.param("new-${version}", "legacy-1.0.0", "1.0.0"), ), indirect=["format_with_tags"], ) diff --git a/tests/test_conf.py b/tests/test_conf.py index 3e0a44c7dd..80d58983e7 100644 --- a/tests/test_conf.py +++ b/tests/test_conf.py @@ -72,6 +72,8 @@ "version_provider": "commitizen", "version_scheme": None, "tag_format": "$version", + "legacy_tag_formats": [], + "ignored_tag_formats": [], "bump_message": None, "retry_after_failure": False, "allow_abort": False, @@ -101,6 +103,8 @@ "version_provider": "commitizen", "version_scheme": None, "tag_format": "$version", + "legacy_tag_formats": [], + "ignored_tag_formats": [], "bump_message": None, "retry_after_failure": False, "allow_abort": False, diff --git a/tests/test_version_schemes.py b/tests/test_version_schemes.py index 686c0bfde1..8e2dae9027 100644 --- a/tests/test_version_schemes.py +++ b/tests/test_version_schemes.py @@ -16,31 +16,31 @@ def test_default_version_scheme_is_pep440(config: BaseConfig): - scheme = get_version_scheme(config) + scheme = get_version_scheme(config.settings) assert scheme is Pep440 def test_version_scheme_from_config(config: BaseConfig): config.settings["version_scheme"] = "semver" - scheme = get_version_scheme(config) + scheme = get_version_scheme(config.settings) assert scheme is SemVer def test_version_scheme_from_name(config: BaseConfig): config.settings["version_scheme"] = "pep440" - scheme = get_version_scheme(config, "semver") + scheme = get_version_scheme(config.settings, "semver") assert scheme is SemVer def test_raise_for_unknown_version_scheme(config: BaseConfig): with pytest.raises(VersionSchemeUnknown): - get_version_scheme(config, "unknown") + get_version_scheme(config.settings, "unknown") def test_version_scheme_from_deprecated_config(config: BaseConfig): config.settings["version_type"] = "semver" with pytest.warns(DeprecationWarning): - scheme = get_version_scheme(config) + scheme = get_version_scheme(config.settings) assert scheme is SemVer @@ -48,7 +48,7 @@ def test_version_scheme_from_config_priority(config: BaseConfig): config.settings["version_scheme"] = "pep440" config.settings["version_type"] = "semver" with pytest.warns(DeprecationWarning): - scheme = get_version_scheme(config) + scheme = get_version_scheme(config.settings) assert scheme is Pep440 @@ -63,4 +63,4 @@ class NotVersionProtocol: mocker.patch.object(metadata, "entry_points", return_value=(ep,)) with pytest.warns(match="VersionProtocol"): - get_version_scheme(config, "any") + get_version_scheme(config.settings, "any") From 9aae58e56cf24b6f5e43250d818edd564de072dc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Sun, 2 Mar 2025 15:26:50 +0000 Subject: [PATCH 072/159] =?UTF-8?q?bump:=20version=204.3.0=20=E2=86=92=204?= =?UTF-8?q?.4.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 10 ++++++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd16cc9cc4..c8861315d4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.3.0 # automatically updated by Commitizen + rev: v4.4.0 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index fa7409d227..30d2b76595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v4.4.0 (2025-03-02) + +### Feat + +- **tags**: adds `legacy_tag_formats` and `ignored_tag_formats` settings + +### Refactor + +- **get_tag_regexes**: dedup tag regexes definition + ## v4.3.0 (2025-02-28) ### Feat diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 111dc9172a..ecdb1cef9e 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.3.0" +__version__ = "4.4.0" diff --git a/pyproject.toml b/pyproject.toml index 0c03a6d508..570eabd3a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.3.0" +version = "4.4.0" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -87,7 +87,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.3.0" +version = "4.4.0" tag_format = "v$version" version_files = [ "pyproject.toml:version", From bc8479e7aa1a5b9d2f491b79e3a4d4015519903c Mon Sep 17 00:00:00 2001 From: Wei Lee <weilee.rx@gmail.com> Date: Sun, 2 Mar 2025 23:27:56 +0800 Subject: [PATCH 073/159] docs(config): add uv provider description (#1362) --- docs/config.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/config.md b/docs/config.md index 5ec1894872..3d53249585 100644 --- a/docs/config.md +++ b/docs/config.md @@ -352,6 +352,7 @@ Commitizen provides some version providers for some well known formats: | `scm` | Fetch the version from git and does not need to set it back | | `pep621` | Get and set version from `pyproject.toml` `project.version` field | | `poetry` | Get and set version from `pyproject.toml` `tool.poetry.version` field | +| `uv` | Get and set version from `pyproject.toml` `project.version` field and `uv.lock` `pacakge.version` field whose `package.name` field is the same as `pyproject.toml` `project.name` field | | `cargo` | Get and set version from `Cargo.toml` `project.version` field | | `npm` | Get and set version from `package.json` `version` field, `package-lock.json` `version,packages.''.version` fields if the file exists, and `npm-shrinkwrap.json` `version,packages.''.version` fields if the file exists | | `composer` | Get and set version from `composer.json` `project.version` field | From 79dd19dc132de2fae6d3f07e4f17383bac6b99e8 Mon Sep 17 00:00:00 2001 From: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> Date: Sun, 2 Mar 2025 17:28:31 +0100 Subject: [PATCH 074/159] fix(tags): fixes ImportError on Python >=3.11 (#1363) (#1364) --- commitizen/tags.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/commitizen/tags.py b/commitizen/tags.py index 962e428ef2..915dd3120c 100644 --- a/commitizen/tags.py +++ b/commitizen/tags.py @@ -8,8 +8,6 @@ from string import Template from typing import TYPE_CHECKING, NamedTuple -from typing_extensions import Self - from commitizen import out from commitizen.defaults import DEFAULT_SETTINGS, Settings, get_tag_regexes from commitizen.git import GitTag @@ -22,8 +20,16 @@ ) if TYPE_CHECKING: + import sys + from commitizen.version_schemes import VersionScheme + # Self is Python 3.11+ but backported in typing-extensions + if sys.version_info < (3, 11): + from typing_extensions import Self + else: + from typing import Self + class VersionTag(NamedTuple): """Represent a version and its matching tag form.""" From b494c556437473519f8ab69020c7256ba84714c1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Sun, 2 Mar 2025 16:28:55 +0000 Subject: [PATCH 075/159] =?UTF-8?q?bump:=20version=204.4.0=20=E2=86=92=204?= =?UTF-8?q?.4.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c8861315d4..86997bc3ad 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.4.0 # automatically updated by Commitizen + rev: v4.4.1 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 30d2b76595..8fc88ad695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.4.1 (2025-03-02) + +### Fix + +- **tags**: fixes ImportError on Python >=3.11 (#1363) (#1364) + ## v4.4.0 (2025-03-02) ### Feat diff --git a/commitizen/__version__.py b/commitizen/__version__.py index ecdb1cef9e..9905939ff6 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.4.0" +__version__ = "4.4.1" diff --git a/pyproject.toml b/pyproject.toml index 570eabd3a6..314ddd925c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.4.0" +version = "4.4.1" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -87,7 +87,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.4.0" +version = "4.4.1" tag_format = "v$version" version_files = [ "pyproject.toml:version", From a202e661bacf9643373255965f34bbdb382cb299 Mon Sep 17 00:00:00 2001 From: "Axel H." <noirbizarre@gmail.com> Date: Sun, 2 Mar 2025 17:35:30 +0100 Subject: [PATCH 076/159] ci(pre-commit): update `pre-commit` hooks to latest version and fix detected errors --- .pre-commit-config.yaml | 6 +++--- commitizen/tags.py | 20 +++++++++++--------- docs/config.md | 19 +++++++++---------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86997bc3ad..bb1beaefcb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-vcs-permalinks - id: end-of-file-fixer @@ -30,13 +30,13 @@ repos: - id: detect-private-key - repo: https://github.com/asottile/blacken-docs - rev: 1.13.0 + rev: 1.19.1 hooks: - id: blacken-docs additional_dependencies: [ black~=23.11 ] - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.4.1 hooks: - id: codespell name: Run codespell to check for common misspellings in files diff --git a/commitizen/tags.py b/commitizen/tags.py index 915dd3120c..aa11cb7a9c 100644 --- a/commitizen/tags.py +++ b/commitizen/tags.py @@ -55,28 +55,30 @@ class TagRules: Example: - ```py + ```python settings = DEFAULT_SETTINGS.clone() - settings.update({ - "tag_format": "v{version}" - "legacy_tag_formats": ["version{version}", "ver{version}"], - "ignored_tag_formats": ["ignored{version}"], - }) + settings.update( + { + "tag_format": "v{version}", + "legacy_tag_formats": ["version{version}", "ver{version}"], + "ignored_tag_formats": ["ignored{version}"], + } + ) rules = TagRules.from_settings(settings) assert rules.is_version_tag("v1.0.0") assert rules.is_version_tag("version1.0.0") assert rules.is_version_tag("ver1.0.0") - assert not rules.is_version_tag("ignored1.0.0", warn=True) # Does not warn - assert not rules.is_version_tag("warn1.0.0", warn=True) # Does warn + assert not rules.is_version_tag("ignored1.0.0", warn=True) # Does not warn + assert not rules.is_version_tag("warn1.0.0", warn=True) # Does warn assert rules.search_version("# My v1.0.0 version").version == "1.0.0" assert rules.extract_version("v1.0.0") == Version("1.0.0") try: assert rules.extract_version("not-a-v1.0.0") except InvalidVersion: - print "Does not match a tag format" + print("Does not match a tag format") ``` """ diff --git a/docs/config.md b/docs/config.md index 3d53249585..d1ae90b29a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -352,7 +352,7 @@ Commitizen provides some version providers for some well known formats: | `scm` | Fetch the version from git and does not need to set it back | | `pep621` | Get and set version from `pyproject.toml` `project.version` field | | `poetry` | Get and set version from `pyproject.toml` `tool.poetry.version` field | -| `uv` | Get and set version from `pyproject.toml` `project.version` field and `uv.lock` `pacakge.version` field whose `package.name` field is the same as `pyproject.toml` `project.name` field | +| `uv` | Get and set version from `pyproject.toml` `project.version` field and `uv.lock` `package.version` field whose `package.name` field is the same as `pyproject.toml` `project.name` field | | `cargo` | Get and set version from `Cargo.toml` `project.version` field | | `npm` | Get and set version from `package.json` `version` field, `package-lock.json` `version,packages.''.version` fields if the file exists, and `npm-shrinkwrap.json` `version,packages.''.version` fields if the file exists | | `composer` | Get and set version from `composer.json` `project.version` field | @@ -386,22 +386,21 @@ class MyProvider(VersionProvider): def set_version(self, version: str): self.file.write_text(version) - ``` ```python title="setup.py" from setuptools import setup setup( - name='my-commitizen-provider', - version='0.1.0', - py_modules=['my_provider'], - install_requires=['commitizen'], - entry_points = { - 'commitizen.provider': [ - 'my-provider = my_provider:MyProvider', + name="my-commitizen-provider", + version="0.1.0", + py_modules=["my_provider"], + install_requires=["commitizen"], + entry_points={ + "commitizen.provider": [ + "my-provider = my_provider:MyProvider", ] - } + }, ) ``` From 58eecdccbaf02879dc5672f431485b582c66ffad Mon Sep 17 00:00:00 2001 From: Capi Etheriel <barraponto@gmail.com> Date: Sun, 16 Mar 2025 19:18:22 -0300 Subject: [PATCH 077/159] update precommit example --- docs/getting_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index 378b819192..3c6257c363 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -94,7 +94,7 @@ repos: hooks: - id: commitizen - id: commitizen-branch - stages: [push] + stages: [pre-push] ``` After the configuration is added, you'll need to run: From 13bc11a9c560bad69c24a08b153b7ad0ca769fff Mon Sep 17 00:00:00 2001 From: Wei Lee <weilee.rx@gmail.com> Date: Thu, 20 Mar 2025 22:11:40 +0800 Subject: [PATCH 078/159] build(pyproject.toml): fix license metadata --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 314ddd925c..cedccabb0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ maintainers = [ { name = "Wei Lee", email = "weilee.rx@gmail.com" }, { name = "Axel H.", email = "noirbizarre@gmail.com" }, ] -license = { text = "LICENSE" } +license = { file = "LICENSE" } readme = "docs/README.md" requires-python = ">=3.9,<4.0" dependencies = [ @@ -42,6 +42,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", + "License :: OSI Approved :: MIT License", ] [project.urls] From 17021fa05ef37e754fd37053c822071c3368b3ca Mon Sep 17 00:00:00 2001 From: Wei Lee <weilee.rx@gmail.com> Date: Sun, 30 Mar 2025 17:50:23 +0800 Subject: [PATCH 079/159] fix(commands/init): add missing uv provider to "cz init" --- commitizen/commands/init.py | 1 + 1 file changed, 1 insertion(+) diff --git a/commitizen/commands/init.py b/commitizen/commands/init.py index e39dfbe291..14ec8067e9 100644 --- a/commitizen/commands/init.py +++ b/commitizen/commands/init.py @@ -228,6 +228,7 @@ def _ask_version_provider(self) -> str: "npm": "npm: Get and set version from package.json:project.version field", "pep621": "pep621: Get and set version from pyproject.toml:project.version field", "poetry": "poetry: Get and set version from pyproject.toml:tool.poetry.version field", + "uv": "uv: Get and Get and set version from pyproject.toml and uv.lock", "scm": "scm: Fetch the version from git and does not need to set it back", } From 904173e3193714d2db6a67615bd8ee1132065526 Mon Sep 17 00:00:00 2001 From: Wei Lee <weilee.rx@gmail.com> Date: Fri, 4 Apr 2025 23:48:55 +0800 Subject: [PATCH 080/159] feat(init): set uv to default value if both pyproject.toml and uv.lock present --- commitizen/commands/init.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/commitizen/commands/init.py b/commitizen/commands/init.py index 14ec8067e9..df872ec7ee 100644 --- a/commitizen/commands/init.py +++ b/commitizen/commands/init.py @@ -24,6 +24,10 @@ class ProjectInfo: def has_pyproject(self) -> bool: return os.path.isfile("pyproject.toml") + @property + def has_uv_lock(self) -> bool: + return os.path.isfile("uv.lock") + @property def has_setup(self) -> bool: return os.path.isfile("setup.py") @@ -32,6 +36,10 @@ def has_setup(self) -> bool: def has_pre_commit_config(self) -> bool: return os.path.isfile(".pre-commit-config.yaml") + @property + def is_python_uv(self) -> bool: + return self.has_pyproject and self.has_uv_lock + @property def is_python_poetry(self) -> bool: if not self.has_pyproject: @@ -236,6 +244,8 @@ def _ask_version_provider(self) -> str: if self.project_info.is_python: if self.project_info.is_python_poetry: default_val = "poetry" + elif self.project_info.is_python_uv: + default_val = "uv" else: default_val = "pep621" elif self.project_info.is_rust_cargo: From e0b1c7743d5ea0bcba82e4ff515ce2caf5e87865 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 22:07:31 +0000 Subject: [PATCH 081/159] =?UTF-8?q?bump:=20version=204.4.1=20=E2=86=92=204?= =?UTF-8?q?.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 10 ++++++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb1beaefcb..6c1cbd7670 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.4.1 # automatically updated by Commitizen + rev: v4.5.0 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fc88ad695..6250af20d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v4.5.0 (2025-04-04) + +### Feat + +- **init**: set uv to default value if both pyproject.toml and uv.lock present + +### Fix + +- **commands/init**: add missing uv provider to "cz init" + ## v4.4.1 (2025-03-02) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 9905939ff6..9faa2c2dd5 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.4.1" +__version__ = "4.5.0" diff --git a/pyproject.toml b/pyproject.toml index cedccabb0e..009bd13ca4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.4.1" +version = "4.5.0" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.4.1" +version = "4.5.0" tag_format = "v$version" version_files = [ "pyproject.toml:version", From d666aa0bae8aec53b23b0495f8b007eeac4fdba8 Mon Sep 17 00:00:00 2001 From: Carlos Sanchez <carlos@apache.org> Date: Fri, 21 Mar 2025 17:32:39 +0100 Subject: [PATCH 082/159] fix: print which tag is invalid and the regex used for validation --- commitizen/tags.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commitizen/tags.py b/commitizen/tags.py index aa11cb7a9c..5724bb2574 100644 --- a/commitizen/tags.py +++ b/commitizen/tags.py @@ -146,7 +146,9 @@ def extract_version(self, tag: GitTag) -> Version: m for regex in self.version_regexes if (m := regex.fullmatch(tag.name)) ) if not (m := next(candidates, None)): - raise InvalidVersion() + raise InvalidVersion( + f"Invalid version tag: '{tag.name}' does not match any configured tag format" + ) if "version" in m.groupdict(): return self.scheme(m.group("version")) From 1451bc53f274b3794776e345212b518736272eca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 01:24:52 +0000 Subject: [PATCH 083/159] =?UTF-8?q?bump:=20version=204.5.0=20=E2=86=92=204?= =?UTF-8?q?.5.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c1cbd7670..19b4394cf6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.5.0 # automatically updated by Commitizen + rev: v4.5.1 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 6250af20d7..39eee25df0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.5.1 (2025-04-09) + +### Fix + +- print which tag is invalid + ## v4.5.0 (2025-04-04) ### Feat diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 9faa2c2dd5..f9f7166e62 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.5.0" +__version__ = "4.5.1" diff --git a/pyproject.toml b/pyproject.toml index 009bd13ca4..c9ea806cfc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.5.0" +version = "4.5.1" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.5.0" +version = "4.5.1" tag_format = "v$version" version_files = [ "pyproject.toml:version", From d7b1a89061f44bda94ded6f0d54f193373d5b6d6 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Ruiz <alex@flawedcode.org> Date: Thu, 20 Mar 2025 14:25:47 +0100 Subject: [PATCH 084/159] feat(git): add parents' digests in commit information --- commitizen/git.py | 16 +++++++++++--- tests/test_git.py | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 3 deletions(-) diff --git a/commitizen/git.py b/commitizen/git.py index 7de8e1f1c8..19ca46b6c3 100644 --- a/commitizen/git.py +++ b/commitizen/git.py @@ -44,13 +44,20 @@ def __eq__(self, other) -> bool: class GitCommit(GitObject): def __init__( - self, rev, title, body: str = "", author: str = "", author_email: str = "" + self, + rev, + title, + body: str = "", + author: str = "", + author_email: str = "", + parents: list[str] | None = None, ): self.rev = rev.strip() self.title = title.strip() self.body = body.strip() self.author = author.strip() self.author_email = author_email.strip() + self.parents = parents or [] @property def message(self): @@ -137,7 +144,9 @@ def get_commits( for rev_and_commit in git_log_entries: if not rev_and_commit: continue - rev, title, author, author_email, *body_list = rev_and_commit.split("\n") + rev, parents, title, author, author_email, *body_list = rev_and_commit.split( + "\n" + ) if rev_and_commit: git_commit = GitCommit( rev=rev.strip(), @@ -145,6 +154,7 @@ def get_commits( body="\n".join(body_list).strip(), author=author, author_email=author_email, + parents=[p for p in parents.strip().split(" ") if p], ) git_commits.append(git_commit) return git_commits @@ -286,7 +296,7 @@ def smart_open(*args, **kargs): def _get_log_as_str_list(start: str | None, end: str, args: str) -> list[str]: """Get string representation of each log entry""" delimiter = "----------commit-delimiter----------" - log_format: str = "%H%n%s%n%an%n%ae%n%b" + log_format: str = "%H%n%P%n%s%n%an%n%ae%n%b" git_log_cmd = ( f"git -c log.showSignature=False log --pretty={log_format}{delimiter} {args}" ) diff --git a/tests/test_git.py b/tests/test_git.py index f929ba6a44..8b2fc2b86e 100644 --- a/tests/test_git.py +++ b/tests/test_git.py @@ -132,11 +132,13 @@ def test_get_commits_author_and_email(): def test_get_commits_without_email(mocker: MockFixture): raw_commit = ( "a515bb8f71c403f6f7d1c17b9d8ebf2ce3959395\n" + "95bbfc703eb99cb49ba0d6ffd8469911303dbe63 12d3b4bdaa996ea7067a07660bb5df4772297bdd\n" "\n" "user name\n" "\n" "----------commit-delimiter----------\n" "12d3b4bdaa996ea7067a07660bb5df4772297bdd\n" + "de33bc5070de19600f2f00262b3c15efea762408\n" "feat(users): add username\n" "user name\n" "\n" @@ -159,16 +161,19 @@ def test_get_commits_without_email(mocker: MockFixture): def test_get_commits_without_breakline_in_each_commit(mocker: MockFixture): raw_commit = ( "ae9ba6fc5526cf478f52ef901418d85505109744\n" + "ff2f56ca844de72a9d59590831087bf5a97bac84\n" "bump: version 2.13.0 → 2.14.0\n" "GitHub Action\n" "action@github.com\n" "----------commit-delimiter----------\n" "ff2f56ca844de72a9d59590831087bf5a97bac84\n" + "b4dc83284dc8c9729032a774a037df1d1f2397d5 20a54bf1b82cd7b573351db4d1e8814dd0be205d\n" "Merge pull request #332 from cliles/feature/271-redux\n" "User\n" "user@email.com\n" "Feature/271 redux----------commit-delimiter----------\n" "20a54bf1b82cd7b573351db4d1e8814dd0be205d\n" + "658f38c3fe832cdab63ed4fb1f7b3a0969a583be\n" "feat(#271): enable creation of annotated tags when bumping\n" "User 2\n" "user@email.edu\n" @@ -193,6 +198,55 @@ def test_get_commits_without_breakline_in_each_commit(mocker: MockFixture): ) +def test_get_commits_with_and_without_parents(mocker: MockFixture): + raw_commit = ( + "4206e661bacf9643373255965f34bbdb382cb2b9\n" + "ae9ba6fc5526cf478f52ef901418d85505109744 bf8479e7aa1a5b9d2f491b79e3a4d4015519903e\n" + "Merge pull request from someone\n" + "Maintainer\n" + "maintainer@email.com\n" + "This is a much needed feature----------commit-delimiter----------\n" + "ae9ba6fc5526cf478f52ef901418d85505109744\n" + "ff2f56ca844de72a9d59590831087bf5a97bac84\n" + "Release 0.1.0\n" + "GitHub Action\n" + "action@github.com\n" + "----------commit-delimiter----------\n" + "ff2f56ca844de72a9d59590831087bf5a97bac84\n" + "\n" + "Initial commit\n" + "User\n" + "user@email.com\n" + "----------commit-delimiter----------\n" + ) + mocker.patch("commitizen.cmd.run", return_value=FakeCommand(out=raw_commit)) + + commits = git.get_commits() + + assert commits[0].author == "Maintainer" + assert commits[1].author == "GitHub Action" + assert commits[2].author == "User" + + assert commits[0].author_email == "maintainer@email.com" + assert commits[1].author_email == "action@github.com" + assert commits[2].author_email == "user@email.com" + + assert commits[0].title == "Merge pull request from someone" + assert commits[1].title == "Release 0.1.0" + assert commits[2].title == "Initial commit" + + assert commits[0].body == "This is a much needed feature" + assert commits[1].body == "" + assert commits[2].body == "" + + assert commits[0].parents == [ + "ae9ba6fc5526cf478f52ef901418d85505109744", + "bf8479e7aa1a5b9d2f491b79e3a4d4015519903e", + ] + assert commits[1].parents == ["ff2f56ca844de72a9d59590831087bf5a97bac84"] + assert commits[2].parents == [] + + def test_get_commits_with_signature(): config_file = ".git/config" config_backup = ".git/config.bak" From 57ea95f652439e78804e16dca822f36f9f5debcc Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Ruiz <alex@flawedcode.org> Date: Thu, 20 Mar 2025 14:25:54 +0100 Subject: [PATCH 085/159] feat(changelog): expose commit parents' digests when processing commits COMMIT_DATA in test_changelog.py had to be type annotated to avoid an issue with mypy linting when creating a GitCommit where the tool would expect the wrong type for the arguments. --- commitizen/changelog.py | 1 + tests/test_changelog.py | 75 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/commitizen/changelog.py b/commitizen/changelog.py index 95bf21d6f9..704efe6071 100644 --- a/commitizen/changelog.py +++ b/commitizen/changelog.py @@ -172,6 +172,7 @@ def process_commit_message( ): message: dict = { "sha1": commit.rev, + "parents": commit.parents, "author": commit.author, "author_email": commit.author_email, **parsed.groupdict(), diff --git a/tests/test_changelog.py b/tests/test_changelog.py index accbf5d33c..df42b82264 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -1,7 +1,7 @@ import re from dataclasses import dataclass from pathlib import Path -from typing import Optional +from typing import Any, Optional import pytest from jinja2 import FileSystemLoader @@ -14,9 +14,10 @@ from commitizen.exceptions import InvalidConfigurationError from commitizen.version_schemes import Pep440 -COMMITS_DATA = [ +COMMITS_DATA: list[dict[str, Any]] = [ { "rev": "141ee441c9c9da0809c554103a558eb17c30ed17", + "parents": ["6c4948501031b7d6405b54b21d3d635827f9421b"], "title": "bump: version 1.1.1 → 1.2.0", "body": "", "author": "Commitizen", @@ -24,6 +25,7 @@ }, { "rev": "6c4948501031b7d6405b54b21d3d635827f9421b", + "parents": ["ddd220ad515502200fe2dde443614c1075d26238"], "title": "docs: how to create custom bumps", "body": "", "author": "Commitizen", @@ -31,6 +33,7 @@ }, { "rev": "ddd220ad515502200fe2dde443614c1075d26238", + "parents": ["ad17acff2e3a2e141cbc3c6efd7705e4e6de9bfc"], "title": "feat: custom cz plugins now support bumping version", "body": "", "author": "Commitizen", @@ -38,6 +41,7 @@ }, { "rev": "ad17acff2e3a2e141cbc3c6efd7705e4e6de9bfc", + "parents": ["56c8a8da84e42b526bcbe130bd194306f7c7e813"], "title": "docs: added bump gif", "body": "", "author": "Commitizen", @@ -45,6 +49,7 @@ }, { "rev": "56c8a8da84e42b526bcbe130bd194306f7c7e813", + "parents": ["74c6134b1b2e6bb8b07ed53410faabe99b204f36"], "title": "bump: version 1.1.0 → 1.1.1", "body": "", "author": "Commitizen", @@ -52,6 +57,7 @@ }, { "rev": "74c6134b1b2e6bb8b07ed53410faabe99b204f36", + "parents": ["cbc7b5f22c4e74deff4bc92d14e19bd93524711e"], "title": "refactor: changed stdout statements", "body": "", "author": "Commitizen", @@ -59,6 +65,7 @@ }, { "rev": "cbc7b5f22c4e74deff4bc92d14e19bd93524711e", + "parents": ["1ba46f2a63cb9d6e7472eaece21528c8cd28b118"], "title": "fix(bump): commit message now fits better with semver", "body": "", "author": "Commitizen", @@ -66,6 +73,7 @@ }, { "rev": "1ba46f2a63cb9d6e7472eaece21528c8cd28b118", + "parents": ["c35dbffd1bb98bb0b3d1593797e79d1c3366af8f"], "title": "fix: conventional commit 'breaking change' in body instead of title", "body": "closes #16", "author": "Commitizen", @@ -73,6 +81,7 @@ }, { "rev": "c35dbffd1bb98bb0b3d1593797e79d1c3366af8f", + "parents": ["25313397a4ac3dc5b5c986017bee2a614399509d"], "title": "refactor(schema): command logic removed from commitizen base", "body": "", "author": "Commitizen", @@ -80,6 +89,7 @@ }, { "rev": "25313397a4ac3dc5b5c986017bee2a614399509d", + "parents": ["d2f13ac41b4e48995b3b619d931c82451886e6ff"], "title": "refactor(info): command logic removed from commitizen base", "body": "", "author": "Commitizen", @@ -87,6 +97,7 @@ }, { "rev": "d2f13ac41b4e48995b3b619d931c82451886e6ff", + "parents": ["d839e317e5b26671b010584ad8cc6bf362400fa1"], "title": "refactor(example): command logic removed from commitizen base", "body": "", "author": "Commitizen", @@ -94,6 +105,7 @@ }, { "rev": "d839e317e5b26671b010584ad8cc6bf362400fa1", + "parents": ["12d0e65beda969f7983c444ceedc2a01584f4e08"], "title": "refactor(commit): moved most of the commit logic to the commit command", "body": "", "author": "Commitizen", @@ -101,6 +113,7 @@ }, { "rev": "12d0e65beda969f7983c444ceedc2a01584f4e08", + "parents": ["fb4c85abe51c228e50773e424cbd885a8b6c610d"], "title": "docs(README): updated documentation url)", "body": "", "author": "Commitizen", @@ -108,6 +121,7 @@ }, { "rev": "fb4c85abe51c228e50773e424cbd885a8b6c610d", + "parents": ["17efb44d2cd16f6621413691a543e467c7d2dda6"], "title": "docs: mkdocs documentation", "body": "", "author": "Commitizen", @@ -115,6 +129,7 @@ }, { "rev": "17efb44d2cd16f6621413691a543e467c7d2dda6", + "parents": ["6012d9eecfce8163d75c8fff179788e9ad5347da"], "title": "Bump version 1.0.0 → 1.1.0", "body": "", "author": "Commitizen", @@ -122,6 +137,7 @@ }, { "rev": "6012d9eecfce8163d75c8fff179788e9ad5347da", + "parents": ["0c7fb0ca0168864dfc55d83c210da57771a18319"], "title": "test: fixed issues with conf", "body": "", "author": "Commitizen", @@ -129,6 +145,7 @@ }, { "rev": "0c7fb0ca0168864dfc55d83c210da57771a18319", + "parents": ["cb1dd2019d522644da5bdc2594dd6dee17122d7f"], "title": "docs(README): some new information about bump", "body": "", "author": "Commitizen", @@ -136,6 +153,7 @@ }, { "rev": "cb1dd2019d522644da5bdc2594dd6dee17122d7f", + "parents": ["9c7450f85df6bf6be508e79abf00855a30c3c73c"], "title": "feat: new working bump command", "body": "", "author": "Commitizen", @@ -143,6 +161,7 @@ }, { "rev": "9c7450f85df6bf6be508e79abf00855a30c3c73c", + "parents": ["9f3af3772baab167e3fd8775d37f041440184251"], "title": "feat: create version tag", "body": "", "author": "Commitizen", @@ -150,6 +169,7 @@ }, { "rev": "9f3af3772baab167e3fd8775d37f041440184251", + "parents": ["b0d6a3defbfde14e676e7eb34946409297d0221b"], "title": "docs: added new changelog", "body": "", "author": "Commitizen", @@ -157,6 +177,7 @@ }, { "rev": "b0d6a3defbfde14e676e7eb34946409297d0221b", + "parents": ["d630d07d912e420f0880551f3ac94e933f9d3beb"], "title": "feat: update given files with new version", "body": "", "author": "Commitizen", @@ -164,6 +185,7 @@ }, { "rev": "d630d07d912e420f0880551f3ac94e933f9d3beb", + "parents": ["1792b8980c58787906dbe6836f93f31971b1ec2d"], "title": "fix: removed all from commit", "body": "", "author": "Commitizen", @@ -171,6 +193,7 @@ }, { "rev": "1792b8980c58787906dbe6836f93f31971b1ec2d", + "parents": ["52def1ea3555185ba4b936b463311949907e31ec"], "title": "feat(config): new set key, used to set version to cfg", "body": "", "author": "Commitizen", @@ -178,6 +201,7 @@ }, { "rev": "52def1ea3555185ba4b936b463311949907e31ec", + "parents": ["3127e05077288a5e2b62893345590bf1096141b7"], "title": "feat: support for pyproject.toml", "body": "", "author": "Commitizen", @@ -185,6 +209,7 @@ }, { "rev": "3127e05077288a5e2b62893345590bf1096141b7", + "parents": ["fd480ed90a80a6ffa540549408403d5b60d0e90c"], "title": "feat: first semantic version bump implementation", "body": "", "author": "Commitizen", @@ -192,6 +217,7 @@ }, { "rev": "fd480ed90a80a6ffa540549408403d5b60d0e90c", + "parents": ["e4840a059731c0bf488381ffc77e989e85dd81ad"], "title": "fix: fix config file not working", "body": "", "author": "Commitizen", @@ -199,6 +225,7 @@ }, { "rev": "e4840a059731c0bf488381ffc77e989e85dd81ad", + "parents": ["aa44a92d68014d0da98965c0c2cb8c07957d4362"], "title": "refactor: added commands folder, better integration with decli", "body": "", "author": "Commitizen", @@ -206,6 +233,7 @@ }, { "rev": "aa44a92d68014d0da98965c0c2cb8c07957d4362", + "parents": ["58bb709765380dbd46b74ce6e8978515764eb955"], "title": "Bump version: 1.0.0b2 → 1.0.0", "body": "", "author": "Commitizen", @@ -213,6 +241,7 @@ }, { "rev": "58bb709765380dbd46b74ce6e8978515764eb955", + "parents": ["97afb0bb48e72b6feca793091a8a23c706693257"], "title": "docs(README): new badges", "body": "", "author": "Commitizen", @@ -220,6 +249,10 @@ }, { "rev": "97afb0bb48e72b6feca793091a8a23c706693257", + "parents": [ + "9cecb9224aa7fa68d4afeac37eba2a25770ef251", + "e004a90b81ea5b374f118759bce5951202d03d69", + ], "title": "Merge pull request #10 from Woile/feat/decli", "body": "Feat/decli", "author": "Commitizen", @@ -227,6 +260,7 @@ }, { "rev": "9cecb9224aa7fa68d4afeac37eba2a25770ef251", + "parents": ["f5781d1a2954d71c14ade2a6a1a95b91310b2577"], "title": "style: black to files", "body": "", "author": "Commitizen", @@ -234,6 +268,7 @@ }, { "rev": "f5781d1a2954d71c14ade2a6a1a95b91310b2577", + "parents": ["80105fb3c6d45369bc0cbf787bd329fba603864c"], "title": "ci: added travis", "body": "", "author": "Commitizen", @@ -241,6 +276,7 @@ }, { "rev": "80105fb3c6d45369bc0cbf787bd329fba603864c", + "parents": ["a96008496ffefb6b1dd9b251cb479eac6a0487f7"], "title": "refactor: removed delegator, added decli and many tests", "body": "BREAKING CHANGE: API is stable", "author": "Commitizen", @@ -248,6 +284,7 @@ }, { "rev": "a96008496ffefb6b1dd9b251cb479eac6a0487f7", + "parents": ["aab33d13110f26604fb786878856ec0b9e5fc32b"], "title": "docs: updated test command", "body": "", "author": "Commitizen", @@ -255,6 +292,7 @@ }, { "rev": "aab33d13110f26604fb786878856ec0b9e5fc32b", + "parents": ["b73791563d2f218806786090fb49ef70faa51a3a"], "title": "Bump version: 1.0.0b1 → 1.0.0b2", "body": "", "author": "Commitizen", @@ -262,6 +300,7 @@ }, { "rev": "b73791563d2f218806786090fb49ef70faa51a3a", + "parents": ["7aa06a454fb717408b3657faa590731fb4ab3719"], "title": "docs(README): updated to reflect current state", "body": "", "author": "Commitizen", @@ -269,6 +308,10 @@ }, { "rev": "7aa06a454fb717408b3657faa590731fb4ab3719", + "parents": [ + "7c7e96b723c2aaa1aec3a52561f680adf0b60e97", + "9589a65880016996cff156b920472b9d28d771ca", + ], "title": "Merge pull request #9 from Woile/dev", "body": "feat: py3 only, tests and conventional commits 1.0", "author": "Commitizen", @@ -276,6 +319,7 @@ }, { "rev": "7c7e96b723c2aaa1aec3a52561f680adf0b60e97", + "parents": ["ed830019581c83ba633bfd734720e6758eca6061"], "title": "Bump version: 0.9.11 → 1.0.0b1", "body": "", "author": "Commitizen", @@ -283,6 +327,7 @@ }, { "rev": "ed830019581c83ba633bfd734720e6758eca6061", + "parents": ["c52eca6f74f844ab3ffbde61d98ef96071e132b7"], "title": "feat: py3 only, tests and conventional commits 1.0", "body": "more tests\npyproject instead of Pipfile\nquestionary instead of whaaaaat (promptkit 2.0.0 support)", "author": "Commitizen", @@ -290,6 +335,7 @@ }, { "rev": "c52eca6f74f844ab3ffbde61d98ef96071e132b7", + "parents": ["0326652b2657083929507ee66d4d1a0899e861ba"], "title": "Bump version: 0.9.10 → 0.9.11", "body": "", "author": "Commitizen", @@ -297,6 +343,7 @@ }, { "rev": "0326652b2657083929507ee66d4d1a0899e861ba", + "parents": ["b3f89892222340150e32631ae6b7aab65230036f"], "title": "fix(config): load config reads in order without failing if there is no commitizen section", "body": "Closes #8", "author": "Commitizen", @@ -304,6 +351,7 @@ }, { "rev": "b3f89892222340150e32631ae6b7aab65230036f", + "parents": ["5e837bf8ef0735193597372cd2d85e31a8f715b9"], "title": "Bump version: 0.9.9 → 0.9.10", "body": "", "author": "Commitizen", @@ -311,6 +359,7 @@ }, { "rev": "5e837bf8ef0735193597372cd2d85e31a8f715b9", + "parents": ["684e0259cc95c7c5e94854608cd3dcebbd53219e"], "title": "fix: parse scope (this is my punishment for not having tests)", "body": "", "author": "Commitizen", @@ -318,6 +367,7 @@ }, { "rev": "684e0259cc95c7c5e94854608cd3dcebbd53219e", + "parents": ["ca38eac6ff09870851b5c76a6ff0a2a8e5ecda15"], "title": "Bump version: 0.9.8 → 0.9.9", "body": "", "author": "Commitizen", @@ -325,6 +375,7 @@ }, { "rev": "ca38eac6ff09870851b5c76a6ff0a2a8e5ecda15", + "parents": ["64168f18d4628718c49689ee16430549e96c5d4b"], "title": "fix: parse scope empty", "body": "", "author": "Commitizen", @@ -332,6 +383,7 @@ }, { "rev": "64168f18d4628718c49689ee16430549e96c5d4b", + "parents": ["9d4def716ef235a1fa5ae61614366423fbc8256f"], "title": "Bump version: 0.9.7 → 0.9.8", "body": "", "author": "Commitizen", @@ -339,6 +391,7 @@ }, { "rev": "9d4def716ef235a1fa5ae61614366423fbc8256f", + "parents": ["33b0bf1a0a4dc60aac45ed47476d2e5473add09e"], "title": "fix(scope): parse correctly again", "body": "", "author": "Commitizen", @@ -346,6 +399,7 @@ }, { "rev": "33b0bf1a0a4dc60aac45ed47476d2e5473add09e", + "parents": ["696885e891ec35775daeb5fec3ba2ab92c2629e1"], "title": "Bump version: 0.9.6 → 0.9.7", "body": "", "author": "Commitizen", @@ -353,6 +407,7 @@ }, { "rev": "696885e891ec35775daeb5fec3ba2ab92c2629e1", + "parents": ["bef4a86761a3bda309c962bae5d22ce9b57119e4"], "title": "fix(scope): parse correctly", "body": "", "author": "Commitizen", @@ -360,6 +415,7 @@ }, { "rev": "bef4a86761a3bda309c962bae5d22ce9b57119e4", + "parents": ["72472efb80f08ee3fd844660afa012c8cb256e4b"], "title": "Bump version: 0.9.5 → 0.9.6", "body": "", "author": "Commitizen", @@ -367,6 +423,7 @@ }, { "rev": "72472efb80f08ee3fd844660afa012c8cb256e4b", + "parents": ["b5561ce0ab3b56bb87712c8f90bcf37cf2474f1b"], "title": "refactor(conventionalCommit): moved filters to questions instead of message", "body": "", "author": "Commitizen", @@ -374,6 +431,7 @@ }, { "rev": "b5561ce0ab3b56bb87712c8f90bcf37cf2474f1b", + "parents": ["3e31714dc737029d96898f412e4ecd2be1bcd0ce"], "title": "fix(manifest): included missing files", "body": "", "author": "Commitizen", @@ -381,6 +439,7 @@ }, { "rev": "3e31714dc737029d96898f412e4ecd2be1bcd0ce", + "parents": ["9df721e06595fdd216884c36a28770438b4f4a39"], "title": "Bump version: 0.9.4 → 0.9.5", "body": "", "author": "Commitizen", @@ -388,6 +447,7 @@ }, { "rev": "9df721e06595fdd216884c36a28770438b4f4a39", + "parents": ["0cf6ada372470c8d09e6c9e68ebf94bbd5a1656f"], "title": "fix(config): home path for python versions between 3.0 and 3.5", "body": "", "author": "Commitizen", @@ -395,6 +455,7 @@ }, { "rev": "0cf6ada372470c8d09e6c9e68ebf94bbd5a1656f", + "parents": ["973c6b3e100f6f69a3fe48bd8ee55c135b96c318"], "title": "Bump version: 0.9.3 → 0.9.4", "body": "", "author": "Commitizen", @@ -402,6 +463,7 @@ }, { "rev": "973c6b3e100f6f69a3fe48bd8ee55c135b96c318", + "parents": ["dacc86159b260ee98eb5f57941c99ba731a01399"], "title": "feat(cli): added version", "body": "", "author": "Commitizen", @@ -409,6 +471,7 @@ }, { "rev": "dacc86159b260ee98eb5f57941c99ba731a01399", + "parents": ["4368f3c3cbfd4a1ced339212230d854bc5bab496"], "title": "Bump version: 0.9.2 → 0.9.3", "body": "", "author": "Commitizen", @@ -416,6 +479,7 @@ }, { "rev": "4368f3c3cbfd4a1ced339212230d854bc5bab496", + "parents": ["da94133288727d35dae9b91866a25045038f2d38"], "title": "feat(committer): conventional commit is a bit more intelligent now", "body": "", "author": "Commitizen", @@ -423,6 +487,7 @@ }, { "rev": "da94133288727d35dae9b91866a25045038f2d38", + "parents": ["1541f54503d2e1cf39bd777c0ca5ab5eb78772ba"], "title": "docs(README): motivation", "body": "", "author": "Commitizen", @@ -430,6 +495,7 @@ }, { "rev": "1541f54503d2e1cf39bd777c0ca5ab5eb78772ba", + "parents": ["ddc855a637b7879108308b8dbd85a0fd27c7e0e7"], "title": "Bump version: 0.9.1 → 0.9.2", "body": "", "author": "Commitizen", @@ -437,6 +503,7 @@ }, { "rev": "ddc855a637b7879108308b8dbd85a0fd27c7e0e7", + "parents": ["46e9032e18a819e466618c7a014bcb0e9981af9e"], "title": "refactor: renamed conventional_changelog to conventional_commits, not backward compatible", "body": "", "author": "Commitizen", @@ -444,6 +511,7 @@ }, { "rev": "46e9032e18a819e466618c7a014bcb0e9981af9e", + "parents": ["0fef73cd7dc77a25b82e197e7c1d3144a58c1350"], "title": "Bump version: 0.9.0 → 0.9.1", "body": "", "author": "Commitizen", @@ -451,6 +519,7 @@ }, { "rev": "0fef73cd7dc77a25b82e197e7c1d3144a58c1350", + "parents": [], "title": "fix(setup.py): future is now required for every python version", "body": "", "author": "Commitizen", @@ -489,6 +558,7 @@ def gitcommits() -> list: commit["body"], commit["author"], commit["author_email"], + commit["parents"], ) for commit in COMMITS_DATA ] @@ -1108,6 +1178,7 @@ def test_generate_tree_from_commits(gitcommits, tags, merge_prereleases): assert change["author"] == "Commitizen" assert change["author_email"] in "author@cz.dev" assert "sha1" in change + assert "parents" in change def test_generate_tree_from_commits_with_no_commits(tags): From 3f767e154f1459207523b688b8794f0343191f69 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Ruiz <alex@flawedcode.org> Date: Fri, 21 Mar 2025 12:53:45 +0100 Subject: [PATCH 086/159] docs(customization): add "parents" to the list of fields in Changes --- docs/customization.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/customization.md b/docs/customization.md index 132f4f0490..50113301db 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -507,12 +507,16 @@ Each `Change` has the following fields: | scope | `str | None` | An optional scope | | message | `str` | The commit message body | | sha1 | `str` | The commit `sha1` | +| parents | `list[str]` | The parent commit(s) `sha1`(s) | | author | `str` | The commit author name | | author_email | `str` | The commit author email | !!! Note The field values depend on the customization class and/or the settings you provide +The `parents` field can be used to identify merge commits and generate a changelog based on those. Another use case +is listing commits that belong to the same pull request. + When using another template (either provided by a plugin or by yourself), you can also pass extra template variables by: From 35f5c23b6dad6bd6be24f783857751bca71ae36d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Sun, 13 Apr 2025 07:26:06 +0000 Subject: [PATCH 087/159] =?UTF-8?q?bump:=20version=204.5.1=20=E2=86=92=204?= =?UTF-8?q?.6.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 7 +++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19b4394cf6..1373277b2d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.5.1 # automatically updated by Commitizen + rev: v4.6.0 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 39eee25df0..1d2ab1e48f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v4.6.0 (2025-04-13) + +### Feat + +- **changelog**: expose commit parents' digests when processing commits +- **git**: add parents' digests in commit information + ## v4.5.1 (2025-04-09) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index f9f7166e62..db01fb213a 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.5.1" +__version__ = "4.6.0" diff --git a/pyproject.toml b/pyproject.toml index c9ea806cfc..6475ec01a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.5.1" +version = "4.6.0" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.5.1" +version = "4.6.0" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 58ca48db42fe994bda1617ea998b9089a2222b03 Mon Sep 17 00:00:00 2001 From: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> Date: Tue, 22 Apr 2025 13:43:12 +0200 Subject: [PATCH 088/159] ci(github-actions): bump deprecated ubuntu-20.04 to ubuntu-22.04 Signed-off-by: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index f2363745cb..b50b02a681 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - platform: [ubuntu-20.04, macos-latest, windows-latest] + platform: [ubuntu-22.04, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 From af285656734fd74c13a8d373a2a0ff303e0971f1 Mon Sep 17 00:00:00 2001 From: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> Date: Tue, 22 Apr 2025 13:30:57 +0200 Subject: [PATCH 089/159] build(deps): bump argcomplete from 3.5.3 to 3.6.2 Signed-off-by: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 073e1bc247..cccd7a532a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,14 +2,14 @@ [[package]] name = "argcomplete" -version = "3.5.3" +version = "3.6.2" description = "Bash tab completion for argparse" optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "argcomplete-3.5.3-py3-none-any.whl", hash = "sha256:2ab2c4a215c59fd6caaff41a869480a23e8f6a5f910b266c1808037f4e375b61"}, - {file = "argcomplete-3.5.3.tar.gz", hash = "sha256:c12bf50eded8aebb298c7b7da7a5ff3ee24dffd9f5281867dfe1424b58c55392"}, + {file = "argcomplete-3.6.2-py3-none-any.whl", hash = "sha256:65b3133a29ad53fb42c48cf5114752c7ab66c1c38544fdf6460f450c09b42591"}, + {file = "argcomplete-3.6.2.tar.gz", hash = "sha256:d0519b1bc867f5f4f4713c41ad0aba73a4a5f007449716b16f385f2166dc6adf"}, ] [package.extras] @@ -1965,4 +1965,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = ">=3.9,<4.0" -content-hash = "b0f8544806163bc0dddc039eb313f9d82119b845b3a19dedc381e9c88e8f4466" +content-hash = "e15b424a0569f939e297c8abfcf09753f1fbcc5b4ad891163cc0982accd3b372" diff --git a/pyproject.toml b/pyproject.toml index 6475ec01a2..5be231aaa7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ dependencies = [ "tomlkit (>=0.5.3,<1.0.0)", "jinja2>=2.10.3", "pyyaml>=3.08", - "argcomplete >=1.12.1,<3.6", + "argcomplete >=1.12.1,<3.7", "typing-extensions (>=4.0.1,<5.0.0) ; python_version < '3.11'", "charset-normalizer (>=2.1.0,<4)", # Use the Python 3.11 and 3.12 compatible API: https://github.com/python/importlib_metadata#compatibility From 2a8a8ea93d519e5964ef92a9a673b5b014898064 Mon Sep 17 00:00:00 2001 From: Alexander Gubin <alexander.gubin@oediv.de> Date: Tue, 29 Apr 2025 14:32:43 +0200 Subject: [PATCH 090/159] fix(commit): use os.unlink to remove temp file NamedTemporaryFile doesn't have a unlink function when delete=False is used Fix https://github.com/commitizen-tools/commitizen/issues/1352 --- commitizen/commands/commit.py | 2 +- tests/commands/test_commit_command.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/commitizen/commands/commit.py b/commitizen/commands/commit.py index abecb3b3ca..93f048082b 100644 --- a/commitizen/commands/commit.py +++ b/commitizen/commands/commit.py @@ -89,7 +89,7 @@ def manual_edit(self, message: str) -> str: subprocess.call(argv) with open(file_path) as temp_file: message = temp_file.read().strip() - file.unlink() + os.unlink(file.name) return message def __call__(self): diff --git a/tests/commands/test_commit_command.py b/tests/commands/test_commit_command.py index 55751f6902..3a92f5af48 100644 --- a/tests/commands/test_commit_command.py +++ b/tests/commands/test_commit_command.py @@ -511,8 +511,6 @@ def test_manual_edit(editor, config, mocker: MockFixture, tmp_path): assert edited_message == test_message.strip() - temp_file.unlink() - @skip_below_py_3_13 def test_commit_command_shows_description_when_use_help_option( From 53d43ad0920b23e8867952274783f14848cb887e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 01:09:40 +0000 Subject: [PATCH 091/159] =?UTF-8?q?bump:=20version=204.6.0=20=E2=86=92=204?= =?UTF-8?q?.6.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1373277b2d..ee153c3500 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.6.0 # automatically updated by Commitizen + rev: v4.6.1 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d2ab1e48f..ecd6b68143 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.6.1 (2025-05-05) + +### Fix + +- **commit**: use os.unlink to remove temp file + ## v4.6.0 (2025-04-13) ### Feat diff --git a/commitizen/__version__.py b/commitizen/__version__.py index db01fb213a..b56d675263 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.6.0" +__version__ = "4.6.1" diff --git a/pyproject.toml b/pyproject.toml index 5be231aaa7..6744c14858 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.6.0" +version = "4.6.1" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.6.0" +version = "4.6.1" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 943b51fb7890b2a14e220ce6d30c7f0d40ba185c Mon Sep 17 00:00:00 2001 From: Raffaello Baluyot <baluyotraf@outlook.com> Date: Mon, 5 May 2025 22:19:55 +0200 Subject: [PATCH 092/159] fix(docs): fix url link and table formatting in the customization docs (#1399) --- docs/customization.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/customization.md b/docs/customization.md index 50113301db..da41071b98 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -164,7 +164,7 @@ commitizen: | `change_type_map` | `dict` | `None` | (OPTIONAL) Dictionary mapping the type of the commit to a changelog entry | [jinja2]: https://jinja.palletsprojects.com/en/2.10.x/ -[changelog-spec]: https://commitizen-tools.github.io/commitizen/changelog/ +[changelog-spec]: https://commitizen-tools.github.io/commitizen/commands/changelog/ #### Detailed `questions` content @@ -177,6 +177,7 @@ commitizen: | `default` | `Any` | `None` | (OPTIONAL) The default value for this question. | | `filter` | `str` | `None` | (OPTIONAL) Validator for user's answer. **(Work in Progress)** | | `multiline` | `bool` | `False` | (OPTIONAL) Enable multiline support when `type = input`. | + [different-question-types]: https://github.com/tmbo/questionary#different-question-types #### Shortcut keys From c44e2fe8ccd7760147d90426c3782d525558d589 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 20:20:18 +0000 Subject: [PATCH 093/159] =?UTF-8?q?bump:=20version=204.6.1=20=E2=86=92=204?= =?UTF-8?q?.6.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ee153c3500..ac8b996267 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.6.1 # automatically updated by Commitizen + rev: v4.6.2 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index ecd6b68143..def8dab180 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.6.2 (2025-05-05) + +### Fix + +- **docs**: fix url link and table formatting in the customization docs (#1399) + ## v4.6.1 (2025-05-05) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index b56d675263..456bc7c315 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.6.1" +__version__ = "4.6.2" diff --git a/pyproject.toml b/pyproject.toml index 6744c14858..43bed32b5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.6.1" +version = "4.6.2" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.6.1" +version = "4.6.2" tag_format = "v$version" version_files = [ "pyproject.toml:version", From a3682d5afc156272f7b3135232c3619c4d25b142 Mon Sep 17 00:00:00 2001 From: baluyotraf <baluyotraf@outlook.com> Date: Mon, 5 May 2025 18:06:48 +0200 Subject: [PATCH 094/159] docs: Fix the changelog_pattern regex in the monorepo tutorial --- docs/tutorials/monorepo_guidance.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/monorepo_guidance.md b/docs/tutorials/monorepo_guidance.md index 817f92321d..e530c596c7 100644 --- a/docs/tutorials/monorepo_guidance.md +++ b/docs/tutorials/monorepo_guidance.md @@ -71,11 +71,11 @@ Example config and commit for `library-b`: ```toml [tool.commitizen.customize] -changelog_pattern = "^(feat|fix)\\(library-b\\)(!)?:" #the pattern on types can be a wild card or any types you wish to include +changelog_pattern = "^(feat|fix)\(library-b\)(!)?:" #the pattern on types can be a wild card or any types you wish to include ``` A commit message looking like this, would be included: ``` -fix:(library-b) Some awesome message +fix(library-b): Some awesome message ``` From 5f607f3d090bbc9291cce4ca3fec6bd1618ac2d5 Mon Sep 17 00:00:00 2001 From: baluyotraf <baluyotraf@outlook.com> Date: Tue, 6 May 2025 15:42:35 +0200 Subject: [PATCH 095/159] Revert removal of escape in toml --- docs/tutorials/monorepo_guidance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/monorepo_guidance.md b/docs/tutorials/monorepo_guidance.md index e530c596c7..792c8c224f 100644 --- a/docs/tutorials/monorepo_guidance.md +++ b/docs/tutorials/monorepo_guidance.md @@ -71,7 +71,7 @@ Example config and commit for `library-b`: ```toml [tool.commitizen.customize] -changelog_pattern = "^(feat|fix)\(library-b\)(!)?:" #the pattern on types can be a wild card or any types you wish to include +changelog_pattern = "^(feat|fix)\\(library-b\\)(!)?:" #the pattern on types can be a wild card or any types you wish to include ``` A commit message looking like this, would be included: From c991feaf07370e635e38cd713d59da06eb19aba1 Mon Sep 17 00:00:00 2001 From: name <you@example.com> Date: Tue, 8 Apr 2025 02:19:34 +0800 Subject: [PATCH 096/159] docs(customization.md): add select type and search filter documentation --- docs/customization.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index da41071b98..31749d1c83 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -170,13 +170,15 @@ commitizen: | Parameter | Type | Default | Description | | ----------- | ------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | `str` | `None` | The type of questions. Valid type: `list`, `input` and etc. [See More][different-question-types] | +| `type` | `str` | `None` | The type of questions. Valid types: `list`, `select`, `input` and etc. The `select` type provides an interactive searchable list interface. [See More][different-question-types] | | `name` | `str` | `None` | The key for the value answered by user. It's used in `message_template` | | `message` | `str` | `None` | Detail description for the question. | -| `choices` | `list` | `None` | (OPTIONAL) The choices when `type = list`. Either use a list of values or a list of dictionaries with `name` and `value` keys. Keyboard shortcuts can be defined via `key`. See examples above. | +| `choices` | `list` | `None` | (OPTIONAL) The choices when `type = list` or `type = select`. Either use a list of values or a list of dictionaries with `name` and `value` keys. Keyboard shortcuts can be defined via `key`. See examples above. | | `default` | `Any` | `None` | (OPTIONAL) The default value for this question. | | `filter` | `str` | `None` | (OPTIONAL) Validator for user's answer. **(Work in Progress)** | -| `multiline` | `bool` | `False` | (OPTIONAL) Enable multiline support when `type = input`. | +| `multiline` | `bool` | `False` | (OPTIONAL) Enable multiline support when `type = input`. | +| `use_search_filter` | `bool` | `False` | (OPTIONAL) Enable search/filter functionality for list/select type questions. This allows users to type and filter through the choices. | +| `use_jk_keys` | `bool` | `True` | (OPTIONAL) Enable/disable j/k keys for navigation in list/select type questions. Set to false if you prefer arrow keys only. | [different-question-types]: https://github.com/tmbo/questionary#different-question-types @@ -445,8 +447,8 @@ Commitizen gives you the possibility to provide your own changelog template, by: - providing one with your customization class - providing one from the current working directory and setting it: - - as [configuration][template-config] - - as `--template` parameter to both `bump` and `changelog` commands + - as [configuration][template-config] + - as `--template` parameter to both `bump` and `changelog` commands - either by providing a template with the same name as the default template By default, the template used is the `CHANGELOG.md.j2` file from the commitizen repository. From 5be28470ecf803c5092794201810ef89f54b9f87 Mon Sep 17 00:00:00 2001 From: yusin huang <os-yusin.huang@twtp1pc1753.deltaos.corp> Date: Mon, 14 Apr 2025 10:11:42 +0800 Subject: [PATCH 097/159] test(test_cz_search_filter.py): add test cases for search filter configuration --- tests/test_cz_search_filter.py | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 tests/test_cz_search_filter.py diff --git a/tests/test_cz_search_filter.py b/tests/test_cz_search_filter.py new file mode 100644 index 0000000000..0e70e3104a --- /dev/null +++ b/tests/test_cz_search_filter.py @@ -0,0 +1,76 @@ +import pytest + +from commitizen.config import TomlConfig +from commitizen.cz.customize import CustomizeCommitsCz + +TOML_WITH_SEARCH_FILTER = r""" +[tool.commitizen] +name = "cz_customize" + +[tool.commitizen.customize] +message_template = "{{change_type}}:{% if scope %} ({{scope}}){% endif %}{% if breaking %}!{% endif %} {{message}}" + +[[tool.commitizen.customize.questions]] +type = "select" +name = "change_type" +message = "Select the type of change you are committing" +use_search_filter = true +use_jk_keys = false +choices = [ + {value = "fix", name = "fix: A bug fix. Correlates with PATCH in SemVer"}, + {value = "feat", name = "feat: A new feature. Correlates with MINOR in SemVer"}, + {value = "docs", name = "docs: Documentation only changes"}, + {value = "style", name = "style: Changes that do not affect the meaning of the code"}, + {value = "refactor", name = "refactor: A code change that neither fixes a bug nor adds a feature"}, + {value = "perf", name = "perf: A code change that improves performance"}, + {value = "test", name = "test: Adding missing or correcting existing tests"}, + {value = "build", name = "build: Changes that affect the build system or external dependencies"}, + {value = "ci", name = "ci: Changes to CI configuration files and scripts"} +] + +[[tool.commitizen.customize.questions]] +type = "input" +name = "scope" +message = "What is the scope of this change? (class or file name): (press [enter] to skip)" + +[[tool.commitizen.customize.questions]] +type = "input" +name = "message" +message = "Write a short and imperative summary of the code changes: (lower case and no period)" +""" + + +@pytest.fixture +def config(): + return TomlConfig(data=TOML_WITH_SEARCH_FILTER, path="not_exist.toml") + + +def test_questions_with_search_filter(config): + """Test that questions are properly configured with search filter""" + cz = CustomizeCommitsCz(config) + questions = cz.questions() + + # Test that the first question (change_type) has search filter enabled + assert questions[0]["type"] == "select" + assert questions[0]["name"] == "change_type" + assert questions[0]["use_search_filter"] is True + assert questions[0]["use_jk_keys"] is False + + # Test that the choices are properly configured + choices = questions[0]["choices"] + assert len(choices) == 9 # We have 9 commit types + assert choices[0]["value"] == "fix" + assert choices[1]["value"] == "feat" + + +def test_message_template(config): + """Test that the message template is properly configured""" + cz = CustomizeCommitsCz(config) + template = cz.message( + { + "change_type": "feat", + "scope": "search", + "message": "add search filter support", + } + ) + assert template == "feat: (search) add search filter support" From 776d70f700752789a42b31864807c389337e314f Mon Sep 17 00:00:00 2001 From: Yusin Huang <abcd51018@gmail.com> Date: Tue, 15 Apr 2025 23:00:50 +0800 Subject: [PATCH 098/159] fix(changelog.py): modify the CHANGELOG.md generated by cz bump --changelog to the right place --- commitizen/commands/changelog.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/commitizen/commands/changelog.py b/commitizen/commands/changelog.py index 80a72651e4..71bc93265b 100644 --- a/commitizen/commands/changelog.py +++ b/commitizen/commands/changelog.py @@ -32,21 +32,28 @@ def __init__(self, config: BaseConfig, args): raise NotAGitProjectError() self.config: BaseConfig = config - self.encoding = self.config.settings["encoding"] - self.cz = factory.commiter_factory(self.config) - - self.start_rev = args.get("start_rev") or self.config.settings.get( - "changelog_start_rev" - ) - self.file_name = args.get("file_name") or cast( + changelog_file_name = args.get("file_name") or cast( str, self.config.settings.get("changelog_file") ) - if not isinstance(self.file_name, str): + if not isinstance(changelog_file_name, str): raise NotAllowed( "Changelog file name is broken.\n" "Check the flag `--file-name` in the terminal " f"or the setting `changelog_file` in {self.config.path}" ) + self.file_name = ( + str(Path(self.config.path.parent) / changelog_file_name) + if self.config.path is not None + else changelog_file_name + ) + + self.encoding = self.config.settings["encoding"] + self.cz = factory.commiter_factory(self.config) + + self.start_rev = args.get("start_rev") or self.config.settings.get( + "changelog_start_rev" + ) + self.changelog_format = get_changelog_format(self.config, self.file_name) self.incremental = args["incremental"] or self.config.settings.get( From 15c185709ea2dba6a850f1b19c9a3790d4e92f50 Mon Sep 17 00:00:00 2001 From: Yusin Huang <abcd51018@gmail.com> Date: Tue, 15 Apr 2025 23:01:40 +0800 Subject: [PATCH 099/159] test(test_changelog_command.py): add test for changelog file_name construction from args and config --- tests/test_changelog.py | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/tests/test_changelog.py b/tests/test_changelog.py index df42b82264..6ffb6bc294 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -1,13 +1,18 @@ +from __future__ import annotations + import re from dataclasses import dataclass from pathlib import Path -from typing import Any, Optional +from typing import Any +from unittest.mock import Mock import pytest from jinja2 import FileSystemLoader from commitizen import changelog, git from commitizen.changelog_formats import ChangelogFormat +from commitizen.commands.changelog import Changelog +from commitizen.config import BaseConfig from commitizen.cz.conventional_commits.conventional_commits import ( ConventionalCommitsCz, ) @@ -1499,7 +1504,7 @@ def changelog_message_builder_hook(message: dict, commit: git.GitCommit): def test_render_changelog_with_changelog_release_hook( gitcommits, tags, any_changelog_format: ChangelogFormat ): - def changelog_release_hook(release: dict, tag: Optional[git.GitTag]) -> dict: + def changelog_release_hook(release: dict, tag: git.GitTag | None) -> dict: release["extra"] = "whatever" return release @@ -1631,3 +1636,32 @@ def test_tags_rules_get_version_tags(capsys: pytest.CaptureFixture): captured = capsys.readouterr() assert captured.err.count("InvalidVersion") == 2 assert captured.err.count("not-a-version") == 2 + + +def test_changelog_file_name_from_args_and_config(): + mock_config = Mock(spec=BaseConfig) + mock_config.path.parent = "/my/project/" + mock_config.settings = { + "name": "cz_conventional_commits", + "changelog_file": "CHANGELOG.md", + "encoding": "utf-8", + "changelog_start_rev": "v1.0.0", + "tag_format": "$version", + "legacy_tag_formats": [], + "ignored_tag_formats": [], + "incremental": True, + "changelog_merge_prerelease": True, + } + + args = { + "file_name": "CUSTOM.md", + "incremental": None, + "dry_run": False, + "unreleased_version": "1.0.1", + } + changelog = Changelog(mock_config, args) + assert changelog.file_name == "/my/project/CUSTOM.md" + + args = {"incremental": None, "dry_run": False, "unreleased_version": "1.0.1"} + changelog = Changelog(mock_config, args) + assert changelog.file_name == "/my/project/CHANGELOG.md" From 7bea5a5082fe0fafc1e62515a9868095bb96fa4c Mon Sep 17 00:00:00 2001 From: Yusin Huang <abcd51018@gmail.com> Date: Thu, 17 Apr 2025 01:02:27 +0800 Subject: [PATCH 100/159] fix(changelog.py): cross-platform path handling using os.path.join and modify the path linter and test parameter --- commitizen/commands/changelog.py | 3 ++- tests/test_changelog.py | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/commitizen/commands/changelog.py b/commitizen/commands/changelog.py index 71bc93265b..3b8f43e372 100644 --- a/commitizen/commands/changelog.py +++ b/commitizen/commands/changelog.py @@ -1,5 +1,6 @@ from __future__ import annotations +import os import os.path from difflib import SequenceMatcher from operator import itemgetter @@ -42,7 +43,7 @@ def __init__(self, config: BaseConfig, args): f"or the setting `changelog_file` in {self.config.path}" ) self.file_name = ( - str(Path(self.config.path.parent) / changelog_file_name) + os.path.join(str(self.config.path.parent), changelog_file_name) if self.config.path is not None else changelog_file_name ) diff --git a/tests/test_changelog.py b/tests/test_changelog.py index 6ffb6bc294..67ba273b5c 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -1,5 +1,6 @@ from __future__ import annotations +import os import re from dataclasses import dataclass from pathlib import Path @@ -1640,7 +1641,7 @@ def test_tags_rules_get_version_tags(capsys: pytest.CaptureFixture): def test_changelog_file_name_from_args_and_config(): mock_config = Mock(spec=BaseConfig) - mock_config.path.parent = "/my/project/" + mock_config.path.parent = "/my/project" mock_config.settings = { "name": "cz_conventional_commits", "changelog_file": "CHANGELOG.md", @@ -1660,8 +1661,12 @@ def test_changelog_file_name_from_args_and_config(): "unreleased_version": "1.0.1", } changelog = Changelog(mock_config, args) - assert changelog.file_name == "/my/project/CUSTOM.md" + assert os.path.normpath(changelog.file_name) == os.path.normpath( + os.path.join("/my/project", "CUSTOM.md") + ) args = {"incremental": None, "dry_run": False, "unreleased_version": "1.0.1"} changelog = Changelog(mock_config, args) - assert changelog.file_name == "/my/project/CHANGELOG.md" + assert os.path.normpath(changelog.file_name) == os.path.normpath( + os.path.join("/my/project", "CHANGELOG.md") + ) From e177141ec11f6bf72a6661c6a9fabebe3b670251 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 00:43:53 +0000 Subject: [PATCH 101/159] =?UTF-8?q?bump:=20version=204.6.2=20=E2=86=92=204?= =?UTF-8?q?.6.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 7 +++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac8b996267..08c31ba0a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.6.2 # automatically updated by Commitizen + rev: v4.6.3 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index def8dab180..dbad463955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v4.6.3 (2025-05-07) + +### Fix + +- **changelog.py**: cross-platform path handling using os.path.join and modify the path linter and test parameter +- **changelog.py**: modify the CHANGELOG.md generated by cz bump --changelog to the right place + ## v4.6.2 (2025-05-05) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 456bc7c315..de3842dc77 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.6.2" +__version__ = "4.6.3" diff --git a/pyproject.toml b/pyproject.toml index 43bed32b5c..92b28fd091 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.6.2" +version = "4.6.3" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.6.2" +version = "4.6.3" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 72c274309fbbb87f8bccd0ba7aee12ea71fa1fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuna=20Alika=C5=9Fifo=C4=9Flu?= <tunakasif@gmail.com> Date: Thu, 8 May 2025 22:55:24 +0300 Subject: [PATCH 102/159] feat(providers): add support for `Cargo.lock` If `Cargo.lock` file is present in the same path as the `Cargo.toml`, the version of the package will also be updated in the `Cargo.lock` file. The implementation is similar to the one used for `UvProvider`, which extends the `CargoProvider` to handle lock files. The change does not break any existing functionality, if the `Cargo.lock` file is not present, since it checks for the existence of the file before attempting a lock file update. --- commitizen/providers/cargo_provider.py | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/commitizen/providers/cargo_provider.py b/commitizen/providers/cargo_provider.py index cee687c15b..2e73ff35a1 100644 --- a/commitizen/providers/cargo_provider.py +++ b/commitizen/providers/cargo_provider.py @@ -1,5 +1,7 @@ from __future__ import annotations +from pathlib import Path + import tomlkit from commitizen.providers.base_provider import TomlProvider @@ -13,6 +15,11 @@ class CargoProvider(TomlProvider): """ filename = "Cargo.toml" + lock_filename = "Cargo.lock" + + @property + def lock_file(self) -> Path: + return Path() / self.lock_filename def get(self, document: tomlkit.TOMLDocument) -> str: try: @@ -28,3 +35,23 @@ def set(self, document: tomlkit.TOMLDocument, version: str): except tomlkit.exceptions.NonExistentKey: ... document["package"]["version"] = version # type: ignore + + def set_version(self, version: str) -> None: + super().set_version(version) + if self.lock_file.exists(): + self.set_lock_version(version) + + def set_lock_version(self, version: str) -> None: + cargo_toml_content = tomlkit.parse(self.file.read_text()) + try: + package_name = cargo_toml_content["package"]["name"] # type: ignore + except tomlkit.exceptions.NonExistentKey: + package_name = cargo_toml_content["workspace"]["package"]["name"] # type: ignore + + cargo_lock_content = tomlkit.parse(self.lock_file.read_text()) + packages: tomlkit.items.AoT = cargo_lock_content["package"] # type: ignore[assignment] + for i, package in enumerate(packages): + if package["name"] == package_name: + cargo_lock_content["package"][i]["version"] = version # type: ignore[index] + break + self.lock_file.write_text(tomlkit.dumps(cargo_lock_content)) From aabeae3f64c91b2735259a849c6832bfc0b997f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuna=20Alika=C5=9Fifo=C4=9Flu?= <tunakasif@gmail.com> Date: Thu, 8 May 2025 23:07:24 +0300 Subject: [PATCH 103/159] refactor(tests): increase verbosity of variables To add more test variables, increase the verbosity of current ones and make them more clear. --- tests/providers/test_cargo_provider.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/providers/test_cargo_provider.py b/tests/providers/test_cargo_provider.py index 646ef3a53d..2144a145a7 100644 --- a/tests/providers/test_cargo_provider.py +++ b/tests/providers/test_cargo_provider.py @@ -15,7 +15,7 @@ version = "0.1.0" """ -CARGO_EXPECTED = """\ +CARGO_TOML_EXPECTED = """\ [package] name = "whatever" version = "42.1" @@ -27,7 +27,7 @@ version = "0.1.0" """ -CARGO_WORKSPACE_EXPECTED = """\ +CARGO_WORKSPACE_TOML_EXPECTED = """\ [workspace.package] name = "whatever" version = "42.1" @@ -37,8 +37,8 @@ @pytest.mark.parametrize( "content, expected", ( - (CARGO_TOML, CARGO_EXPECTED), - (CARGO_WORKSPACE_TOML, CARGO_WORKSPACE_EXPECTED), + (CARGO_TOML, CARGO_TOML_EXPECTED), + (CARGO_WORKSPACE_TOML, CARGO_WORKSPACE_TOML_EXPECTED), ), ) def test_cargo_provider( From d14218b3ddf0e95855f6147ae472559c3a9d5055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuna=20Alika=C5=9Fifo=C4=9Flu?= <tunakasif@gmail.com> Date: Thu, 8 May 2025 23:08:12 +0300 Subject: [PATCH 104/159] test: add test for cargo provider with lock files Add a test to check the behavior of the cargo provider when a `Cargo.lock` file is present. This test ensures that the `CargoProvider` behaves correctly when the lock file is present, and updates both the `Cargo.lock` and `Cargo.toml` files accordingly. --- tests/providers/test_cargo_provider.py | 69 ++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/tests/providers/test_cargo_provider.py b/tests/providers/test_cargo_provider.py index 2144a145a7..4b20c6ea53 100644 --- a/tests/providers/test_cargo_provider.py +++ b/tests/providers/test_cargo_provider.py @@ -33,6 +33,32 @@ version = "42.1" """ +CARGO_LOCK = """\ +[[package]] +name = "whatever" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123abc" +dependencies = [ + "packageA", + "packageB", + "packageC", +] +""" + +CARGO_LOCK_EXPECTED = """\ +[[package]] +name = "whatever" +version = "42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "123abc" +dependencies = [ + "packageA", + "packageB", + "packageC", +] +""" + @pytest.mark.parametrize( "content, expected", @@ -58,3 +84,46 @@ def test_cargo_provider( provider.set_version("42.1") assert file.read_text() == dedent(expected) + + +@pytest.mark.parametrize( + "toml_content, lock_content, toml_expected, lock_expected", + ( + ( + CARGO_TOML, + CARGO_LOCK, + CARGO_TOML_EXPECTED, + CARGO_LOCK_EXPECTED, + ), + ( + CARGO_WORKSPACE_TOML, + CARGO_LOCK, + CARGO_WORKSPACE_TOML_EXPECTED, + CARGO_LOCK_EXPECTED, + ), + ), +) +def test_cargo_provider_with_lock( + config: BaseConfig, + chdir: Path, + toml_content: str, + lock_content: str, + toml_expected: str, + lock_expected: str, +): + filename = CargoProvider.filename + file = chdir / filename + file.write_text(dedent(toml_content)) + + lock_filename = CargoProvider.lock_filename + lock_file = chdir / lock_filename + lock_file.write_text(dedent(lock_content)) + config.settings["version_provider"] = "cargo" + + provider = get_provider(config) + assert isinstance(provider, CargoProvider) + assert provider.get_version() == "0.1.0" + + provider.set_version("42.1") + assert file.read_text() == dedent(toml_expected) + assert lock_file.read_text() == dedent(lock_expected) From 7173c47d8561ec86d060ec3c8783604b7744cea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuna=20Alika=C5=9Fifo=C4=9Flu?= <tunakasif@gmail.com> Date: Thu, 8 May 2025 23:22:17 +0300 Subject: [PATCH 105/159] docs(providers): update `cargo` explanation Add `Cargo.lock` update information to the documentation. --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index d1ae90b29a..a522312743 100644 --- a/docs/config.md +++ b/docs/config.md @@ -353,7 +353,7 @@ Commitizen provides some version providers for some well known formats: | `pep621` | Get and set version from `pyproject.toml` `project.version` field | | `poetry` | Get and set version from `pyproject.toml` `tool.poetry.version` field | | `uv` | Get and set version from `pyproject.toml` `project.version` field and `uv.lock` `package.version` field whose `package.name` field is the same as `pyproject.toml` `project.name` field | -| `cargo` | Get and set version from `Cargo.toml` `project.version` field | +| `cargo` | Get and set version from `Cargo.toml` `package.version` field and `Cargo.lock` `package.version` field whose `package.name` field is the same as `Cargo.toml` `package.name` field | | `npm` | Get and set version from `package.json` `version` field, `package-lock.json` `version,packages.''.version` fields if the file exists, and `npm-shrinkwrap.json` `version,packages.''.version` fields if the file exists | | `composer` | Get and set version from `composer.json` `project.version` field | From be02801f92cb948ba86d8c1a9a306be4172e4efe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Sat, 10 May 2025 13:47:12 +0000 Subject: [PATCH 106/159] =?UTF-8?q?bump:=20version=204.6.3=20=E2=86=92=204?= =?UTF-8?q?.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 10 ++++++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 08c31ba0a0..ad78003cf3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.6.3 # automatically updated by Commitizen + rev: v4.7.0 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index dbad463955..7ca4f2aa70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v4.7.0 (2025-05-10) + +### Feat + +- **providers**: add support for `Cargo.lock` + +### Refactor + +- **tests**: increase verbosity of variables + ## v4.6.3 (2025-05-07) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index de3842dc77..8355eb42a9 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.6.3" +__version__ = "4.7.0" diff --git a/pyproject.toml b/pyproject.toml index 92b28fd091..02c6d12762 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.6.3" +version = "4.7.0" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.6.3" +version = "4.7.0" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 454494788f0b9efc90b90c496d144b0edfc76348 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 11 May 2025 16:09:40 +0800 Subject: [PATCH 107/159] docs(bug_report.yml): update bug_report.yml Closes #1134 --- .github/ISSUE_TEMPLATE/bug_report.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 10d782d30b..3b15906cfa 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -48,14 +48,14 @@ body: attributes: label: Environment description: | - For older commitizen versions, please include the output of the following commands manually - placeholder: | - - commitizen version: `cz version` - - python version: `python --version` - - operating system: `python3 -c "import platform; print(platform.system())"` + For older commitizen versions, please include the output of the following command manually: ```bash cz version --report ``` + placeholder: | + Commitizen Version: 4.0.0 + Python Version: 3.13.3 (main, Apr 8 2025, 13:54:08) [Clang 16.0.0 (clang-1600.0.26.6)] + Operating System: Darwin validations: required: true From 617b610e2f6e1ea9c373a09e7355d134ff0e7ac8 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 11 May 2025 21:04:16 +0800 Subject: [PATCH 108/159] docs(bug_report.yml): resolve comments --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3b15906cfa..9ed5badae4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -48,7 +48,7 @@ body: attributes: label: Environment description: | - For older commitizen versions, please include the output of the following command manually: + Please use the following command to retrieve environment information ```bash cz version --report From d86ec4c32b619020f86724fdf7804cee48b77adc Mon Sep 17 00:00:00 2001 From: Tim Hsiung <bear890707@gmail.com> Date: Thu, 15 May 2025 19:11:52 +0800 Subject: [PATCH 109/159] style: fix some typos (#1407) --- commitizen/commands/bump.py | 2 +- commitizen/commands/changelog.py | 2 +- commitizen/commands/check.py | 6 +++--- commitizen/commands/commit.py | 2 +- commitizen/commands/example.py | 2 +- commitizen/commands/info.py | 2 +- commitizen/commands/init.py | 2 +- commitizen/commands/schema.py | 2 +- commitizen/factory.py | 2 +- commitizen/version_schemes.py | 10 +++++----- tests/commands/test_bump_command.py | 18 +++++++++--------- tests/commands/test_changelog_command.py | 4 ++-- tests/commands/test_check_command.py | 2 +- tests/commands/test_init_command.py | 2 +- tests/conftest.py | 2 +- tests/test_bump_update_version_in_files.py | 4 ++-- tests/test_changelog_format_asciidoc.py | 2 +- tests/test_changelog_format_markdown.py | 2 +- .../test_changelog_format_restructuredtext.py | 2 +- tests/test_changelog_format_textile.py | 2 +- tests/test_cz_customize.py | 6 +++--- tests/test_factory.py | 4 ++-- tests/test_version_scheme_pep440.py | 4 ++-- tests/test_version_scheme_semver.py | 4 ++-- 24 files changed, 45 insertions(+), 45 deletions(-) diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index 60853094f9..0a2bbe37fc 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -68,7 +68,7 @@ def __init__(self, config: BaseConfig, arguments: dict): if arguments[key] is not None }, } - self.cz = factory.commiter_factory(self.config) + self.cz = factory.committer_factory(self.config) self.changelog_flag = arguments["changelog"] self.changelog_config = self.config.settings.get("update_changelog_on_bump") self.changelog_to_stdout = arguments["changelog_to_stdout"] diff --git a/commitizen/commands/changelog.py b/commitizen/commands/changelog.py index 3b8f43e372..fb6f76a6b7 100644 --- a/commitizen/commands/changelog.py +++ b/commitizen/commands/changelog.py @@ -49,7 +49,7 @@ def __init__(self, config: BaseConfig, args): ) self.encoding = self.config.settings["encoding"] - self.cz = factory.commiter_factory(self.config) + self.cz = factory.committer_factory(self.config) self.start_rev = args.get("start_rev") or self.config.settings.get( "changelog_start_rev" diff --git a/commitizen/commands/check.py b/commitizen/commands/check.py index e22155cf78..087db03ea5 100644 --- a/commitizen/commands/check.py +++ b/commitizen/commands/check.py @@ -46,7 +46,7 @@ def __init__(self, config: BaseConfig, arguments: dict[str, Any], cwd=os.getcwd( self.config: BaseConfig = config self.encoding = config.settings["encoding"] - self.cz = factory.commiter_factory(self.config) + self.cz = factory.committer_factory(self.config) def _valid_command_argument(self): num_exclusive_args_provided = sum( @@ -72,7 +72,7 @@ def __call__(self): raise NoCommitsFoundError(f"No commit found with range: '{self.rev_range}'") pattern = self.cz.schema_pattern() - ill_formated_commits = [ + ill_formatted_commits = [ commit for commit in commits if not self.validate_commit_message(commit.message, pattern) @@ -80,7 +80,7 @@ def __call__(self): displayed_msgs_content = "\n".join( [ f'commit "{commit.rev}": "{commit.message}"' - for commit in ill_formated_commits + for commit in ill_formatted_commits ] ) if displayed_msgs_content: diff --git a/commitizen/commands/commit.py b/commitizen/commands/commit.py index 93f048082b..cb34c41a50 100644 --- a/commitizen/commands/commit.py +++ b/commitizen/commands/commit.py @@ -35,7 +35,7 @@ def __init__(self, config: BaseConfig, arguments: dict): self.config: BaseConfig = config self.encoding = config.settings["encoding"] - self.cz = factory.commiter_factory(self.config) + self.cz = factory.committer_factory(self.config) self.arguments = arguments self.temp_file: str = get_backup_file_path() diff --git a/commitizen/commands/example.py b/commitizen/commands/example.py index e7abe7b318..a28ad85f16 100644 --- a/commitizen/commands/example.py +++ b/commitizen/commands/example.py @@ -7,7 +7,7 @@ class Example: def __init__(self, config: BaseConfig, *args): self.config: BaseConfig = config - self.cz = factory.commiter_factory(self.config) + self.cz = factory.committer_factory(self.config) def __call__(self): out.write(self.cz.example()) diff --git a/commitizen/commands/info.py b/commitizen/commands/info.py index afac9797e4..abd4197e7f 100644 --- a/commitizen/commands/info.py +++ b/commitizen/commands/info.py @@ -7,7 +7,7 @@ class Info: def __init__(self, config: BaseConfig, *args): self.config: BaseConfig = config - self.cz = factory.commiter_factory(self.config) + self.cz = factory.committer_factory(self.config) def __call__(self): out.write(self.cz.info()) diff --git a/commitizen/commands/init.py b/commitizen/commands/init.py index df872ec7ee..20277399d8 100644 --- a/commitizen/commands/init.py +++ b/commitizen/commands/init.py @@ -82,7 +82,7 @@ class Init: def __init__(self, config: BaseConfig, *args): self.config: BaseConfig = config self.encoding = config.settings["encoding"] - self.cz = factory.commiter_factory(self.config) + self.cz = factory.committer_factory(self.config) self.project_info = ProjectInfo() def __call__(self): diff --git a/commitizen/commands/schema.py b/commitizen/commands/schema.py index 0940648cde..4af5679cf5 100644 --- a/commitizen/commands/schema.py +++ b/commitizen/commands/schema.py @@ -7,7 +7,7 @@ class Schema: def __init__(self, config: BaseConfig, *args): self.config: BaseConfig = config - self.cz = factory.commiter_factory(self.config) + self.cz = factory.committer_factory(self.config) def __call__(self): out.write(self.cz.schema()) diff --git a/commitizen/factory.py b/commitizen/factory.py index 09af5fd0f7..b5d665b65e 100644 --- a/commitizen/factory.py +++ b/commitizen/factory.py @@ -4,7 +4,7 @@ from commitizen.exceptions import NoCommitizenFoundException -def commiter_factory(config: BaseConfig) -> BaseCommitizen: +def committer_factory(config: BaseConfig) -> BaseCommitizen: """Return the correct commitizen existing in the registry.""" name: str = config.settings["name"] try: diff --git a/commitizen/version_schemes.py b/commitizen/version_schemes.py index 2486be58c8..84ded9316e 100644 --- a/commitizen/version_schemes.py +++ b/commitizen/version_schemes.py @@ -19,7 +19,7 @@ else: import importlib_metadata as metadata -from packaging.version import InvalidVersion # noqa: F401: Rexpose the common exception +from packaging.version import InvalidVersion # noqa: F401: expose the common exception from packaging.version import Version as _BaseVersion from commitizen.defaults import MAJOR, MINOR, PATCH, Settings @@ -78,7 +78,7 @@ def is_prerelease(self) -> bool: @property def prerelease(self) -> str | None: - """The prelease potion of the version is this is a prerelease.""" + """The prerelease potion of the version is this is a prerelease.""" raise NotImplementedError("must be implemented") @property @@ -142,7 +142,7 @@ def bump( prerelease: The type of prerelease, if Any is_local_version: Whether to increment the local version instead exact_increment: Treat the increment and prerelease arguments explicitly. Disables logic - that attempts to deduce the correct increment when a prelease suffix is present. + that attempts to deduce the correct increment when a prerelease suffix is present. """ @@ -351,7 +351,7 @@ class SemVer2(SemVer): See: https://semver.org/spec/v2.0.0.html """ - _STD_PRELEASES = { + _STD_PRERELEASES = { "a": "alpha", "b": "beta", } @@ -359,7 +359,7 @@ class SemVer2(SemVer): @property def prerelease(self) -> str | None: if self.is_prerelease and self.pre: - prerelease_type = self._STD_PRELEASES.get(self.pre[0], self.pre[0]) + prerelease_type = self._STD_PRERELEASES.get(self.pre[0], self.pre[0]) return f"{prerelease_type}.{self.pre[1]}" return None diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index b5ff7e6edb..f3c1ba923b 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -209,7 +209,7 @@ def test_bump_command_increment_option( @pytest.mark.usefixtures("tmp_commitizen_project") -def test_bump_command_prelease(mocker: MockFixture): +def test_bump_command_prerelease(mocker: MockFixture): create_file_and_commit("feat: location") # Create an alpha pre-release. @@ -281,7 +281,7 @@ def test_bump_command_prelease(mocker: MockFixture): @pytest.mark.usefixtures("tmp_commitizen_project") -def test_bump_command_prelease_increment(mocker: MockFixture): +def test_bump_command_prerelease_increment(mocker: MockFixture): # FINAL RELEASE create_file_and_commit("fix: location") @@ -317,7 +317,7 @@ def test_bump_command_prelease_increment(mocker: MockFixture): @pytest.mark.usefixtures("tmp_commitizen_project") -def test_bump_command_prelease_exact_mode(mocker: MockFixture): +def test_bump_command_prerelease_exact_mode(mocker: MockFixture): # PRERELEASE create_file_and_commit("feat: location") @@ -437,7 +437,7 @@ def test_bump_on_git_with_hooks_no_verify_enabled(mocker: MockFixture): @pytest.mark.usefixtures("tmp_commitizen_project") -def test_bump_when_bumpping_is_not_support(mocker: MockFixture): +def test_bump_when_bumping_is_not_support(mocker: MockFixture): create_file_and_commit( "feat: new user interface\n\nBREAKING CHANGE: age is no longer supported" ) @@ -1062,7 +1062,7 @@ def test_bump_use_version_provider(mocker: MockFixture): mock.set_version.assert_called_once_with("0.0.1") -def test_bump_command_prelease_scheme_via_cli( +def test_bump_command_prerelease_scheme_via_cli( tmp_commitizen_project_initial, mocker: MockFixture ): tmp_commitizen_project = tmp_commitizen_project_initial() @@ -1101,7 +1101,7 @@ def test_bump_command_prelease_scheme_via_cli( assert "0.2.0" in f.read() -def test_bump_command_prelease_scheme_via_config( +def test_bump_command_prerelease_scheme_via_config( tmp_commitizen_project_initial, mocker: MockFixture ): tmp_commitizen_project = tmp_commitizen_project_initial( @@ -1145,7 +1145,7 @@ def test_bump_command_prelease_scheme_via_config( assert "0.2.0" in f.read() -def test_bump_command_prelease_scheme_check_old_tags( +def test_bump_command_prerelease_scheme_check_old_tags( tmp_commitizen_project_initial, mocker: MockFixture ): tmp_commitizen_project = tmp_commitizen_project_initial( @@ -1285,7 +1285,7 @@ def test_bump_command_version_scheme_priority_over_version_type(mocker: MockFixt ), ), ) -def test_bump_template_option_precedance( +def test_bump_template_option_precedence( mocker: MockFixture, tmp_commitizen_project: Path, any_changelog_format: ChangelogFormat, @@ -1327,7 +1327,7 @@ def test_bump_template_option_precedance( assert out == expected -def test_bump_template_extras_precedance( +def test_bump_template_extras_precedence( mocker: MockFixture, tmp_commitizen_project: Path, any_changelog_format: ChangelogFormat, diff --git a/tests/commands/test_changelog_command.py b/tests/commands/test_changelog_command.py index f794b8d9f3..12a2e04b42 100644 --- a/tests/commands/test_changelog_command.py +++ b/tests/commands/test_changelog_command.py @@ -1481,7 +1481,7 @@ def test_changelog_from_current_version_tag_with_nonversion_tag( ), ), ) -def test_changelog_template_option_precedance( +def test_changelog_template_option_precedence( mocker: MockFixture, tmp_commitizen_project: Path, any_changelog_format: ChangelogFormat, @@ -1523,7 +1523,7 @@ def test_changelog_template_option_precedance( assert out == expected -def test_changelog_template_extras_precedance( +def test_changelog_template_extras_precedence( mocker: MockFixture, tmp_commitizen_project: Path, mock_plugin: BaseCommitizen, diff --git a/tests/commands/test_check_command.py b/tests/commands/test_check_command.py index f1db446190..d95a173d8a 100644 --- a/tests/commands/test_check_command.py +++ b/tests/commands/test_check_command.py @@ -365,7 +365,7 @@ def test_check_command_with_pipe_message_and_failed(mocker: MockFixture): assert "commit validation: failed!" in str(excinfo.value) -def test_check_command_with_comment_in_messege_file(mocker: MockFixture, capsys): +def test_check_command_with_comment_in_message_file(mocker: MockFixture, capsys): testargs = ["cz", "check", "--commit-msg-file", "some_file"] mocker.patch.object(sys, "argv", testargs) mocker.patch( diff --git a/tests/commands/test_init_command.py b/tests/commands/test_init_command.py index ea18e89a2b..f617c51d8f 100644 --- a/tests/commands/test_init_command.py +++ b/tests/commands/test_init_command.py @@ -183,7 +183,7 @@ def check_pre_commit_config(expected: list[dict[str, Any]]): @pytest.mark.usefixtures("pre_commit_installed") class TestPreCommitCases: - def test_no_existing_pre_commit_conifg(_, default_choice, tmpdir, config): + def test_no_existing_pre_commit_config(_, default_choice, tmpdir, config): with tmpdir.as_cwd(): commands.Init(config)() check_cz_config(default_choice) diff --git a/tests/conftest.py b/tests/conftest.py index 3d88f19b12..60c586f2e6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -232,7 +232,7 @@ def message(self, answers: dict) -> str: @pytest.fixture def mock_plugin(mocker: MockerFixture, config: BaseConfig) -> BaseCommitizen: mock = MockPlugin(config) - mocker.patch("commitizen.factory.commiter_factory", return_value=mock) + mocker.patch("commitizen.factory.committer_factory", return_value=mock) return mock diff --git a/tests/test_bump_update_version_in_files.py b/tests/test_bump_update_version_in_files.py index 850b59c166..c14e4ad1cb 100644 --- a/tests/test_bump_update_version_in_files.py +++ b/tests/test_bump_update_version_in_files.py @@ -197,7 +197,7 @@ def test_file_version_inconsistent_error( assert expected_msg in str(excinfo.value) -def test_multiplt_versions_to_bump( +def test_multiple_versions_to_bump( multiple_versions_to_update_poetry_lock, file_regression ): old_version = "1.2.9" @@ -216,7 +216,7 @@ def test_update_version_in_globbed_files(commitizen_config_file, file_regression print(commitizen_config_file, other) copyfile(commitizen_config_file, other) - # Prepend full ppath as test assume absolute paths or cwd-relative + # Prepend full path as test assume absolute paths or cwd-relative version_files = [commitizen_config_file.dirpath("*.toml")] bump.update_version_in_files( diff --git a/tests/test_changelog_format_asciidoc.py b/tests/test_changelog_format_asciidoc.py index 59ca56191e..cc81a24f2a 100644 --- a/tests/test_changelog_format_asciidoc.py +++ b/tests/test_changelog_format_asciidoc.py @@ -160,7 +160,7 @@ def test_parse_title_type_of_line( pytest.param(CHANGELOG_D, EXPECTED_D, id="D"), ), ) -def test_get_matadata( +def test_get_metadata( tmp_path: Path, format: AsciiDoc, content: str, expected: Metadata ): changelog = tmp_path / format.default_changelog_file diff --git a/tests/test_changelog_format_markdown.py b/tests/test_changelog_format_markdown.py index e1f0d67311..1abc63f29f 100644 --- a/tests/test_changelog_format_markdown.py +++ b/tests/test_changelog_format_markdown.py @@ -160,7 +160,7 @@ def test_parse_title_type_of_line( pytest.param(CHANGELOG_D, EXPECTED_D, id="D"), ), ) -def test_get_matadata( +def test_get_metadata( tmp_path: Path, format: Markdown, content: str, expected: Metadata ): changelog = tmp_path / format.default_changelog_file diff --git a/tests/test_changelog_format_restructuredtext.py b/tests/test_changelog_format_restructuredtext.py index 74b6b736f9..14bc15ec09 100644 --- a/tests/test_changelog_format_restructuredtext.py +++ b/tests/test_changelog_format_restructuredtext.py @@ -311,7 +311,7 @@ def format_with_tags(config: BaseConfig, request) -> RestructuredText: @pytest.mark.parametrize("content, expected", CASES) -def test_get_matadata( +def test_get_metadata( tmp_path: Path, format: RestructuredText, content: str, expected: Metadata ): changelog = tmp_path / format.default_changelog_file diff --git a/tests/test_changelog_format_textile.py b/tests/test_changelog_format_textile.py index eb03484ad5..812fa6bf60 100644 --- a/tests/test_changelog_format_textile.py +++ b/tests/test_changelog_format_textile.py @@ -153,7 +153,7 @@ def test_parse_title_type_of_line( pytest.param(CHANGELOG_D, EXPECTED_D, id="D"), ), ) -def test_get_matadata( +def test_get_metadata( tmp_path: Path, format: Textile, content: str, expected: Metadata ): changelog = tmp_path / format.default_changelog_file diff --git a/tests/test_cz_customize.py b/tests/test_cz_customize.py index 210c8b6774..933b1aa065 100644 --- a/tests/test_cz_customize.py +++ b/tests/test_cz_customize.py @@ -473,16 +473,16 @@ def test_answer(config): cz = CustomizeCommitsCz(config) answers = { "change_type": "feature", - "message": "this feature enaable customize through config file", + "message": "this feature enable customize through config file", "show_message": True, } message = cz.message(answers) - assert message == "feature: this feature enaable customize through config file" + assert message == "feature: this feature enable customize through config file" cz = CustomizeCommitsCz(config) answers = { "change_type": "feature", - "message": "this feature enaable customize through config file", + "message": "this feature enable customize through config file", "show_message": False, } message = cz.message(answers) diff --git a/tests/test_factory.py b/tests/test_factory.py index 390742f467..d81a84b3d5 100644 --- a/tests/test_factory.py +++ b/tests/test_factory.py @@ -28,7 +28,7 @@ class OtherPlugin: def test_factory(): config = BaseConfig() config.settings.update({"name": defaults.DEFAULT_SETTINGS["name"]}) - r = factory.commiter_factory(config) + r = factory.committer_factory(config) assert isinstance(r, BaseCommitizen) @@ -36,7 +36,7 @@ def test_factory_fails(): config = BaseConfig() config.settings.update({"name": "Nothing"}) with pytest.raises(NoCommitizenFoundException) as excinfo: - factory.commiter_factory(config) + factory.committer_factory(config) assert "The committer has not been found in the system." in str(excinfo) diff --git a/tests/test_version_scheme_pep440.py b/tests/test_version_scheme_pep440.py index 6b1f621cb8..a983dad14a 100644 --- a/tests/test_version_scheme_pep440.py +++ b/tests/test_version_scheme_pep440.py @@ -144,7 +144,7 @@ (("3.1.4a0", "MAJOR", "alpha", 0, None), "4.0.0a0"), ] -excact_cases = [ +exact_cases = [ (("1.0.0", "PATCH", None, 0, None), "1.0.1"), (("1.0.0", "MINOR", None, 0, None), "1.1.0"), # with exact_increment=False: "1.0.0b0" @@ -213,7 +213,7 @@ def test_bump_pep440_version(test_input, expected): ) -@pytest.mark.parametrize("test_input, expected", excact_cases) +@pytest.mark.parametrize("test_input, expected", exact_cases) def test_bump_pep440_version_force(test_input, expected): current_version = test_input[0] increment = test_input[1] diff --git a/tests/test_version_scheme_semver.py b/tests/test_version_scheme_semver.py index 71d5e5876c..8785717a34 100644 --- a/tests/test_version_scheme_semver.py +++ b/tests/test_version_scheme_semver.py @@ -83,7 +83,7 @@ (("1.0.0-alpha1", None, "alpha", 0, None), "1.0.0-a2"), ] -excact_cases = [ +exact_cases = [ (("1.0.0", "PATCH", None, 0, None), "1.0.1"), (("1.0.0", "MINOR", None, 0, None), "1.1.0"), # with exact_increment=False: "1.0.0-b0" @@ -144,7 +144,7 @@ def test_bump_semver_version(test_input, expected): ) -@pytest.mark.parametrize("test_input, expected", excact_cases) +@pytest.mark.parametrize("test_input, expected", exact_cases) def test_bump_semver_version_force(test_input, expected): current_version = test_input[0] increment = test_input[1] From 2cb2daf39b78d0796ff39cc2912047ea6ea32e5d Mon Sep 17 00:00:00 2001 From: Tim Hsiung <bear890707@gmail.com> Date: Thu, 15 May 2025 19:13:20 +0800 Subject: [PATCH 110/159] docs(pull_request_template): make the checklist holistic (#1408) --- .github/pull_request_template.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0064604fba..e28480e5b9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -9,12 +9,24 @@ Please fill in the following content to let us know better about this change. ## Checklist +- [ ] I have read the [contributing guidelines](https://commitizen-tools.github.io/commitizen/contributing/) + +### Code Changes + - [ ] Add test cases to all the changes you introduce -- [ ] Run `poetry all` locally to ensure this change passes linter check and test -- [ ] Test the changes on the local machine manually +- [ ] Run `poetry all` locally to ensure this change passes linter check and tests +- [ ] Manually test the changes: + - [ ] Verify the feature/bug fix works as expected in real-world scenarios + - [ ] Test edge cases and error conditions + - [ ] Ensure backward compatibility is maintained + - [ ] Document any manual testing steps performed - [ ] Update the documentation for the changes -## Expected behavior +### Documentation Changes + +- [ ] Run `poetry doc` locally to ensure the documentation pages renders correctly + +## Expected Behavior <!-- A clear and concise description of what you expected to happen --> @@ -25,5 +37,5 @@ Please fill in the following content to let us know better about this change. 3. ... --> -## Additional context +## Additional Context <!-- Add any other RELATED ISSUE, context or screenshots about the pull request here. --> From 46c5ecc79ec7b3e1006a33cd69e1f576a5ba6379 Mon Sep 17 00:00:00 2001 From: "Axel H." <noirbizarre@users.noreply.github.com> Date: Fri, 16 May 2025 04:50:15 +0200 Subject: [PATCH 111/159] fix(bump): don't fail if an invalid version tag is present (fix #1410) (#1418) --- commitizen/tags.py | 12 +++++---- tests/commands/test_bump_command.py | 32 ++++++++++++++++++++++++ tests/commands/test_changelog_command.py | 8 +++--- tests/test_changelog.py | 2 +- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/commitizen/tags.py b/commitizen/tags.py index 5724bb2574..2b9a4b091a 100644 --- a/commitizen/tags.py +++ b/commitizen/tags.py @@ -113,6 +113,10 @@ def _format_regex(self, tag_pattern: str, star: bool = False) -> str: format_regex = format_regex.replace(pattern, regex) return format_regex + def _version_tag_error(self, tag: str) -> str: + """Format the error message for an invalid version tag""" + return f"Invalid version tag: '{tag}' does not match any configured tag format" + def is_version_tag(self, tag: str | GitTag, warn: bool = False) -> bool: """ True if a given tag is a legit version tag. @@ -120,9 +124,9 @@ def is_version_tag(self, tag: str | GitTag, warn: bool = False) -> bool: if `warn` is `True`, it will print a warning message if the tag is not a version tag. """ tag = tag.name if isinstance(tag, GitTag) else tag - is_legit = any(regex.match(tag) for regex in self.version_regexes) + is_legit = any(regex.fullmatch(tag) for regex in self.version_regexes) if warn and not is_legit and not self.is_ignored_tag(tag): - out.warn(f"InvalidVersion {tag} doesn't match any configured tag format") + out.warn(self._version_tag_error(tag)) return is_legit def is_ignored_tag(self, tag: str | GitTag) -> bool: @@ -146,9 +150,7 @@ def extract_version(self, tag: GitTag) -> Version: m for regex in self.version_regexes if (m := regex.fullmatch(tag.name)) ) if not (m := next(candidates, None)): - raise InvalidVersion( - f"Invalid version tag: '{tag.name}' does not match any configured tag format" - ) + raise InvalidVersion(self._version_tag_error(tag.name)) if "version" in m.groupdict(): return self.scheme(m.group("version")) diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index f3c1ba923b..e15539d8a7 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -1656,3 +1656,35 @@ def test_bump_detect_legacy_tags_from_scm( cli.main() assert git.tag_exist("v0.4.3") + + +def test_bump_warn_but_dont_fail_on_invalid_tags( + tmp_commitizen_project: py.path.local, + mocker: MockFixture, + capsys: pytest.CaptureFixture, +): + project_root = Path(tmp_commitizen_project) + tmp_commitizen_cfg_file = project_root / "pyproject.toml" + tmp_commitizen_cfg_file.write_text( + "\n".join( + [ + "[tool.commitizen]", + 'version_provider = "scm"', + 'version_scheme = "pep440"', + ] + ), + ) + create_file_and_commit("feat: new file") + create_tag("0.4.2") + create_file_and_commit("feat: new file") + create_tag("0.4.3.deadbeaf") + create_file_and_commit("feat: new file") + + testargs = ["cz", "bump", "--increment", "patch", "--changelog"] + mocker.patch.object(sys, "argv", testargs) + cli.main() + + _, err = capsys.readouterr() + + assert err.count("Invalid version tag: '0.4.3.deadbeaf'") == 1 + assert git.tag_exist("0.4.3") diff --git a/tests/commands/test_changelog_command.py b/tests/commands/test_changelog_command.py index 12a2e04b42..0eb29cdb04 100644 --- a/tests/commands/test_changelog_command.py +++ b/tests/commands/test_changelog_command.py @@ -1788,13 +1788,13 @@ def test_changelog_ignored_tags( out = open(changelog_path).read() _, err = capsys.readouterr() assert "## ignore-0.1.0" not in out - assert "InvalidVersion ignore-0.1.0" not in err + assert "Invalid version tag: 'ignore-0.1.0'" not in err assert "## ignored" not in out - assert "InvalidVersion ignored" not in err + assert "Invalid version tag: 'ignored'" not in err assert "## not-ignored" not in out - assert "InvalidVersion not-ignored" in err + assert "Invalid version tag: 'not-ignored'" in err assert "## v0.3.0" in out - assert "InvalidVersion v0.3.0" not in err + assert "Invalid version tag: 'v0.3.0'" not in err def test_changelog_template_extra_quotes( diff --git a/tests/test_changelog.py b/tests/test_changelog.py index 67ba273b5c..067adb4a91 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -1635,7 +1635,7 @@ def test_tags_rules_get_version_tags(capsys: pytest.CaptureFixture): } captured = capsys.readouterr() - assert captured.err.count("InvalidVersion") == 2 + assert captured.err.count("Invalid version tag:") == 2 assert captured.err.count("not-a-version") == 2 From a0cc4901b0faaced74c713a9e355555fc4de0880 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 02:50:37 +0000 Subject: [PATCH 112/159] =?UTF-8?q?bump:=20version=204.7.0=20=E2=86=92=204?= =?UTF-8?q?.7.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ad78003cf3..df32532598 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.7.0 # automatically updated by Commitizen + rev: v4.7.1 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ca4f2aa70..486ee8dcb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.7.1 (2025-05-16) + +### Fix + +- **bump**: don't fail if an invalid version tag is present (fix #1410) (#1418) + ## v4.7.0 (2025-05-10) ### Feat diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 8355eb42a9..cc72154c1b 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.7.0" +__version__ = "4.7.1" diff --git a/pyproject.toml b/pyproject.toml index 02c6d12762..734d5127be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.7.0" +version = "4.7.1" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.7.0" +version = "4.7.1" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 94c02b3faf89cacf7186ad8a84e9200ede851574 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sat, 17 May 2025 02:28:08 +0800 Subject: [PATCH 113/159] refactor(default): capitalize all constants and remove unnecessary variable --- commitizen/bump.py | 8 ++++---- commitizen/commands/changelog.py | 2 +- commitizen/commands/init.py | 4 ++-- commitizen/config/__init__.py | 2 +- .../conventional_commits.py | 8 ++++---- commitizen/cz/customize/customize.py | 8 ++++---- commitizen/defaults.py | 19 +++++++++---------- tests/test_conf.py | 4 ++-- 8 files changed, 27 insertions(+), 28 deletions(-) diff --git a/commitizen/bump.py b/commitizen/bump.py index adfab64cb0..76a8e15893 100644 --- a/commitizen/bump.py +++ b/commitizen/bump.py @@ -8,7 +8,7 @@ from string import Template from typing import cast -from commitizen.defaults import MAJOR, MINOR, PATCH, bump_message, encoding +from commitizen.defaults import BUMP_MESSAGE, ENCODING, MAJOR, MINOR, PATCH from commitizen.exceptions import CurrentVersionNotFoundError from commitizen.git import GitCommit, smart_open from commitizen.version_schemes import Increment, Version @@ -64,7 +64,7 @@ def update_version_in_files( files: list[str], *, check_consistency: bool = False, - encoding: str = encoding, + encoding: str = ENCODING, ) -> list[str]: """Change old version to the new one in every file given. @@ -121,7 +121,7 @@ def _bump_with_regex( current_version: str, new_version: str, regex: str, - encoding: str = encoding, + encoding: str = ENCODING, ) -> tuple[bool, str]: current_version_found = False lines = [] @@ -148,6 +148,6 @@ def create_commit_message( message_template: str | None = None, ) -> str: if message_template is None: - message_template = bump_message + message_template = BUMP_MESSAGE t = Template(message_template) return t.safe_substitute(current_version=current_version, new_version=new_version) diff --git a/commitizen/commands/changelog.py b/commitizen/commands/changelog.py index fb6f76a6b7..0e4efabfa1 100644 --- a/commitizen/commands/changelog.py +++ b/commitizen/commands/changelog.py @@ -78,7 +78,7 @@ def __init__(self, config: BaseConfig, args): self.change_type_order = ( self.config.settings.get("change_type_order") or self.cz.change_type_order - or defaults.change_type_order + or defaults.CHANGE_TYPE_ORDER ) self.rev_range = args.get("rev_range") self.tag_format: str = ( diff --git a/commitizen/commands/init.py b/commitizen/commands/init.py index 20277399d8..0eb3d99d17 100644 --- a/commitizen/commands/init.py +++ b/commitizen/commands/init.py @@ -11,7 +11,7 @@ from commitizen.__version__ import __version__ from commitizen.config import BaseConfig, JsonConfig, TomlConfig, YAMLConfig from commitizen.cz import registry -from commitizen.defaults import DEFAULT_SETTINGS, config_files +from commitizen.defaults import CONFIG_FILES, DEFAULT_SETTINGS from commitizen.exceptions import InitFailedError, NoAnswersError from commitizen.git import get_latest_tag_name, get_tag_names, smart_open from commitizen.version_schemes import KNOWN_SCHEMES, Version, get_version_scheme @@ -165,7 +165,7 @@ def _ask_config_path(self) -> str: name: str = questionary.select( "Please choose a supported config file: ", - choices=config_files, + choices=CONFIG_FILES, default=default_path, style=self.cz.style, ).unsafe_ask() diff --git a/commitizen/config/__init__.py b/commitizen/config/__init__.py index f3720bb1b3..9dfd591c40 100644 --- a/commitizen/config/__init__.py +++ b/commitizen/config/__init__.py @@ -28,7 +28,7 @@ def read_cfg(filepath: str | None = None) -> BaseConfig: cfg_paths = ( path / Path(filename) for path in cfg_search_paths - for filename in defaults.config_files + for filename in defaults.CONFIG_FILES ) for filename in cfg_paths: diff --git a/commitizen/cz/conventional_commits/conventional_commits.py b/commitizen/cz/conventional_commits/conventional_commits.py index c7b88258cb..af29a209fc 100644 --- a/commitizen/cz/conventional_commits/conventional_commits.py +++ b/commitizen/cz/conventional_commits/conventional_commits.py @@ -28,9 +28,9 @@ def parse_subject(text): class ConventionalCommitsCz(BaseCommitizen): - bump_pattern = defaults.bump_pattern - bump_map = defaults.bump_map - bump_map_major_version_zero = defaults.bump_map_major_version_zero + bump_pattern = defaults.BUMP_PATTERN + bump_map = defaults.BUMP_MAP + bump_map_major_version_zero = defaults.BUMP_MAP_MAJOR_VERSION_ZERO commit_parser = r"^((?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?|\w+!):\s(?P<message>.*)?" # noqa change_type_map = { "feat": "Feat", @@ -38,7 +38,7 @@ class ConventionalCommitsCz(BaseCommitizen): "refactor": "Refactor", "perf": "Perf", } - changelog_pattern = defaults.bump_pattern + changelog_pattern = defaults.BUMP_PATTERN def questions(self) -> Questions: questions: Questions = [ diff --git a/commitizen/cz/customize/customize.py b/commitizen/cz/customize/customize.py index d53ae29f1b..afa35e92de 100644 --- a/commitizen/cz/customize/customize.py +++ b/commitizen/cz/customize/customize.py @@ -21,10 +21,10 @@ class CustomizeCommitsCz(BaseCommitizen): - bump_pattern = defaults.bump_pattern - bump_map = defaults.bump_map - bump_map_major_version_zero = defaults.bump_map_major_version_zero - change_type_order = defaults.change_type_order + bump_pattern = defaults.BUMP_PATTERN + bump_map = defaults.BUMP_MAP + bump_map_major_version_zero = defaults.BUMP_MAP_MAJOR_VERSION_ZERO + change_type_order = defaults.CHANGE_TYPE_ORDER def __init__(self, config: BaseConfig): super().__init__(config) diff --git a/commitizen/defaults.py b/commitizen/defaults.py index 0b78e1b0bb..0b6c28e6a9 100644 --- a/commitizen/defaults.py +++ b/commitizen/defaults.py @@ -60,8 +60,7 @@ class Settings(TypedDict, total=False): extras: dict[str, Any] -name: str = "cz_conventional_commits" -config_files: list[str] = [ +CONFIG_FILES: list[str] = [ "pyproject.toml", ".cz.toml", ".cz.json", @@ -70,10 +69,10 @@ class Settings(TypedDict, total=False): "cz.yaml", "cz.toml", ] -encoding: str = "utf-8" +ENCODING = "utf-8" DEFAULT_SETTINGS: Settings = { - "name": name, + "name": "cz_conventional_commits", "version": None, "version_files": [], "version_provider": "commitizen", @@ -102,7 +101,7 @@ class Settings(TypedDict, total=False): "pre_bump_hooks": [], "post_bump_hooks": [], "prerelease_offset": 0, - "encoding": encoding, + "encoding": ENCODING, "always_signoff": False, "template": None, # default provided by plugin "extras": {}, @@ -114,8 +113,8 @@ class Settings(TypedDict, total=False): CHANGELOG_FORMAT = "markdown" -bump_pattern = r"^((BREAKING[\-\ ]CHANGE|\w+)(\(.+\))?!?):" -bump_map = OrderedDict( +BUMP_PATTERN = r"^((BREAKING[\-\ ]CHANGE|\w+)(\(.+\))?!?):" +BUMP_MAP = OrderedDict( ( (r"^.+!$", MAJOR), (r"^BREAKING[\-\ ]CHANGE", MAJOR), @@ -125,7 +124,7 @@ class Settings(TypedDict, total=False): (r"^perf", PATCH), ) ) -bump_map_major_version_zero = OrderedDict( +BUMP_MAP_MAJOR_VERSION_ZERO = OrderedDict( ( (r"^.+!$", MINOR), (r"^BREAKING[\-\ ]CHANGE", MINOR), @@ -135,8 +134,8 @@ class Settings(TypedDict, total=False): (r"^perf", PATCH), ) ) -change_type_order = ["BREAKING CHANGE", "Feat", "Fix", "Refactor", "Perf"] -bump_message = "bump: version $current_version → $new_version" +CHANGE_TYPE_ORDER = ["BREAKING CHANGE", "Feat", "Fix", "Refactor", "Perf"] +BUMP_MESSAGE = "bump: version $current_version → $new_version" def get_tag_regexes( diff --git a/tests/test_conf.py b/tests/test_conf.py index 80d58983e7..f89a0049f4 100644 --- a/tests/test_conf.py +++ b/tests/test_conf.py @@ -151,7 +151,7 @@ def test_find_git_project_root(tmpdir): @pytest.mark.parametrize( - "config_files_manager", defaults.config_files.copy(), indirect=True + "config_files_manager", defaults.CONFIG_FILES.copy(), indirect=True ) def test_set_key(config_files_manager): _conf = config.read_cfg() @@ -162,7 +162,7 @@ def test_set_key(config_files_manager): class TestReadCfg: @pytest.mark.parametrize( - "config_files_manager", defaults.config_files.copy(), indirect=True + "config_files_manager", defaults.CONFIG_FILES.copy(), indirect=True ) def test_load_conf(_, config_files_manager): cfg = config.read_cfg() From 8d573069ff591f909c9b9725da769fbab05d5bb0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Sun, 18 May 2025 15:17:25 +0000 Subject: [PATCH 114/159] =?UTF-8?q?bump:=20version=204.7.1=20=E2=86=92=204?= =?UTF-8?q?.7.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df32532598..7497946571 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.7.1 # automatically updated by Commitizen + rev: v4.7.2 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 486ee8dcb2..de772c6a75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.7.2 (2025-05-18) + +### Refactor + +- **default**: capitalize all constants and remove unnecessary variable + ## v4.7.1 (2025-05-16) ### Fix diff --git a/commitizen/__version__.py b/commitizen/__version__.py index cc72154c1b..98c926d162 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.7.1" +__version__ = "4.7.2" diff --git a/pyproject.toml b/pyproject.toml index 734d5127be..8d9214615a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.7.1" +version = "4.7.2" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.7.1" +version = "4.7.2" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 767c5fede43c8f8858778b3e7f372c532495c48e Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Mon, 19 May 2025 20:17:08 +0800 Subject: [PATCH 115/159] docs(ISSUE_TEMPLATE): correct labels --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/documentation.yml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9ed5badae4..9d597c7b36 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,7 +1,7 @@ name: 🛠 Bug report description: Create a report to help us improve title: Good bug title tells us about precise symptom, not about the root cause. -labels: [bug] +labels: ['type: bug'] body: - type: textarea id: description diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml index 51d378b747..8fe40136c3 100644 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -1,7 +1,7 @@ name: 📖 Documentation description: Suggest an improvement for the documentation of this project title: Content to be added or fixed -labels: [documentation] +labels: ['type: documentation'] body: - type: checkboxes id: type diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 7d67eb18af..4bd19b9b3a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,7 +1,7 @@ name: 🚀 Feature request description: Suggest an idea for this project title: "<One feature request per issue>" -labels: [feature] +labels: ['type: feature'] body: - type: textarea id: description From 2982c6e5e31c9fd171e364c2a2866dc109303c20 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Mon, 19 May 2025 20:32:54 +0800 Subject: [PATCH 116/159] docs(label_issues): add logics for adding os related labels --- .github/workflows/label_issues.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/label_issues.yml b/.github/workflows/label_issues.yml index 45ca450f89..ec18d98be2 100644 --- a/.github/workflows/label_issues.yml +++ b/.github/workflows/label_issues.yml @@ -15,9 +15,31 @@ jobs: - uses: actions/github-script@v7 with: script: | - github.rest.issues.addLabels({ + const issue = await github.rest.issues.get({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - labels: ['issue-status: needs-triage'] - }) + }); + + const body = issue.data.body || ''; + + const osLabels = new Set(); // Use a Set to avoid duplicates + + if (body.includes('Operating System: Darwin')) { + osLabels.add('os: macOS'); + } + + if (body.includes('Operating System: Linux')) { + osLabels.add('os: Linux'); + } + + if (body.includes('Operating System: Windows')) { + osLabels.add('os: Windows'); + } + + await github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['issue-status: needs-triage', ...osLabels], + }); From 49f4d2b1a68de7e9b78cd39497483787de892db2 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Mon, 19 May 2025 21:13:19 +0800 Subject: [PATCH 117/159] docs(label_issues): add comment --- .github/workflows/label_issues.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/label_issues.yml b/.github/workflows/label_issues.yml index ec18d98be2..e74a36c4bd 100644 --- a/.github/workflows/label_issues.yml +++ b/.github/workflows/label_issues.yml @@ -25,6 +25,7 @@ jobs: const osLabels = new Set(); // Use a Set to avoid duplicates + // Parse the "Environment" section, output of `cz version --report` if (body.includes('Operating System: Darwin')) { osLabels.add('os: macOS'); } From e3b4465261cfe9c541cdd1174adae53bc7e309cb Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Mon, 19 May 2025 22:05:33 +0800 Subject: [PATCH 118/159] docs(bug_report): add fallback command if cz version --report is not available --- .github/ISSUE_TEMPLATE/bug_report.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9d597c7b36..5eac443f29 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -53,6 +53,14 @@ body: ```bash cz version --report ``` + + If `cz version --report` is not available, please run the following commands to retrieve your environment information: + + ```bash + echo "Commitizen Version: $(cz version)" + echo "Python Version: $(python3 -c 'import sys; print(sys.version)')" + echo "Operating System: $(python3 -c 'import platform; print(platform.system())')" + ``` placeholder: | Commitizen Version: 4.0.0 Python Version: 3.13.3 (main, Apr 8 2025, 13:54:08) [Clang 16.0.0 (clang-1600.0.26.6)] From 87873f99d89b3da65388d1a93827a1536e29348e Mon Sep 17 00:00:00 2001 From: Jani Jappinen <2580412+jappja@users.noreply.github.com> Date: Thu, 15 May 2025 09:19:20 +0000 Subject: [PATCH 119/159] feat(cli): add --tag-format argument to changelog command Changelog command already checks "tag_format" argument but cli support was missing. --- commitizen/cli.py | 4 ++++ ...angelog_command_shows_description_when_use_help_option.txt | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/commitizen/cli.py b/commitizen/cli.py index 72d824380d..d08afc6706 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -450,6 +450,10 @@ def __call__( "help": "Export the changelog template into this file instead of rendering it", }, *deepcopy(tpl_arguments), + { + "name": "--tag-format", + "help": "The format of the tag, wrap around simple quotes", + }, ], }, { diff --git a/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt b/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt index 461eb2edd6..91b7f389b5 100644 --- a/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt +++ b/tests/commands/test_changelog_command/test_changelog_command_shows_description_when_use_help_option.txt @@ -3,7 +3,7 @@ usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME] [--start-rev START_REV] [--merge-prerelease] [--version-scheme {pep440,semver,semver2}] [--export-template EXPORT_TEMPLATE] [--template TEMPLATE] - [--extra EXTRA] + [--extra EXTRA] [--tag-format TAG_FORMAT] [rev_range] generate changelog (note that it will overwrite existing file) @@ -37,3 +37,5 @@ options: changelog template file name (relative to the current working directory) --extra, -e EXTRA a changelog extra variable (in the form 'key=value') + --tag-format TAG_FORMAT + The format of the tag, wrap around simple quotes From dbdfa60e1f95eccd9eb5d22e20f854043b2a8d37 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 15:03:32 +0000 Subject: [PATCH 120/159] docs(cli/screenshots): update CLI screenshots [skip ci] --- docs/images/cli_help/cz_changelog___help.svg | 194 ++++++++++--------- 1 file changed, 101 insertions(+), 93 deletions(-) diff --git a/docs/images/cli_help/cz_changelog___help.svg b/docs/images/cli_help/cz_changelog___help.svg index 1160ccf6cf..69304f40cf 100644 --- a/docs/images/cli_help/cz_changelog___help.svg +++ b/docs/images/cli_help/cz_changelog___help.svg @@ -1,4 +1,4 @@ -<svg class="rich-terminal" viewBox="0 0 994 1050.4" xmlns="http://www.w3.org/2000/svg"> +<svg class="rich-terminal" viewBox="0 0 994 1099.2" xmlns="http://www.w3.org/2000/svg"> <!-- Generated with Rich https://www.textualize.io --> <style> @@ -19,202 +19,210 @@ font-weight: 700; } - .terminal-1106739011-matrix { + .terminal-2926696453-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1106739011-title { + .terminal-2926696453-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-1106739011-r1 { fill: #c5c8c6 } -.terminal-1106739011-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-1106739011-r3 { fill: #68a0b3;font-weight: bold } -.terminal-1106739011-r4 { fill: #98a84b } + .terminal-2926696453-r1 { fill: #c5c8c6 } +.terminal-2926696453-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-2926696453-r3 { fill: #68a0b3;font-weight: bold } +.terminal-2926696453-r4 { fill: #98a84b } </style> <defs> - <clipPath id="terminal-1106739011-clip-terminal"> - <rect x="0" y="0" width="975.0" height="999.4" /> + <clipPath id="terminal-2926696453-clip-terminal"> + <rect x="0" y="0" width="975.0" height="1048.2" /> </clipPath> - <clipPath id="terminal-1106739011-line-0"> + <clipPath id="terminal-2926696453-line-0"> <rect x="0" y="1.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-1"> +<clipPath id="terminal-2926696453-line-1"> <rect x="0" y="25.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-2"> +<clipPath id="terminal-2926696453-line-2"> <rect x="0" y="50.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-3"> +<clipPath id="terminal-2926696453-line-3"> <rect x="0" y="74.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-4"> +<clipPath id="terminal-2926696453-line-4"> <rect x="0" y="99.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-5"> +<clipPath id="terminal-2926696453-line-5"> <rect x="0" y="123.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-6"> +<clipPath id="terminal-2926696453-line-6"> <rect x="0" y="147.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-7"> +<clipPath id="terminal-2926696453-line-7"> <rect x="0" y="172.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-8"> +<clipPath id="terminal-2926696453-line-8"> <rect x="0" y="196.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-9"> +<clipPath id="terminal-2926696453-line-9"> <rect x="0" y="221.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-10"> +<clipPath id="terminal-2926696453-line-10"> <rect x="0" y="245.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-11"> +<clipPath id="terminal-2926696453-line-11"> <rect x="0" y="269.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-12"> +<clipPath id="terminal-2926696453-line-12"> <rect x="0" y="294.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-13"> +<clipPath id="terminal-2926696453-line-13"> <rect x="0" y="318.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-14"> +<clipPath id="terminal-2926696453-line-14"> <rect x="0" y="343.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-15"> +<clipPath id="terminal-2926696453-line-15"> <rect x="0" y="367.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-16"> +<clipPath id="terminal-2926696453-line-16"> <rect x="0" y="391.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-17"> +<clipPath id="terminal-2926696453-line-17"> <rect x="0" y="416.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-18"> +<clipPath id="terminal-2926696453-line-18"> <rect x="0" y="440.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-19"> +<clipPath id="terminal-2926696453-line-19"> <rect x="0" y="465.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-20"> +<clipPath id="terminal-2926696453-line-20"> <rect x="0" y="489.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-21"> +<clipPath id="terminal-2926696453-line-21"> <rect x="0" y="513.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-22"> +<clipPath id="terminal-2926696453-line-22"> <rect x="0" y="538.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-23"> +<clipPath id="terminal-2926696453-line-23"> <rect x="0" y="562.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-24"> +<clipPath id="terminal-2926696453-line-24"> <rect x="0" y="587.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-25"> +<clipPath id="terminal-2926696453-line-25"> <rect x="0" y="611.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-26"> +<clipPath id="terminal-2926696453-line-26"> <rect x="0" y="635.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-27"> +<clipPath id="terminal-2926696453-line-27"> <rect x="0" y="660.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-28"> +<clipPath id="terminal-2926696453-line-28"> <rect x="0" y="684.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-29"> +<clipPath id="terminal-2926696453-line-29"> <rect x="0" y="709.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-30"> +<clipPath id="terminal-2926696453-line-30"> <rect x="0" y="733.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-31"> +<clipPath id="terminal-2926696453-line-31"> <rect x="0" y="757.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-32"> +<clipPath id="terminal-2926696453-line-32"> <rect x="0" y="782.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-33"> +<clipPath id="terminal-2926696453-line-33"> <rect x="0" y="806.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-34"> +<clipPath id="terminal-2926696453-line-34"> <rect x="0" y="831.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-35"> +<clipPath id="terminal-2926696453-line-35"> <rect x="0" y="855.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-36"> +<clipPath id="terminal-2926696453-line-36"> <rect x="0" y="879.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-37"> +<clipPath id="terminal-2926696453-line-37"> <rect x="0" y="904.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-38"> +<clipPath id="terminal-2926696453-line-38"> <rect x="0" y="928.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-1106739011-line-39"> +<clipPath id="terminal-2926696453-line-39"> <rect x="0" y="953.1" width="976" height="24.65"/> </clipPath> +<clipPath id="terminal-2926696453-line-40"> + <rect x="0" y="977.5" width="976" height="24.65"/> + </clipPath> +<clipPath id="terminal-2926696453-line-41"> + <rect x="0" y="1001.9" width="976" height="24.65"/> + </clipPath> </defs> - <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="992" height="1048.4" rx="8"/> + <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="992" height="1097.2" rx="8"/> <g transform="translate(26,22)"> <circle cx="0" cy="0" r="7" fill="#ff5f57"/> <circle cx="22" cy="0" r="7" fill="#febc2e"/> <circle cx="44" cy="0" r="7" fill="#28c840"/> </g> - <g transform="translate(9, 41)" clip-path="url(#terminal-1106739011-clip-terminal)"> + <g transform="translate(9, 41)" clip-path="url(#terminal-2926696453-clip-terminal)"> - <g class="terminal-1106739011-matrix"> - <text class="terminal-1106739011-r1" x="0" y="20" textLength="256.2" clip-path="url(#terminal-1106739011-line-0)">$ cz changelog --help</text><text class="terminal-1106739011-r1" x="976" y="20" textLength="12.2" clip-path="url(#terminal-1106739011-line-0)"> -</text><text class="terminal-1106739011-r1" x="0" y="44.4" textLength="244" clip-path="url(#terminal-1106739011-line-1)">usage: cz changelog </text><text class="terminal-1106739011-r2" x="244" y="44.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-1)">[</text><text class="terminal-1106739011-r1" x="256.2" y="44.4" textLength="24.4" clip-path="url(#terminal-1106739011-line-1)">-h</text><text class="terminal-1106739011-r2" x="280.6" y="44.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-1)">]</text><text class="terminal-1106739011-r2" x="305" y="44.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-1)">[</text><text class="terminal-1106739011-r1" x="317.2" y="44.4" textLength="109.8" clip-path="url(#terminal-1106739011-line-1)">--dry-run</text><text class="terminal-1106739011-r2" x="427" y="44.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-1)">]</text><text class="terminal-1106739011-r2" x="451.4" y="44.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-1)">[</text><text class="terminal-1106739011-r1" x="463.6" y="44.4" textLength="256.2" clip-path="url(#terminal-1106739011-line-1)">--file-name FILE_NAME</text><text class="terminal-1106739011-r2" x="719.8" y="44.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-1)">]</text><text class="terminal-1106739011-r1" x="976" y="44.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-1)"> -</text><text class="terminal-1106739011-r2" x="244" y="68.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-2)">[</text><text class="terminal-1106739011-r1" x="256.2" y="68.8" textLength="475.8" clip-path="url(#terminal-1106739011-line-2)">--unreleased-version UNRELEASED_VERSION</text><text class="terminal-1106739011-r2" x="732" y="68.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-2)">]</text><text class="terminal-1106739011-r2" x="756.4" y="68.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-2)">[</text><text class="terminal-1106739011-r1" x="768.6" y="68.8" textLength="158.6" clip-path="url(#terminal-1106739011-line-2)">--incremental</text><text class="terminal-1106739011-r2" x="927.2" y="68.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-2)">]</text><text class="terminal-1106739011-r1" x="976" y="68.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-2)"> -</text><text class="terminal-1106739011-r2" x="244" y="93.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-3)">[</text><text class="terminal-1106739011-r1" x="256.2" y="93.2" textLength="256.2" clip-path="url(#terminal-1106739011-line-3)">--start-rev START_REV</text><text class="terminal-1106739011-r2" x="512.4" y="93.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-3)">]</text><text class="terminal-1106739011-r2" x="536.8" y="93.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-3)">[</text><text class="terminal-1106739011-r1" x="549" y="93.2" textLength="219.6" clip-path="url(#terminal-1106739011-line-3)">--merge-prerelease</text><text class="terminal-1106739011-r2" x="768.6" y="93.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-3)">]</text><text class="terminal-1106739011-r1" x="976" y="93.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-3)"> -</text><text class="terminal-1106739011-r2" x="244" y="117.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-4)">[</text><text class="terminal-1106739011-r1" x="256.2" y="117.6" textLength="207.4" clip-path="url(#terminal-1106739011-line-4)">--version-scheme </text><text class="terminal-1106739011-r2" x="463.6" y="117.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-4)">{</text><text class="terminal-1106739011-r1" x="475.8" y="117.6" textLength="256.2" clip-path="url(#terminal-1106739011-line-4)">pep440,semver,semver2</text><text class="terminal-1106739011-r2" x="732" y="117.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-4)">}</text><text class="terminal-1106739011-r2" x="744.2" y="117.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-4)">]</text><text class="terminal-1106739011-r1" x="976" y="117.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-4)"> -</text><text class="terminal-1106739011-r2" x="244" y="142" textLength="12.2" clip-path="url(#terminal-1106739011-line-5)">[</text><text class="terminal-1106739011-r1" x="256.2" y="142" textLength="402.6" clip-path="url(#terminal-1106739011-line-5)">--export-template EXPORT_TEMPLATE</text><text class="terminal-1106739011-r2" x="658.8" y="142" textLength="12.2" clip-path="url(#terminal-1106739011-line-5)">]</text><text class="terminal-1106739011-r2" x="683.2" y="142" textLength="12.2" clip-path="url(#terminal-1106739011-line-5)">[</text><text class="terminal-1106739011-r1" x="695.4" y="142" textLength="231.8" clip-path="url(#terminal-1106739011-line-5)">--template TEMPLATE</text><text class="terminal-1106739011-r2" x="927.2" y="142" textLength="12.2" clip-path="url(#terminal-1106739011-line-5)">]</text><text class="terminal-1106739011-r1" x="976" y="142" textLength="12.2" clip-path="url(#terminal-1106739011-line-5)"> -</text><text class="terminal-1106739011-r2" x="244" y="166.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-6)">[</text><text class="terminal-1106739011-r1" x="256.2" y="166.4" textLength="158.6" clip-path="url(#terminal-1106739011-line-6)">--extra EXTRA</text><text class="terminal-1106739011-r2" x="414.8" y="166.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-6)">]</text><text class="terminal-1106739011-r1" x="976" y="166.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-6)"> -</text><text class="terminal-1106739011-r1" x="976" y="190.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-7)"> -</text><text class="terminal-1106739011-r1" x="976" y="215.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-8)"> -</text><text class="terminal-1106739011-r1" x="0" y="239.6" textLength="231.8" clip-path="url(#terminal-1106739011-line-9)">generate changelog </text><text class="terminal-1106739011-r2" x="231.8" y="239.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-9)">(</text><text class="terminal-1106739011-r1" x="244" y="239.6" textLength="500.2" clip-path="url(#terminal-1106739011-line-9)">note that it will overwrite existing file</text><text class="terminal-1106739011-r2" x="744.2" y="239.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-9)">)</text><text class="terminal-1106739011-r1" x="976" y="239.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-9)"> -</text><text class="terminal-1106739011-r1" x="976" y="264" textLength="12.2" clip-path="url(#terminal-1106739011-line-10)"> -</text><text class="terminal-1106739011-r1" x="0" y="288.4" textLength="256.2" clip-path="url(#terminal-1106739011-line-11)">positional arguments:</text><text class="terminal-1106739011-r1" x="976" y="288.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-11)"> -</text><text class="terminal-1106739011-r1" x="0" y="312.8" textLength="805.2" clip-path="url(#terminal-1106739011-line-12)">  rev_range             generates changelog for the given version </text><text class="terminal-1106739011-r2" x="805.2" y="312.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-12)">(</text><text class="terminal-1106739011-r1" x="817.4" y="312.8" textLength="61" clip-path="url(#terminal-1106739011-line-12)">e.g: </text><text class="terminal-1106739011-r3" x="878.4" y="312.8" textLength="36.6" clip-path="url(#terminal-1106739011-line-12)">1.5</text><text class="terminal-1106739011-r1" x="915" y="312.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-12)">.</text><text class="terminal-1106739011-r3" x="927.2" y="312.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-12)">3</text><text class="terminal-1106739011-r2" x="939.4" y="312.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-12)">)</text><text class="terminal-1106739011-r1" x="976" y="312.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-12)"> -</text><text class="terminal-1106739011-r1" x="0" y="337.2" textLength="500.2" clip-path="url(#terminal-1106739011-line-13)">                        or version range </text><text class="terminal-1106739011-r2" x="500.2" y="337.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-13)">(</text><text class="terminal-1106739011-r1" x="512.4" y="337.2" textLength="61" clip-path="url(#terminal-1106739011-line-13)">e.g: </text><text class="terminal-1106739011-r3" x="573.4" y="337.2" textLength="36.6" clip-path="url(#terminal-1106739011-line-13)">1.5</text><text class="terminal-1106739011-r1" x="610" y="337.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-13)">.</text><text class="terminal-1106739011-r3" x="622.2" y="337.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-13)">3</text><text class="terminal-1106739011-r1" x="634.4" y="337.2" textLength="24.4" clip-path="url(#terminal-1106739011-line-13)">..</text><text class="terminal-1106739011-r3" x="658.8" y="337.2" textLength="36.6" clip-path="url(#terminal-1106739011-line-13)">1.7</text><text class="terminal-1106739011-r1" x="695.4" y="337.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-13)">.</text><text class="terminal-1106739011-r3" x="707.6" y="337.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-13)">9</text><text class="terminal-1106739011-r2" x="719.8" y="337.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-13)">)</text><text class="terminal-1106739011-r1" x="976" y="337.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-13)"> -</text><text class="terminal-1106739011-r1" x="976" y="361.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-14)"> -</text><text class="terminal-1106739011-r1" x="0" y="386" textLength="97.6" clip-path="url(#terminal-1106739011-line-15)">options:</text><text class="terminal-1106739011-r1" x="976" y="386" textLength="12.2" clip-path="url(#terminal-1106739011-line-15)"> -</text><text class="terminal-1106739011-r1" x="0" y="410.4" textLength="671" clip-path="url(#terminal-1106739011-line-16)">  -h, --help            show this help message and exit</text><text class="terminal-1106739011-r1" x="976" y="410.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-16)"> -</text><text class="terminal-1106739011-r1" x="0" y="434.8" textLength="585.6" clip-path="url(#terminal-1106739011-line-17)">  --dry-run             show changelog to stdout</text><text class="terminal-1106739011-r1" x="976" y="434.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-17)"> -</text><text class="terminal-1106739011-r1" x="0" y="459.2" textLength="280.6" clip-path="url(#terminal-1106739011-line-18)">  --file-name FILE_NAME</text><text class="terminal-1106739011-r1" x="976" y="459.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-18)"> -</text><text class="terminal-1106739011-r1" x="0" y="483.6" textLength="573.4" clip-path="url(#terminal-1106739011-line-19)">                        file name of changelog </text><text class="terminal-1106739011-r2" x="573.4" y="483.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-19)">(</text><text class="terminal-1106739011-r1" x="585.6" y="483.6" textLength="109.8" clip-path="url(#terminal-1106739011-line-19)">default: </text><text class="terminal-1106739011-r4" x="695.4" y="483.6" textLength="170.8" clip-path="url(#terminal-1106739011-line-19)">'CHANGELOG.md'</text><text class="terminal-1106739011-r2" x="866.2" y="483.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-19)">)</text><text class="terminal-1106739011-r1" x="976" y="483.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-19)"> -</text><text class="terminal-1106739011-r1" x="0" y="508" textLength="500.2" clip-path="url(#terminal-1106739011-line-20)">  --unreleased-version UNRELEASED_VERSION</text><text class="terminal-1106739011-r1" x="976" y="508" textLength="12.2" clip-path="url(#terminal-1106739011-line-20)"> -</text><text class="terminal-1106739011-r1" x="0" y="532.4" textLength="707.6" clip-path="url(#terminal-1106739011-line-21)">                        set the value for the new version </text><text class="terminal-1106739011-r2" x="707.6" y="532.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-21)">(</text><text class="terminal-1106739011-r1" x="719.8" y="532.4" textLength="207.4" clip-path="url(#terminal-1106739011-line-21)">use the tag value</text><text class="terminal-1106739011-r2" x="927.2" y="532.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-21)">)</text><text class="terminal-1106739011-r1" x="939.4" y="532.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-21)">,</text><text class="terminal-1106739011-r1" x="976" y="532.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-21)"> -</text><text class="terminal-1106739011-r1" x="0" y="556.8" textLength="622.2" clip-path="url(#terminal-1106739011-line-22)">                        instead of using unreleased</text><text class="terminal-1106739011-r1" x="976" y="556.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-22)"> -</text><text class="terminal-1106739011-r1" x="0" y="581.2" textLength="939.4" clip-path="url(#terminal-1106739011-line-23)">  --incremental         generates changelog from last created version, useful</text><text class="terminal-1106739011-r1" x="976" y="581.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-23)"> -</text><text class="terminal-1106739011-r1" x="0" y="605.6" textLength="817.4" clip-path="url(#terminal-1106739011-line-24)">                        if the changelog has been manually modified</text><text class="terminal-1106739011-r1" x="976" y="605.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-24)"> -</text><text class="terminal-1106739011-r1" x="0" y="630" textLength="280.6" clip-path="url(#terminal-1106739011-line-25)">  --start-rev START_REV</text><text class="terminal-1106739011-r1" x="976" y="630" textLength="12.2" clip-path="url(#terminal-1106739011-line-25)"> -</text><text class="terminal-1106739011-r1" x="0" y="654.4" textLength="866.2" clip-path="url(#terminal-1106739011-line-26)">                        start rev of the changelog. If not set, it will</text><text class="terminal-1106739011-r1" x="976" y="654.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-26)"> -</text><text class="terminal-1106739011-r1" x="0" y="678.8" textLength="695.4" clip-path="url(#terminal-1106739011-line-27)">                        generate changelog from the start</text><text class="terminal-1106739011-r1" x="976" y="678.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-27)"> -</text><text class="terminal-1106739011-r1" x="0" y="703.2" textLength="915" clip-path="url(#terminal-1106739011-line-28)">  --merge-prerelease    collect all changes from prereleases into next non-</text><text class="terminal-1106739011-r1" x="976" y="703.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-28)"> -</text><text class="terminal-1106739011-r1" x="0" y="727.6" textLength="951.6" clip-path="url(#terminal-1106739011-line-29)">                        prerelease. If not set, it will include prereleases in</text><text class="terminal-1106739011-r1" x="976" y="727.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-29)"> -</text><text class="terminal-1106739011-r1" x="0" y="752" textLength="451.4" clip-path="url(#terminal-1106739011-line-30)">                        the changelog</text><text class="terminal-1106739011-r1" x="976" y="752" textLength="12.2" clip-path="url(#terminal-1106739011-line-30)"> -</text><text class="terminal-1106739011-r1" x="0" y="776.4" textLength="231.8" clip-path="url(#terminal-1106739011-line-31)">  --version-scheme </text><text class="terminal-1106739011-r2" x="231.8" y="776.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-31)">{</text><text class="terminal-1106739011-r1" x="244" y="776.4" textLength="256.2" clip-path="url(#terminal-1106739011-line-31)">pep440,semver,semver2</text><text class="terminal-1106739011-r2" x="500.2" y="776.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-31)">}</text><text class="terminal-1106739011-r1" x="976" y="776.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-31)"> -</text><text class="terminal-1106739011-r1" x="0" y="800.8" textLength="549" clip-path="url(#terminal-1106739011-line-32)">                        choose version scheme</text><text class="terminal-1106739011-r1" x="976" y="800.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-32)"> -</text><text class="terminal-1106739011-r1" x="0" y="825.2" textLength="427" clip-path="url(#terminal-1106739011-line-33)">  --export-template EXPORT_TEMPLATE</text><text class="terminal-1106739011-r1" x="976" y="825.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-33)"> -</text><text class="terminal-1106739011-r1" x="0" y="849.6" textLength="927.2" clip-path="url(#terminal-1106739011-line-34)">                        Export the changelog template into this file instead</text><text class="terminal-1106739011-r1" x="976" y="849.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-34)"> -</text><text class="terminal-1106739011-r1" x="0" y="874" textLength="475.8" clip-path="url(#terminal-1106739011-line-35)">                        of rendering it</text><text class="terminal-1106739011-r1" x="976" y="874" textLength="12.2" clip-path="url(#terminal-1106739011-line-35)"> -</text><text class="terminal-1106739011-r1" x="0" y="898.4" textLength="305" clip-path="url(#terminal-1106739011-line-36)">  --template, -t TEMPLATE</text><text class="terminal-1106739011-r1" x="976" y="898.4" textLength="12.2" clip-path="url(#terminal-1106739011-line-36)"> -</text><text class="terminal-1106739011-r1" x="0" y="922.8" textLength="646.6" clip-path="url(#terminal-1106739011-line-37)">                        changelog template file name </text><text class="terminal-1106739011-r2" x="646.6" y="922.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-37)">(</text><text class="terminal-1106739011-r1" x="658.8" y="922.8" textLength="280.6" clip-path="url(#terminal-1106739011-line-37)">relative to the current</text><text class="terminal-1106739011-r1" x="976" y="922.8" textLength="12.2" clip-path="url(#terminal-1106739011-line-37)"> -</text><text class="terminal-1106739011-r1" x="0" y="947.2" textLength="500.2" clip-path="url(#terminal-1106739011-line-38)">                        working directory</text><text class="terminal-1106739011-r2" x="500.2" y="947.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-38)">)</text><text class="terminal-1106739011-r1" x="976" y="947.2" textLength="12.2" clip-path="url(#terminal-1106739011-line-38)"> -</text><text class="terminal-1106739011-r1" x="0" y="971.6" textLength="622.2" clip-path="url(#terminal-1106739011-line-39)">  --extra, -e EXTRA     a changelog extra variable </text><text class="terminal-1106739011-r2" x="622.2" y="971.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-39)">(</text><text class="terminal-1106739011-r1" x="634.4" y="971.6" textLength="146.4" clip-path="url(#terminal-1106739011-line-39)">in the form </text><text class="terminal-1106739011-r4" x="780.8" y="971.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-39)">'</text><text class="terminal-1106739011-r4" x="793" y="971.6" textLength="36.6" clip-path="url(#terminal-1106739011-line-39)">key</text><text class="terminal-1106739011-r4" x="829.6" y="971.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-39)">=</text><text class="terminal-1106739011-r4" x="841.8" y="971.6" textLength="61" clip-path="url(#terminal-1106739011-line-39)">value</text><text class="terminal-1106739011-r4" x="902.8" y="971.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-39)">'</text><text class="terminal-1106739011-r2" x="915" y="971.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-39)">)</text><text class="terminal-1106739011-r1" x="976" y="971.6" textLength="12.2" clip-path="url(#terminal-1106739011-line-39)"> -</text><text class="terminal-1106739011-r1" x="976" y="996" textLength="12.2" clip-path="url(#terminal-1106739011-line-40)"> + <g class="terminal-2926696453-matrix"> + <text class="terminal-2926696453-r1" x="0" y="20" textLength="256.2" clip-path="url(#terminal-2926696453-line-0)">$ cz changelog --help</text><text class="terminal-2926696453-r1" x="976" y="20" textLength="12.2" clip-path="url(#terminal-2926696453-line-0)"> +</text><text class="terminal-2926696453-r1" x="0" y="44.4" textLength="244" clip-path="url(#terminal-2926696453-line-1)">usage: cz changelog </text><text class="terminal-2926696453-r2" x="244" y="44.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-1)">[</text><text class="terminal-2926696453-r1" x="256.2" y="44.4" textLength="24.4" clip-path="url(#terminal-2926696453-line-1)">-h</text><text class="terminal-2926696453-r2" x="280.6" y="44.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-1)">]</text><text class="terminal-2926696453-r2" x="305" y="44.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-1)">[</text><text class="terminal-2926696453-r1" x="317.2" y="44.4" textLength="109.8" clip-path="url(#terminal-2926696453-line-1)">--dry-run</text><text class="terminal-2926696453-r2" x="427" y="44.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-1)">]</text><text class="terminal-2926696453-r2" x="451.4" y="44.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-1)">[</text><text class="terminal-2926696453-r1" x="463.6" y="44.4" textLength="256.2" clip-path="url(#terminal-2926696453-line-1)">--file-name FILE_NAME</text><text class="terminal-2926696453-r2" x="719.8" y="44.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-1)">]</text><text class="terminal-2926696453-r1" x="976" y="44.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-1)"> +</text><text class="terminal-2926696453-r2" x="244" y="68.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-2)">[</text><text class="terminal-2926696453-r1" x="256.2" y="68.8" textLength="475.8" clip-path="url(#terminal-2926696453-line-2)">--unreleased-version UNRELEASED_VERSION</text><text class="terminal-2926696453-r2" x="732" y="68.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-2)">]</text><text class="terminal-2926696453-r2" x="756.4" y="68.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-2)">[</text><text class="terminal-2926696453-r1" x="768.6" y="68.8" textLength="158.6" clip-path="url(#terminal-2926696453-line-2)">--incremental</text><text class="terminal-2926696453-r2" x="927.2" y="68.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-2)">]</text><text class="terminal-2926696453-r1" x="976" y="68.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-2)"> +</text><text class="terminal-2926696453-r2" x="244" y="93.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-3)">[</text><text class="terminal-2926696453-r1" x="256.2" y="93.2" textLength="256.2" clip-path="url(#terminal-2926696453-line-3)">--start-rev START_REV</text><text class="terminal-2926696453-r2" x="512.4" y="93.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-3)">]</text><text class="terminal-2926696453-r2" x="536.8" y="93.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-3)">[</text><text class="terminal-2926696453-r1" x="549" y="93.2" textLength="219.6" clip-path="url(#terminal-2926696453-line-3)">--merge-prerelease</text><text class="terminal-2926696453-r2" x="768.6" y="93.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-3)">]</text><text class="terminal-2926696453-r1" x="976" y="93.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-3)"> +</text><text class="terminal-2926696453-r2" x="244" y="117.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-4)">[</text><text class="terminal-2926696453-r1" x="256.2" y="117.6" textLength="207.4" clip-path="url(#terminal-2926696453-line-4)">--version-scheme </text><text class="terminal-2926696453-r2" x="463.6" y="117.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-4)">{</text><text class="terminal-2926696453-r1" x="475.8" y="117.6" textLength="256.2" clip-path="url(#terminal-2926696453-line-4)">pep440,semver,semver2</text><text class="terminal-2926696453-r2" x="732" y="117.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-4)">}</text><text class="terminal-2926696453-r2" x="744.2" y="117.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-4)">]</text><text class="terminal-2926696453-r1" x="976" y="117.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-4)"> +</text><text class="terminal-2926696453-r2" x="244" y="142" textLength="12.2" clip-path="url(#terminal-2926696453-line-5)">[</text><text class="terminal-2926696453-r1" x="256.2" y="142" textLength="402.6" clip-path="url(#terminal-2926696453-line-5)">--export-template EXPORT_TEMPLATE</text><text class="terminal-2926696453-r2" x="658.8" y="142" textLength="12.2" clip-path="url(#terminal-2926696453-line-5)">]</text><text class="terminal-2926696453-r2" x="683.2" y="142" textLength="12.2" clip-path="url(#terminal-2926696453-line-5)">[</text><text class="terminal-2926696453-r1" x="695.4" y="142" textLength="231.8" clip-path="url(#terminal-2926696453-line-5)">--template TEMPLATE</text><text class="terminal-2926696453-r2" x="927.2" y="142" textLength="12.2" clip-path="url(#terminal-2926696453-line-5)">]</text><text class="terminal-2926696453-r1" x="976" y="142" textLength="12.2" clip-path="url(#terminal-2926696453-line-5)"> +</text><text class="terminal-2926696453-r2" x="244" y="166.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-6)">[</text><text class="terminal-2926696453-r1" x="256.2" y="166.4" textLength="158.6" clip-path="url(#terminal-2926696453-line-6)">--extra EXTRA</text><text class="terminal-2926696453-r2" x="414.8" y="166.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-6)">]</text><text class="terminal-2926696453-r2" x="439.2" y="166.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-6)">[</text><text class="terminal-2926696453-r1" x="451.4" y="166.4" textLength="280.6" clip-path="url(#terminal-2926696453-line-6)">--tag-format TAG_FORMAT</text><text class="terminal-2926696453-r2" x="732" y="166.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-6)">]</text><text class="terminal-2926696453-r1" x="976" y="166.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-6)"> +</text><text class="terminal-2926696453-r1" x="976" y="190.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-7)"> +</text><text class="terminal-2926696453-r1" x="976" y="215.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-8)"> +</text><text class="terminal-2926696453-r1" x="0" y="239.6" textLength="231.8" clip-path="url(#terminal-2926696453-line-9)">generate changelog </text><text class="terminal-2926696453-r2" x="231.8" y="239.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-9)">(</text><text class="terminal-2926696453-r1" x="244" y="239.6" textLength="500.2" clip-path="url(#terminal-2926696453-line-9)">note that it will overwrite existing file</text><text class="terminal-2926696453-r2" x="744.2" y="239.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-9)">)</text><text class="terminal-2926696453-r1" x="976" y="239.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-9)"> +</text><text class="terminal-2926696453-r1" x="976" y="264" textLength="12.2" clip-path="url(#terminal-2926696453-line-10)"> +</text><text class="terminal-2926696453-r1" x="0" y="288.4" textLength="256.2" clip-path="url(#terminal-2926696453-line-11)">positional arguments:</text><text class="terminal-2926696453-r1" x="976" y="288.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-11)"> +</text><text class="terminal-2926696453-r1" x="0" y="312.8" textLength="805.2" clip-path="url(#terminal-2926696453-line-12)">  rev_range             generates changelog for the given version </text><text class="terminal-2926696453-r2" x="805.2" y="312.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-12)">(</text><text class="terminal-2926696453-r1" x="817.4" y="312.8" textLength="61" clip-path="url(#terminal-2926696453-line-12)">e.g: </text><text class="terminal-2926696453-r3" x="878.4" y="312.8" textLength="36.6" clip-path="url(#terminal-2926696453-line-12)">1.5</text><text class="terminal-2926696453-r1" x="915" y="312.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-12)">.</text><text class="terminal-2926696453-r3" x="927.2" y="312.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-12)">3</text><text class="terminal-2926696453-r2" x="939.4" y="312.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-12)">)</text><text class="terminal-2926696453-r1" x="976" y="312.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-12)"> +</text><text class="terminal-2926696453-r1" x="0" y="337.2" textLength="500.2" clip-path="url(#terminal-2926696453-line-13)">                        or version range </text><text class="terminal-2926696453-r2" x="500.2" y="337.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-13)">(</text><text class="terminal-2926696453-r1" x="512.4" y="337.2" textLength="61" clip-path="url(#terminal-2926696453-line-13)">e.g: </text><text class="terminal-2926696453-r3" x="573.4" y="337.2" textLength="36.6" clip-path="url(#terminal-2926696453-line-13)">1.5</text><text class="terminal-2926696453-r1" x="610" y="337.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-13)">.</text><text class="terminal-2926696453-r3" x="622.2" y="337.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-13)">3</text><text class="terminal-2926696453-r1" x="634.4" y="337.2" textLength="24.4" clip-path="url(#terminal-2926696453-line-13)">..</text><text class="terminal-2926696453-r3" x="658.8" y="337.2" textLength="36.6" clip-path="url(#terminal-2926696453-line-13)">1.7</text><text class="terminal-2926696453-r1" x="695.4" y="337.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-13)">.</text><text class="terminal-2926696453-r3" x="707.6" y="337.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-13)">9</text><text class="terminal-2926696453-r2" x="719.8" y="337.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-13)">)</text><text class="terminal-2926696453-r1" x="976" y="337.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-13)"> +</text><text class="terminal-2926696453-r1" x="976" y="361.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-14)"> +</text><text class="terminal-2926696453-r1" x="0" y="386" textLength="97.6" clip-path="url(#terminal-2926696453-line-15)">options:</text><text class="terminal-2926696453-r1" x="976" y="386" textLength="12.2" clip-path="url(#terminal-2926696453-line-15)"> +</text><text class="terminal-2926696453-r1" x="0" y="410.4" textLength="671" clip-path="url(#terminal-2926696453-line-16)">  -h, --help            show this help message and exit</text><text class="terminal-2926696453-r1" x="976" y="410.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-16)"> +</text><text class="terminal-2926696453-r1" x="0" y="434.8" textLength="585.6" clip-path="url(#terminal-2926696453-line-17)">  --dry-run             show changelog to stdout</text><text class="terminal-2926696453-r1" x="976" y="434.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-17)"> +</text><text class="terminal-2926696453-r1" x="0" y="459.2" textLength="280.6" clip-path="url(#terminal-2926696453-line-18)">  --file-name FILE_NAME</text><text class="terminal-2926696453-r1" x="976" y="459.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-18)"> +</text><text class="terminal-2926696453-r1" x="0" y="483.6" textLength="573.4" clip-path="url(#terminal-2926696453-line-19)">                        file name of changelog </text><text class="terminal-2926696453-r2" x="573.4" y="483.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-19)">(</text><text class="terminal-2926696453-r1" x="585.6" y="483.6" textLength="109.8" clip-path="url(#terminal-2926696453-line-19)">default: </text><text class="terminal-2926696453-r4" x="695.4" y="483.6" textLength="170.8" clip-path="url(#terminal-2926696453-line-19)">'CHANGELOG.md'</text><text class="terminal-2926696453-r2" x="866.2" y="483.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-19)">)</text><text class="terminal-2926696453-r1" x="976" y="483.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-19)"> +</text><text class="terminal-2926696453-r1" x="0" y="508" textLength="500.2" clip-path="url(#terminal-2926696453-line-20)">  --unreleased-version UNRELEASED_VERSION</text><text class="terminal-2926696453-r1" x="976" y="508" textLength="12.2" clip-path="url(#terminal-2926696453-line-20)"> +</text><text class="terminal-2926696453-r1" x="0" y="532.4" textLength="707.6" clip-path="url(#terminal-2926696453-line-21)">                        set the value for the new version </text><text class="terminal-2926696453-r2" x="707.6" y="532.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-21)">(</text><text class="terminal-2926696453-r1" x="719.8" y="532.4" textLength="207.4" clip-path="url(#terminal-2926696453-line-21)">use the tag value</text><text class="terminal-2926696453-r2" x="927.2" y="532.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-21)">)</text><text class="terminal-2926696453-r1" x="939.4" y="532.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-21)">,</text><text class="terminal-2926696453-r1" x="976" y="532.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-21)"> +</text><text class="terminal-2926696453-r1" x="0" y="556.8" textLength="622.2" clip-path="url(#terminal-2926696453-line-22)">                        instead of using unreleased</text><text class="terminal-2926696453-r1" x="976" y="556.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-22)"> +</text><text class="terminal-2926696453-r1" x="0" y="581.2" textLength="939.4" clip-path="url(#terminal-2926696453-line-23)">  --incremental         generates changelog from last created version, useful</text><text class="terminal-2926696453-r1" x="976" y="581.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-23)"> +</text><text class="terminal-2926696453-r1" x="0" y="605.6" textLength="817.4" clip-path="url(#terminal-2926696453-line-24)">                        if the changelog has been manually modified</text><text class="terminal-2926696453-r1" x="976" y="605.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-24)"> +</text><text class="terminal-2926696453-r1" x="0" y="630" textLength="280.6" clip-path="url(#terminal-2926696453-line-25)">  --start-rev START_REV</text><text class="terminal-2926696453-r1" x="976" y="630" textLength="12.2" clip-path="url(#terminal-2926696453-line-25)"> +</text><text class="terminal-2926696453-r1" x="0" y="654.4" textLength="866.2" clip-path="url(#terminal-2926696453-line-26)">                        start rev of the changelog. If not set, it will</text><text class="terminal-2926696453-r1" x="976" y="654.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-26)"> +</text><text class="terminal-2926696453-r1" x="0" y="678.8" textLength="695.4" clip-path="url(#terminal-2926696453-line-27)">                        generate changelog from the start</text><text class="terminal-2926696453-r1" x="976" y="678.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-27)"> +</text><text class="terminal-2926696453-r1" x="0" y="703.2" textLength="915" clip-path="url(#terminal-2926696453-line-28)">  --merge-prerelease    collect all changes from prereleases into next non-</text><text class="terminal-2926696453-r1" x="976" y="703.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-28)"> +</text><text class="terminal-2926696453-r1" x="0" y="727.6" textLength="951.6" clip-path="url(#terminal-2926696453-line-29)">                        prerelease. If not set, it will include prereleases in</text><text class="terminal-2926696453-r1" x="976" y="727.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-29)"> +</text><text class="terminal-2926696453-r1" x="0" y="752" textLength="451.4" clip-path="url(#terminal-2926696453-line-30)">                        the changelog</text><text class="terminal-2926696453-r1" x="976" y="752" textLength="12.2" clip-path="url(#terminal-2926696453-line-30)"> +</text><text class="terminal-2926696453-r1" x="0" y="776.4" textLength="231.8" clip-path="url(#terminal-2926696453-line-31)">  --version-scheme </text><text class="terminal-2926696453-r2" x="231.8" y="776.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-31)">{</text><text class="terminal-2926696453-r1" x="244" y="776.4" textLength="256.2" clip-path="url(#terminal-2926696453-line-31)">pep440,semver,semver2</text><text class="terminal-2926696453-r2" x="500.2" y="776.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-31)">}</text><text class="terminal-2926696453-r1" x="976" y="776.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-31)"> +</text><text class="terminal-2926696453-r1" x="0" y="800.8" textLength="549" clip-path="url(#terminal-2926696453-line-32)">                        choose version scheme</text><text class="terminal-2926696453-r1" x="976" y="800.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-32)"> +</text><text class="terminal-2926696453-r1" x="0" y="825.2" textLength="427" clip-path="url(#terminal-2926696453-line-33)">  --export-template EXPORT_TEMPLATE</text><text class="terminal-2926696453-r1" x="976" y="825.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-33)"> +</text><text class="terminal-2926696453-r1" x="0" y="849.6" textLength="927.2" clip-path="url(#terminal-2926696453-line-34)">                        Export the changelog template into this file instead</text><text class="terminal-2926696453-r1" x="976" y="849.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-34)"> +</text><text class="terminal-2926696453-r1" x="0" y="874" textLength="475.8" clip-path="url(#terminal-2926696453-line-35)">                        of rendering it</text><text class="terminal-2926696453-r1" x="976" y="874" textLength="12.2" clip-path="url(#terminal-2926696453-line-35)"> +</text><text class="terminal-2926696453-r1" x="0" y="898.4" textLength="305" clip-path="url(#terminal-2926696453-line-36)">  --template, -t TEMPLATE</text><text class="terminal-2926696453-r1" x="976" y="898.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-36)"> +</text><text class="terminal-2926696453-r1" x="0" y="922.8" textLength="646.6" clip-path="url(#terminal-2926696453-line-37)">                        changelog template file name </text><text class="terminal-2926696453-r2" x="646.6" y="922.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-37)">(</text><text class="terminal-2926696453-r1" x="658.8" y="922.8" textLength="280.6" clip-path="url(#terminal-2926696453-line-37)">relative to the current</text><text class="terminal-2926696453-r1" x="976" y="922.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-37)"> +</text><text class="terminal-2926696453-r1" x="0" y="947.2" textLength="500.2" clip-path="url(#terminal-2926696453-line-38)">                        working directory</text><text class="terminal-2926696453-r2" x="500.2" y="947.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-38)">)</text><text class="terminal-2926696453-r1" x="976" y="947.2" textLength="12.2" clip-path="url(#terminal-2926696453-line-38)"> +</text><text class="terminal-2926696453-r1" x="0" y="971.6" textLength="622.2" clip-path="url(#terminal-2926696453-line-39)">  --extra, -e EXTRA     a changelog extra variable </text><text class="terminal-2926696453-r2" x="622.2" y="971.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-39)">(</text><text class="terminal-2926696453-r1" x="634.4" y="971.6" textLength="146.4" clip-path="url(#terminal-2926696453-line-39)">in the form </text><text class="terminal-2926696453-r4" x="780.8" y="971.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-39)">'</text><text class="terminal-2926696453-r4" x="793" y="971.6" textLength="36.6" clip-path="url(#terminal-2926696453-line-39)">key</text><text class="terminal-2926696453-r4" x="829.6" y="971.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-39)">=</text><text class="terminal-2926696453-r4" x="841.8" y="971.6" textLength="61" clip-path="url(#terminal-2926696453-line-39)">value</text><text class="terminal-2926696453-r4" x="902.8" y="971.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-39)">'</text><text class="terminal-2926696453-r2" x="915" y="971.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-39)">)</text><text class="terminal-2926696453-r1" x="976" y="971.6" textLength="12.2" clip-path="url(#terminal-2926696453-line-39)"> +</text><text class="terminal-2926696453-r1" x="0" y="996" textLength="305" clip-path="url(#terminal-2926696453-line-40)">  --tag-format TAG_FORMAT</text><text class="terminal-2926696453-r1" x="976" y="996" textLength="12.2" clip-path="url(#terminal-2926696453-line-40)"> +</text><text class="terminal-2926696453-r1" x="0" y="1020.4" textLength="878.4" clip-path="url(#terminal-2926696453-line-41)">                        The format of the tag, wrap around simple quotes</text><text class="terminal-2926696453-r1" x="976" y="1020.4" textLength="12.2" clip-path="url(#terminal-2926696453-line-41)"> +</text><text class="terminal-2926696453-r1" x="976" y="1044.8" textLength="12.2" clip-path="url(#terminal-2926696453-line-42)"> </text> </g> </g> From 225fd76ecbd80fd81471886047d3b60b9710bbf9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 15:03:39 +0000 Subject: [PATCH 121/159] =?UTF-8?q?bump:=20version=204.7.2=20=E2=86=92=204?= =?UTF-8?q?.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7497946571..ff222cac1a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.7.2 # automatically updated by Commitizen + rev: v4.8.0 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index de772c6a75..d11930cce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.8.0 (2025-05-20) + +### Feat + +- **cli**: add --tag-format argument to changelog command + ## v4.7.2 (2025-05-18) ### Refactor diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 98c926d162..ea674c5c54 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.7.2" +__version__ = "4.8.0" diff --git a/pyproject.toml b/pyproject.toml index 8d9214615a..4e41a885fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.7.2" +version = "4.8.0" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.7.2" +version = "4.8.0" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 10581b3b4399abb2972d932d22d9b4b55b433a3b Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Fri, 16 May 2025 02:18:37 +0800 Subject: [PATCH 122/159] test(changelog): code cleanup and better type --- tests/test_changelog.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_changelog.py b/tests/test_changelog.py index 067adb4a91..b1c7c802e1 100644 --- a/tests/test_changelog.py +++ b/tests/test_changelog.py @@ -556,8 +556,8 @@ @pytest.fixture -def gitcommits() -> list: - commits = [ +def gitcommits() -> list[git.GitCommit]: + return [ git.GitCommit( commit["rev"], commit["title"], @@ -568,13 +568,11 @@ def gitcommits() -> list: ) for commit in COMMITS_DATA ] - return commits @pytest.fixture -def tags() -> list: - tags = [git.GitTag(*tag) for tag in TAGS] - return tags +def tags() -> list[git.GitTag]: + return [git.GitTag(*tag) for tag in TAGS] @pytest.fixture From d0c26742ef05f3976bf3e42486857612b17e83d4 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Wed, 14 May 2025 18:05:55 +0800 Subject: [PATCH 123/159] refactor(customize): improve code readability --- commitizen/cz/customize/customize.py | 54 ++++++++-------------------- 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/commitizen/cz/customize/customize.py b/commitizen/cz/customize/customize.py index afa35e92de..53ada4b2c0 100644 --- a/commitizen/cz/customize/customize.py +++ b/commitizen/cz/customize/customize.py @@ -33,35 +33,17 @@ def __init__(self, config: BaseConfig): raise MissingCzCustomizeConfigError() self.custom_settings = self.config.settings["customize"] - custom_bump_pattern = self.custom_settings.get("bump_pattern") - if custom_bump_pattern: - self.bump_pattern = custom_bump_pattern - - custom_bump_map = self.custom_settings.get("bump_map") - if custom_bump_map: - self.bump_map = custom_bump_map - - custom_bump_map_major_version_zero = self.custom_settings.get( - "bump_map_major_version_zero" - ) - if custom_bump_map_major_version_zero: - self.bump_map_major_version_zero = custom_bump_map_major_version_zero - - custom_change_type_order = self.custom_settings.get("change_type_order") - if custom_change_type_order: - self.change_type_order = custom_change_type_order - - commit_parser = self.custom_settings.get("commit_parser") - if commit_parser: - self.commit_parser = commit_parser - - changelog_pattern = self.custom_settings.get("changelog_pattern") - if changelog_pattern: - self.changelog_pattern = changelog_pattern - - change_type_map = self.custom_settings.get("change_type_map") - if change_type_map: - self.change_type_map = change_type_map + for attr_name in [ + "bump_pattern", + "bump_map", + "bump_map_major_version_zero", + "change_type_order", + "commit_parser", + "changelog_pattern", + "change_type_map", + ]: + if value := self.custom_settings.get(attr_name): + setattr(self, attr_name, value) def questions(self) -> Questions: return self.custom_settings.get("questions", [{}]) @@ -70,8 +52,7 @@ def message(self, answers: dict) -> str: message_template = Template(self.custom_settings.get("message_template", "")) if getattr(Template, "substitute", None): return message_template.substitute(**answers) # type: ignore - else: - return message_template.render(**answers) + return message_template.render(**answers) def example(self) -> str: return self.custom_settings.get("example") or "" @@ -83,12 +64,7 @@ def schema(self) -> str: return self.custom_settings.get("schema") or "" def info(self) -> str: - info_path = self.custom_settings.get("info_path") - info = self.custom_settings.get("info") - if info_path: + if info_path := self.custom_settings.get("info_path"): with open(info_path, encoding=self.config.settings["encoding"]) as f: - content = f.read() - return content - elif info: - return info - return "" + return f.read() + return self.custom_settings.get("info") or "" From ba571827e4bba1b5ac5fbdaf38302e53cd8efe75 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 03:12:05 +0000 Subject: [PATCH 124/159] =?UTF-8?q?bump:=20version=204.8.0=20=E2=86=92=204?= =?UTF-8?q?.8.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 6 ++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff222cac1a..f1aef91193 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.8.0 # automatically updated by Commitizen + rev: v4.8.1 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index d11930cce2..9904ae3bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.8.1 (2025-05-22) + +### Refactor + +- **customize**: improve code readability + ## v4.8.0 (2025-05-20) ### Feat diff --git a/commitizen/__version__.py b/commitizen/__version__.py index ea674c5c54..1969a66ecd 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.8.0" +__version__ = "4.8.1" diff --git a/pyproject.toml b/pyproject.toml index 4e41a885fa..853d9ccaf8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.8.0" +version = "4.8.1" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.8.0" +version = "4.8.1" tag_format = "v$version" version_files = [ "pyproject.toml:version", From fe72043eeec8ffdd34d721ada65c45c622acdac2 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sat, 17 May 2025 19:59:18 +0800 Subject: [PATCH 125/159] refactor(check): remove unnecessary variable --- commitizen/commands/check.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/commitizen/commands/check.py b/commitizen/commands/check.py index 087db03ea5..a0d06cbc47 100644 --- a/commitizen/commands/check.py +++ b/commitizen/commands/check.py @@ -72,15 +72,11 @@ def __call__(self): raise NoCommitsFoundError(f"No commit found with range: '{self.rev_range}'") pattern = self.cz.schema_pattern() - ill_formatted_commits = [ - commit - for commit in commits - if not self.validate_commit_message(commit.message, pattern) - ] displayed_msgs_content = "\n".join( [ f'commit "{commit.rev}": "{commit.message}"' - for commit in ill_formatted_commits + for commit in commits + if not self.validate_commit_message(commit.message, pattern) ] ) if displayed_msgs_content: From 7fd6ce33d59f90f0a85826b54224aa063ddfdc70 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sat, 17 May 2025 20:05:39 +0800 Subject: [PATCH 126/159] refactor(check): simplify code --- commitizen/commands/check.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/commitizen/commands/check.py b/commitizen/commands/check.py index a0d06cbc47..1e3b8464e1 100644 --- a/commitizen/commands/check.py +++ b/commitizen/commands/check.py @@ -88,24 +88,21 @@ def __call__(self): ) out.success("Commit validation: successful!") + def _get_commit_message(self) -> str | None: + if self.commit_msg_file is None: + # Get commit message from command line (--message) + return self.commit_msg + + with open(self.commit_msg_file, encoding=self.encoding) as commit_file: + # Get commit message from file (--commit-msg-file) + return commit_file.read() + def _get_commits(self): - msg = None - # Get commit message from file (--commit-msg-file) - if self.commit_msg_file is not None: - # Enter this branch if commit_msg_file is "". - with open(self.commit_msg_file, encoding=self.encoding) as commit_file: - msg = commit_file.read() - # Get commit message from command line (--message) - elif self.commit_msg is not None: - msg = self.commit_msg - if msg is not None: - msg = self._filter_comments(msg) - return [git.GitCommit(rev="", title="", body=msg)] + if (msg := self._get_commit_message()) is not None: + return [git.GitCommit(rev="", title="", body=self._filter_comments(msg))] # Get commit messages from git log (--rev-range) - if self.rev_range: - return git.get_commits(end=self.rev_range) - return git.get_commits() + return git.get_commits(end=self.rev_range or "HEAD") @staticmethod def _filter_comments(msg: str) -> str: From a8094aebad266040ef07f118a96c88a93f4aecf8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 03:16:18 +0000 Subject: [PATCH 127/159] =?UTF-8?q?bump:=20version=204.8.1=20=E2=86=92=204?= =?UTF-8?q?.8.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 7 +++++++ commitizen/__version__.py | 2 +- pyproject.toml | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f1aef91193..4e108eb9b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,7 +48,7 @@ repos: - tomli - repo: https://github.com/commitizen-tools/commitizen - rev: v4.8.1 # automatically updated by Commitizen + rev: v4.8.2 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 9904ae3bbf..5b737a851a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v4.8.2 (2025-05-22) + +### Refactor + +- **check**: simplify code +- **check**: remove unnecessary variable + ## v4.8.1 (2025-05-22) ### Refactor diff --git a/commitizen/__version__.py b/commitizen/__version__.py index 1969a66ecd..8e288a597c 100644 --- a/commitizen/__version__.py +++ b/commitizen/__version__.py @@ -1 +1 @@ -__version__ = "4.8.1" +__version__ = "4.8.2" diff --git a/pyproject.toml b/pyproject.toml index 853d9ccaf8..b306e5e78c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "commitizen" -version = "4.8.1" +version = "4.8.2" description = "Python commitizen client tool" authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }] maintainers = [ @@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "4.8.1" +version = "4.8.2" tag_format = "v$version" version_files = [ "pyproject.toml:version", From 9420b44c86a9271d0d9f107360501a058533f9e2 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Fri, 23 May 2025 16:55:07 +0800 Subject: [PATCH 128/159] docs(label_pr.yml): add labels based on new PR title --- .github/workflows/label_pr.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/label_pr.yml b/.github/workflows/label_pr.yml index b409c8b757..176d7cc794 100644 --- a/.github/workflows/label_pr.yml +++ b/.github/workflows/label_pr.yml @@ -17,3 +17,31 @@ jobs: - uses: actions/labeler@v5 with: configuration-path: .github/labeler.yml + - name: Label based on PR title + uses: actions/github-script@v7 + with: + script: | + const title = context.payload.pull_request.title.toLowerCase(); + const labels = []; + + if (title.includes("fix") || title.includes("bug")) { + labels.push("type: bug"); + } + if (title.includes("feat")) { + labels.push("type: feature"); + } + if (title.includes("doc")) { + labels.push("type: documentation"); + } + if (title.includes("refactor")) { + labels.push("type: refactor"); + } + + if (labels.length > 0) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels + }); + } From 5aa58c6638f7e2237f596ec373e9001e21ba1a8c Mon Sep 17 00:00:00 2001 From: Adrian Carolli <adrian.caarolli@gmail.com> Date: Mon, 26 May 2025 19:45:10 -0400 Subject: [PATCH 129/159] docs: add installation and usage guide for cz-ai plugin leveraging GPT-4o --- docs/third-party-commitizen.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/third-party-commitizen.md b/docs/third-party-commitizen.md index 1c8ef8a183..b6d598985f 100644 --- a/docs/third-party-commitizen.md +++ b/docs/third-party-commitizen.md @@ -3,6 +3,22 @@ In addition to the native templates, some alternative commit format templates are available as PyPI packages (installable with `pip`). +### [cz-ai](https://github.com/watadarkstar/cz_ai) + +A Commitizen plugin that leverages OpenAI's GPT-4o to automatically generate clear, concise, and conventional commit messages based on your staged git changes. + +#### Installation + +```sh +pip install cz-ai +``` + +#### Usage + +```sh +cz --name cz_ai commit +``` + ### [Conventional JIRA](https://pypi.org/project/conventional-JIRA/) Just like _conventional commit_ format, but the scope has been restricted to a From e69e0a1babe6b9dd64f7c3cabb2246bd299379ab Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 11 May 2025 17:04:41 +0800 Subject: [PATCH 130/159] docs: fix typos and grammar mistakes --- docs/commands/changelog.md | 10 +++++----- docs/commands/check.md | 22 ++++++++++----------- docs/commands/commit.md | 2 +- docs/config.md | 6 +++--- docs/contributing.md | 32 +++++++++++++++---------------- docs/customization.md | 26 ++++++++++++------------- docs/faq.md | 8 ++++---- docs/third-party-commitizen.md | 2 +- docs/tutorials/auto_check.md | 18 ++++++++--------- docs/tutorials/dev_releases.md | 11 +++-------- docs/tutorials/github_actions.md | 4 ++-- docs/tutorials/gitlab_ci.md | 8 ++++---- docs/tutorials/tag_format.md | 14 +++++++------- docs/tutorials/writing_commits.md | 16 ++++++++-------- 14 files changed, 87 insertions(+), 92 deletions(-) diff --git a/docs/commands/changelog.md b/docs/commands/changelog.md index cbf22b15a7..aee1a0e075 100644 --- a/docs/commands/changelog.md +++ b/docs/commands/changelog.md @@ -56,7 +56,7 @@ These are the variables used by the changelog generator. It will create a full block like above per version found in the tags. And it will create a list of the commits found. The `change_type` and the `scope` are optional, they don't need to be provided, -but if your regex does they will be rendered. +but if your regex does, they will be rendered. The format followed by the changelog is the one from [keep a changelog][keepachangelog] and the following variables are expected: @@ -108,7 +108,7 @@ cz bump --changelog This value can be updated in the `toml` file with the key `changelog_file` under `tools.commitizen` -Specify the name of the output file, remember that changelog only works with markdown. +Specify the name of the output file, remember that changelog only works with Markdown. ```bash cz changelog --file-name="CHANGES.md" @@ -120,7 +120,7 @@ This flag can be set in the `toml` file with the key `changelog_incremental` und Benefits: -- Build from latest version found in changelog, this is useful if you have a different changelog and want to use commitizen +- Build from the latest version found in changelog, this is useful if you have a different changelog and want to use commitizen - Update unreleased area - Allows users to manually touch the changelog without being rewritten. @@ -185,8 +185,8 @@ See [the template customization section](../customization.md#customizing-the-cha Supported hook methods: -- per parsed message: useful to add links -- end of changelog generation: useful to send slack or chat message, or notify another department +- Per parsed message: Useful to add links +- End of changelog generation: Useful to send Slack or chat messages, or notify another department Read more about hooks in the [customization page][customization] diff --git a/docs/commands/check.md b/docs/commands/check.md index e45ecd86c8..33e41e04f8 100644 --- a/docs/commands/check.md +++ b/docs/commands/check.md @@ -2,9 +2,9 @@ ## About -This feature checks whether the commit message follows the given committing rules. And comment in git message will be ignored. +This feature checks whether the commit message follows the given committing rules. Comments in git messages will be ignored. -If you want to setup an automatic check before every git commit, please refer to +If you want to set up an automatic check before every git commit, please refer to [Automatically check message before commit](../tutorials/auto_check.md). ## Usage @@ -27,7 +27,7 @@ $ cz check --rev-range REV_RANGE For example, if you'd like to check all commits on a branch, you can use `--rev-range master..HEAD`. Or, if you'd like to check all commits starting from when you first implemented commit message linting, you can use `--rev-range <first_commit_sha>..HEAD`. -For more info on how git commit ranges work, you can check the [git documentation](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#_commit_ranges). +For more information on how git commit ranges work, you can check the [git documentation](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#_commit_ranges). ### Commit Message @@ -47,7 +47,7 @@ In this option, MESSAGE is the commit message to be checked. $ echo MESSAGE | cz check ``` -In this option, MESSAGE is piped to cz check and would be checked. +In this option, MESSAGE is piped to cz check and will be checked. ### Commit Message File @@ -55,8 +55,8 @@ In this option, MESSAGE is piped to cz check and would be checked. $ cz check --commit-msg-file COMMIT_MSG_FILE ``` -In this option, COMMIT_MSG_FILE is the path of the temporal file that contains the commit message. -This argument can be useful when cooperating with git hook, please check [Automatically check message before commit](../tutorials/auto_check.md) for more information about how to use this argument with git hook. +In this option, COMMIT_MSG_FILE is the path of the temporary file that contains the commit message. +This argument can be useful when cooperating with git hooks. Please check [Automatically check message before commit](../tutorials/auto_check.md) for more information about how to use this argument with git hooks. ### Allow Abort @@ -69,8 +69,8 @@ permit them. Since `git commit` accepts an `--allow-empty-message` flag (primari ### Allowed Prefixes -If the commit message starts by some specific prefixes, `cz check` returns `True` without checkign the regex. -By default, the the following prefixes are allowed: `Merge`, `Revert`, `Pull request`, `fixup!` and `squash!`. +If the commit message starts with some specific prefixes, `cz check` returns `True` without checking the regex. +By default, the following prefixes are allowed: `Merge`, `Revert`, `Pull request`, `fixup!` and `squash!`. ```bash cz check --message MESSAGE --allowed-prefixes 'Merge' 'Revert' 'Custom Prefix' @@ -78,10 +78,10 @@ cz check --message MESSAGE --allowed-prefixes 'Merge' 'Revert' 'Custom Prefix' ### Commit message length limit -The argument `-l` (or `--message-length-limmit`) followed by a positive number, can limit the length of commit messages. +The argument `-l` (or `--message-length-limit`) followed by a positive number can limit the length of commit messages. For example, `cz check --message MESSAGE -l 3` would fail the check, since `MESSAGE` is more than 3 characters long. By default, the limit is set to 0, which means no limit on the length. -**Note that the limit applies only to the first line of the message.*** +**Note that the limit applies only to the first line of the message.** Specifically, for `ConventionalCommitsCz` the length only counts from the type of change to the subject, -while the body, and the footer are not counted. +while the body and the footer are not counted. diff --git a/docs/commands/commit.md b/docs/commands/commit.md index 7760a2b88e..ea033cc411 100644 --- a/docs/commands/commit.md +++ b/docs/commands/commit.md @@ -45,7 +45,7 @@ a new commit message to be prompted. The argument `-l` (or `--message-length-limit`) followed by a positive number can limit the length of commit messages. An exception would be raised when the message length exceeds the limit. For example, `cz commit -l 72` will limit the length of commit messages to 72 characters. -By default the limit is set to 0, which means no limit on the length. +By default, the limit is set to 0, which means no limit on the length. **Note that the limit applies only to the first line of the message.** Specifically, for `ConventionalCommitsCz` the length only counts from the type of change to the subject, diff --git a/docs/config.md b/docs/config.md index a522312743..b6dd794fb3 100644 --- a/docs/config.md +++ b/docs/config.md @@ -341,7 +341,7 @@ commitizen: ## Version providers Commitizen can read and write version from different sources. -By default, it use the `commitizen` one which is using the `version` field from the commitizen settings. +By default, it uses the `commitizen` one which is using the `version` field from the commitizen settings. But you can use any `commitizen.provider` entrypoint as value for `version_provider`. Commitizen provides some version providers for some well known formats: @@ -369,9 +369,9 @@ version_provider = "pep621" ### Custom version provider -You can add you own version provider by extending `VersionProvider` and exposing it on the `commitizen.provider` entrypoint. +You can add your own version provider by extending `VersionProvider` and exposing it on the `commitizen.provider` entrypoint. -Here a quick example of a `my-provider` provider reading and writing version in a `VERSION` file. +Here is a quick example of a `my-provider` provider reading and writing version in a `VERSION` file. ```python title="my_provider.py" from pathlib import Path diff --git a/docs/contributing.md b/docs/contributing.md index 0da1707da6..1192e57c0a 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -8,25 +8,25 @@ If you're a first-time contributor, you can check the issues with [good first is ## Install before contributing -1. Install [poetry](https://python-poetry.org/) `>=2.0.0`, installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer) -2. Install [gpg](https://gnupg.org), installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you could try [homebrew](https://brew.sh/). +1. Install [poetry](https://python-poetry.org/) `>=2.0.0`. See installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer). +2. Install [gpg](https://gnupg.org). See installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you can use [homebrew](https://brew.sh/). ## Before making a pull request 1. Fork [the repository](https://github.com/commitizen-tools/commitizen). -2. Clone the repository from your GitHub. -3. Setup development environment through [poetry](https://python-poetry.org/) (`poetry install`). -4. Setup [pre-commit](https://pre-commit.com/) hook (`poetry setup-pre-commit`) -5. Check out a new branch and add your modification. -6. Add test cases for all your changes. +1. Clone the repository from your GitHub. +1. Set up development environment through [poetry](https://python-poetry.org/) (`poetry install`). +1. Set up [pre-commit](https://pre-commit.com/) hook (`poetry setup-pre-commit`). +1. Checkout a new branch and add your modifications. +1. Add test cases for all your changes. (We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.) -7. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. We follow [conventional commits](https://www.conventionalcommits.org/). -8. Run `poetry all` to ensure you follow the coding style and the tests pass. -9. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (through running `poetry doc:screenshots`). -9. **Do not** update the `CHANGELOG.md`, it will be automatically created after merging to `master`. -10. **Do not** update the versions in the project, they will be automatically updated. -10. If your changes are about documentation. Run `poetry doc` to serve documentation locally and check whether there is any warning or error. -11. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏 +1. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. We follow [conventional commits](https://www.conventionalcommits.org/). +1. Run `poetry all` to ensure you follow the coding style and the tests pass. +1. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (through running `poetry doc:screenshots`). +1. **Do not** update the `CHANGELOG.md`; it will be automatically created after merging to `master`. +1. **Do not** update the versions in the project; they will be automatically updated. +1. If your changes are about documentation, run `poetry doc` to serve documentation locally and check whether there are any warnings or errors. +1. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏 ## Use of GitHub Labels @@ -45,8 +45,8 @@ If you're a first-time contributor, you can check the issues with [good first is * pr-status: wait-for-modification * pr-status: wait-for-response * pr-status: ready-to-merge -* needs: test-case *(pr only)* -* needs: documentation *(pr only)* +* needs: test-case *(PR only)* +* needs: documentation *(PR only)* * type: feature * type: bug * type: documentation diff --git a/docs/customization.md b/docs/customization.md index 31749d1c83..cef03469e0 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -170,7 +170,7 @@ commitizen: | Parameter | Type | Default | Description | | ----------- | ------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | `str` | `None` | The type of questions. Valid types: `list`, `select`, `input` and etc. The `select` type provides an interactive searchable list interface. [See More][different-question-types] | +| `type` | `str` | `None` | The type of questions. Valid types: `list`, `select`, `input`, etc. The `select` type provides an interactive searchable list interface. [See More][different-question-types] | | `name` | `str` | `None` | The key for the value answered by user. It's used in `message_template` | | `message` | `str` | `None` | Detail description for the question. | | `choices` | `list` | `None` | (OPTIONAL) The choices when `type = list` or `type = select`. Either use a list of values or a list of dictionaries with `name` and `value` keys. Keyboard shortcuts can be defined via `key`. See examples above. | @@ -192,10 +192,10 @@ To specify keyboard shortcuts for your custom choices, provide the shortcut usin The basic steps are: -1. Inheriting from `BaseCommitizen` +1. Inheriting from `BaseCommitizen`. 2. Give a name to your rules. -3. Create a python package using `setup.py`, `poetry`, etc -4. Expose the class as a `commitizen.plugin` entrypoint +3. Create a python package using `setup.py`, `poetry`, etc. +4. Expose the class as a `commitizen.plugin` entrypoint. Check an [example][convcomms] on how to configure `BaseCommitizen`. @@ -322,9 +322,9 @@ You can customize it of course, and this are the variables you need to add to yo | `commit_parser` | `str` | NO | Regex which should provide the variables explained in the [changelog description][changelog-des] | | `changelog_pattern` | `str` | NO | Regex to validate the commits, this is useful to skip commits that don't meet your ruling standards like a Merge. Usually the same as bump_pattern | | `change_type_map` | `dict` | NO | Convert the title of the change type that will appear in the changelog, if a value is not found, the original will be provided | -| `changelog_message_builder_hook` | `method: (dict, git.GitCommit) -> dict | list | None` | NO | Customize with extra information your message output, like adding links, this function is executed per parsed commit. Each GitCommit contains the following attrs: `rev`, `title`, `body`, `author`, `author_email`. Returning a falsy value ignore the commit. | +| `changelog_message_builder_hook` | `method: (dict, git.GitCommit) -> dict | list | None` | NO | Customize with extra information your message output, like adding links, this function is executed per parsed commit. Each GitCommit contains the following attrs: `rev`, `title`, `body`, `author`, `author_email`. Returning a falsy value ignore the commit. | | `changelog_hook` | `method: (full_changelog: str, partial_changelog: Optional[str]) -> str` | NO | Receives the whole and partial (if used incremental) changelog. Useful to send slack messages or notify a compliance department. Must return the full_changelog | -| `changelog_release_hook` | `method: (release: dict, tag: git.GitTag) -> dict` | NO | Receives each generated changelog release and its associated tag. Useful to enrich a releases before they are rendered. Must return the update release +| `changelog_release_hook` | `method: (release: dict, tag: git.GitTag) -> dict` | NO | Receives each generated changelog release and its associated tag. Useful to enrich releases before they are rendered. Must return the update release ```python from commitizen.cz.base import BaseCommitizen @@ -395,7 +395,7 @@ class NoSubjectProvidedException(CzException): Commitizen migrated to a new plugin format relying on `importlib.metadata.EntryPoint`. Migration should be straight-forward for legacy plugins: -- Remove the `discover_this` line from you plugin module +- Remove the `discover_this` line from your plugin module - Expose the plugin class under as a `commitizen.plugin` entrypoint. The name of the plugin is now determined by the name of the entrypoint. @@ -455,12 +455,12 @@ By default, the template used is the `CHANGELOG.md.j2` file from the commitizen ### Providing a template with your customization class -There is 3 parameters available to change the template rendering from your custom `BaseCommitizen`. +There are 3 parameters available to change the template rendering from your custom `BaseCommitizen`. | Parameter | Type | Default | Description | | ----------------- | ------ | ------- | ----------------------------------------------------------------------------------------------------- | -| `template` | `str` | `None` | Provide your own template name (default to `CHANGELOG.md.j2`) | -| `template_loader` | `str` | `None` | Override the default template loader (so you can provide template from you customization class) | +| `template` | `str` | `None` | Provide your own template name (default to `CHANGELOG.md.j2`) | +| `template_loader` | `str` | `None` | Override the default template loader (so you can provide template from your customization class) | | `template_extras` | `dict` | `None` | Provide some extra template parameters | Let's see an example. @@ -484,14 +484,14 @@ This snippet will: ### Providing a template from the current working directory -Users can provides their own template from their current working directory (your project root) by: +Users can provide their own template from their current working directory (your project root) by: - providing a template with the same name (`CHANGELOG.md.j2` unless overridden by your custom class) - setting your template path as `template` configuration - giving your template path as `--template` parameter to `bump` and `changelog` commands !!! Note - The path is relative to the current working directory, aka. your project root most of the time. + The path is relative to the current working directory, aka your project root most of the time. ### Template variables @@ -524,7 +524,7 @@ When using another template (either provided by a plugin or by yourself), you ca by: - defining them in your configuration with the [`extras` settings][extras-config] -- providing them on the commandline with the `--extra/-e` parameter to `bump` and `changelog` commands +- providing them on the command line with the `--extra/-e` parameter to `bump` and `changelog` commands [template-config]: config.md#template [extras-config]: config.md#extras diff --git a/docs/faq.md b/docs/faq.md index 29d9f40512..0302efd267 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -52,7 +52,7 @@ It is not affiliated. Both are used for similar purposes, parsing commits, generating changelog and version we presume. This one is written in python to make integration easier for python projects and the other serves the JS packages. -They differ a bit in design, not sure if cz-js does any of this, but these are some of the stuff you can do with this repo (python's commitizen): +They differ a bit in design, not sure if cz-js does any of this, but these are some things you can do with this repo (python's commitizen): - create custom rules, version bumps and changelog generation, by default we use the popular conventional commits (I think cz-js allows this). - single package, install one thing and it will work (cz-js is a monorepo, but you have to install different dependencies AFAIK) @@ -83,14 +83,14 @@ More discussion can be found in issue [#318](https://github.com/commitizen-tools ## Why does commitizen not support CalVer? `commitizen` could support CalVer alongside SemVer, but in practice implementing CalVer -creates numerous edge cases that are difficult to maintain ([#385]) and more generally +creates numerous edge cases that are difficult to maintain ([#385]) and more generally, mixing the two version schemes may not be a good idea. If CalVer or other custom versioning scheme is needed, `commitizen` could still be used to standardize commits and create changelogs, but a separate package should be used for version increments. Mixing CalVer and SemVer is generally not recommended because each versioning scheme -serves a different purposes. Diverging from either specification can be confusing to -users and cause errors with third party tools that don't expect the non-standard format. +serves a different purpose. Diverging from either specification can be confusing to +users and cause errors with third-party tools that don't expect the non-standard format. In the future, `commitizen` may support some implementation of CalVer, but at the time of writing, there are no plans to implement the feature ([#173]). diff --git a/docs/third-party-commitizen.md b/docs/third-party-commitizen.md index b6d598985f..e9eb822ed3 100644 --- a/docs/third-party-commitizen.md +++ b/docs/third-party-commitizen.md @@ -117,7 +117,7 @@ See the [README][1] for instructions on configuration ## Third-Party Commitizen Providers -Commitizen can read and write version from different sources. In addition to the native providers, some alternative version sources are available as PyPI packages (installable with `pip`). +Commitizen can read and write version from different sources. In addition to the native providers, some alternative version sources are available as PyPI packages (installable with `pip`). ### [commitizen-deno-provider](https://pypi.org/project/commitizen-deno-provider/) diff --git a/docs/tutorials/auto_check.md b/docs/tutorials/auto_check.md index 2fce57f9bd..d143528767 100644 --- a/docs/tutorials/auto_check.md +++ b/docs/tutorials/auto_check.md @@ -6,9 +6,9 @@ To automatically check a commit message prior to committing, you can use a [git ## How to -There are two common methods for installing the hook: +There are two common methods for installing the hooks: -### Method 1: Add git hook through [pre-commit](https://pre-commit.com/) +### Method 1: Add a git hook through [pre-commit](https://pre-commit.com/) - Step 1: Install [pre-commit](https://pre-commit.com/) @@ -16,7 +16,7 @@ There are two common methods for installing the hook: python -m pip install pre-commit ``` -- Step 2: Create `.pre-commit-config.yaml` at your root directory with the following content +- Step 2: Create `.pre-commit-config.yaml` in your root directory with the following content ```yaml --- @@ -28,19 +28,19 @@ repos: stages: [commit-msg] ``` -- Step 3: Install the configuration into git hook through `pre-commit` +- Step 3: Install the configuration into the git hook through `pre-commit` ```bash pre-commit install --hook-type commit-msg ``` -### Method 2: Manually add git hook +### Method 2: Manually add a git hook -The command might be included inside of a Git hook (inside of `.git/hooks/` at the root of the project). +The command might be included inside a Git hook (inside `.git/hooks/` at the root of the project). The selected hook might be the file called commit-msg. -This example shows how to use the check command inside of commit-msg. +This example shows how to use the check command inside commit-msg. At the root of the project: @@ -62,7 +62,7 @@ Where `$1` is the name of the temporary file that contains the current commit me The `--commit-msg-file` flag is required, not optional. -Each time you create a commit, automatically, this hook will analyze it. -If the commit message is invalid, it'll be rejected. +Each time you create a commit, this hook will automatically analyze it. +If the commit message is invalid, it will be rejected. The commit should follow the given committing rules; otherwise, it won't be accepted. diff --git a/docs/tutorials/dev_releases.md b/docs/tutorials/dev_releases.md index 8142334754..e2b29fb191 100644 --- a/docs/tutorials/dev_releases.md +++ b/docs/tutorials/dev_releases.md @@ -5,9 +5,7 @@ To make use of a `.dev` suffix, as per [PEP440](https://peps.python.org/pep-0440/#developmental-releases). -If more than one active branch attempts to create a tag, relative to the main -branch, there is the possibility that each will attempt to create the _same_ -tag, resulting in a collision. +If multiple active branches attempt to create a tag relative to the main branch, there is a possibility that they will attempt to create the _same_ tag, resulting in a collision. Developmental releases aim to avoid this by including a `.dev` segment which includes a non-negative integer unique to that workflow: @@ -19,9 +17,7 @@ X.Y.devN !!! note As noted in [PEP440](https://peps.python.org/pep-0440/#developmental-releases), - although developmental releases are useful in avoiding the situation - described above, depending on the value passed as the developmental - release, they can be _"difficult to parse for human readers"_. + while developmental releases help avoid the situation described above, they can be _"difficult to parse for human readers"_ depending on the value passed as the developmental release. ## How to @@ -64,8 +60,7 @@ Equally, as the developmental release needs only a non-negative integer, it is possible to use the Unix time (i.e. the number of seconds since 1st January 1970 UTC). -This would create the possibility of a collision if two builds occur at -precisely the same second but this may be sufficient for many cases: +This approach could potentially create a collision if two builds occur at precisely the same second, but it may be sufficient for many use cases: ```sh --devrelease $(date +%s) diff --git a/docs/tutorials/github_actions.md b/docs/tutorials/github_actions.md index 7a98abe2be..bcb3fda22c 100644 --- a/docs/tutorials/github_actions.md +++ b/docs/tutorials/github_actions.md @@ -51,7 +51,7 @@ where to output the content of the changelog for the newly created version. And then add a step using a github action to create the release: `softprops/action-gh-release` The commitizen action creates an env variable called `REVISION`, containing the -newely created version. +newly created version. ```yaml - name: Create bump and changelog @@ -119,7 +119,7 @@ jobs: ./scripts/publish ``` -Notice that we are using poetry, and we are calling a bash script in `./scripts/publish`. You should configure the action, and the publish with your tools (twine, poetry, etc.). Check [commitizen example](https://github.com/commitizen-tools/commitizen/blob/master/scripts/publish) +Notice that we are using poetry, and we are calling a bash script in `./scripts/publish`. You should configure the action, and publish with your tools (twine, poetry, etc.). Check [commitizen example](https://github.com/commitizen-tools/commitizen/blob/master/scripts/publish) You can also use [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) to publish your package. Push the changes and that's it. diff --git a/docs/tutorials/gitlab_ci.md b/docs/tutorials/gitlab_ci.md index 85abb3fe6d..85b6a615c3 100644 --- a/docs/tutorials/gitlab_ci.md +++ b/docs/tutorials/gitlab_ci.md @@ -38,7 +38,7 @@ The latest step is to create a `deploy key.` To do this, we should create it und If you have more projects under the same organization, you can reuse the deploy key created before, but you will have to repeat the step where we have created the environment variables (ssh key, email, and username). -tip: If the CI raise some errors, try to unprotected the private key. +Tip: If the CI raise some errors, try to unprotect the private key. ### Defining GitLab CI Pipeline @@ -105,9 +105,9 @@ auto-bump: - variables ``` -So, every time that a developer push to any branch, the `test` job is executed. If the branch is `master` and the test jobs success, the `auto-bump` takes place. -To be able to push using the Gitlab runner, we have to set the ssh key, configure git, and finally execute the auto bump. +So, every time that a developer pushes to any branch, the `test` job is executed. If the branch is `master` and the test jobs succeed, the `auto-bump` takes place. +To be able to push using the GitLab runner, we have to set the SSH key, configure git, and finally execute the auto bump. -After merging the new changed into master, we have the final result: +After merging the new changes into master, we have the final result: ![gitlab final ci result](../images/gitlab_ci/gitlab_final_ci_result.png) diff --git a/docs/tutorials/tag_format.md b/docs/tutorials/tag_format.md index 59c42bea13..8408b4c801 100644 --- a/docs/tutorials/tag_format.md +++ b/docs/tutorials/tag_format.md @@ -10,7 +10,7 @@ tag_format: $version version_scheme: pep440 ``` -As this is the default value so you don't have to specify it. +As this is the default value, you don't have to specify it. This setting means that: @@ -52,7 +52,7 @@ You will obviously want to keep all those features working as expected. Commitizen can deal with it as long as you provide the legacy tag format in the configuration. -Using the previous example, let say you want to move from `v${version}` to `component-${version}`. +Using the previous example, let's say you want to move from `v${version}` to `component-${version}`. Then `component-${version}` will be the new tag format and `v${version}` the legacy one. ```yaml @@ -62,14 +62,14 @@ legacy_tag_formats: - v${version} ``` -This way, you won't loose your version history, you'll still be able to generate you changelog properly -and on the next version bump, your last version in the form `v${version}` will be properly recognizef if you use the `scm` version provider. +This way, you won't lose your version history, you'll still be able to generate your changelog properly, +and on the next version bump, your last version in the form `v${version}` will be properly recognized if you use the `scm` version provider. Your new tag will be in the form `component-${version}`. ## Known tags to ignore -Now let's say you have some known tags you want to ignore, either because they are not versions, either because they are not versions of the component you are dealing with. -As a consequence, you don't want them to trigger a warning because Commitizen detected an unknown tag format: +Now let's say you have some known tags you want to ignore, either because they are not versions, or because they are not versions of the component you are dealing with. +As a consequence, you don't want them to trigger a warning because Commitizen detected an unknown tag format. Then you can tell Commitizen about it using the [`ignored_tag_formats`](../config.md#ignored_tag_formats) setting: @@ -93,7 +93,7 @@ This will ignore: It will match any string from any length. This allows to exclude by prefix, whether it is followed by a version or not. !!! tip - If you don't want to be warned when Commitizen detect an unknown tag, you can by setting: + If you don't want to be warned when Commitizen detects an unknown tag, you can do so by setting: ``` [tool.commitizen] ignored_tag_formats = ["*"] diff --git a/docs/tutorials/writing_commits.md b/docs/tutorials/writing_commits.md index 9ba151cc37..d1b2c6645d 100644 --- a/docs/tutorials/writing_commits.md +++ b/docs/tutorials/writing_commits.md @@ -1,21 +1,21 @@ For this project to work well in your pipeline, a commit convention must be followed. -By default commitizen uses the known [conventional commits][conventional_commits], but -you can create your own following the docs information over at +By default, commitizen uses the known [conventional commits][conventional_commits], but +you can create your own following the documentation information over at [customization][customization]. ## Conventional commits If you are using [conventional commits][conventional_commits], the most important thing to know is that you must begin your commits with at least one of these tags: -`fix`, `feat`. And if you introduce a breaking change, then, you must +`fix`, `feat`. And if you introduce a breaking change, then you must add to your commit body the following `BREAKING CHANGE`. -Using these 3 keywords will allow the proper identification of the semantic version. +Using these three keywords will allow the proper identification of the semantic version. Of course, there are other keywords, but I'll leave it to the reader to explore them. ## Writing commits -Now to the important part, when writing commits, it's important to think about: +Now to the important part: when writing commits, it's important to think about: - Your future self - Your colleagues @@ -23,16 +23,16 @@ Now to the important part, when writing commits, it's important to think about: You may think this is trivial, but it's not. It's important for the reader to understand what happened. -Emojis may be added as well (e.g. see [cz-emoji][cz_emoji]), which requires the `utf-8`, or equivalent, character encoding to support unicode characters. By default, `commitizen` uses the `utf-8` character encoding, but a different encoding may be set through the `encoding` [configuration option][configuration]. +Emojis may be added as well (e.g., see [cz-emoji][cz_emoji]), which requires the `utf-8`, or equivalent, character encoding to support unicode characters. By default, `commitizen` uses the `utf-8` character encoding, but a different encoding may be set through the `encoding` [configuration option][configuration]. ### Recommendations - **Keep the message short**: Makes the list of commits more readable (~50 chars). - **Talk imperative**: Follow this rule: `If applied, this commit will <commit message>` -- **Think about the CHANGELOG**: Your commits will probably end up in the changelog +- **Think about the CHANGELOG**: Your commits will probably end up in the changelog, so try writing for it, but also keep in mind that you can skip sending commits to the CHANGELOG by using different keywords (like `build`). -- **Use a commit per new feature**: if you introduce multiple things related to the same +- **Use a commit per new feature**: If you introduce multiple things related to the same commit, squash them. This is useful for auto-generating CHANGELOG. | Do's | Don'ts | From c3d4152fb736969b83be7b555ea44b025ffc6c7e Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 11 May 2025 17:19:32 +0800 Subject: [PATCH 131/159] docs: fix typo issues in cli.py, README.md, and contributing.md --- commitizen/cli.py | 2 +- docs/README.md | 18 +++++++++--------- docs/contributing.md | 30 +++++++++++++++--------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/commitizen/cli.py b/commitizen/cli.py index d08afc6706..f0df2f4242 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -105,7 +105,7 @@ def __call__( "name": ["-nr", "--no-raise"], "type": str, "required": False, - "help": "comma separated error codes that won't rise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen-tools.github.io/commitizen/exit_codes/", + "help": "comma separated error codes that won't raise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen-tools.github.io/commitizen/exit_codes/", }, ], "subcommands": { diff --git a/docs/README.md b/docs/README.md index 128602dfb3..ee50ad4582 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,16 +18,16 @@ ## About -Commitizen is release management tool designed for teams. +Commitizen is a release management tool designed for teams. Commitizen assumes your team uses a standard way of committing rules and from that foundation, it can bump your project's version, create the changelog, and update files. By default, commitizen uses [conventional commits][conventional_commits], but you -can build your own set of rules, and publish them. +can build your own set of rules and publish them. -Using a standardized set of rules to write commits, makes commits easier to read, and enforces writing +Using a standardized set of rules to write commits makes commits easier to read and enforces writing descriptive commits. ### Features @@ -55,7 +55,7 @@ pipx install commitizen pipx upgrade commitizen ``` -Install commitizen using `pip` with `--user` flag: +Install commitizen using `pip` with the `--user` flag: ```bash pip install --user -U commitizen @@ -63,7 +63,7 @@ pip install --user -U commitizen ### Python project -You can add it to your local project using one of the following. +You can add it to your local project using one of the following methods. With `pip`: @@ -99,7 +99,7 @@ brew install commitizen ## Usage -Most of the time this is the only command you'll run: +Most of the time, this is the only command you'll run: ```sh cz bump @@ -120,7 +120,7 @@ $ cz --help usage: cz [-h] [--debug] [-n NAME] [-nr NO_RAISE] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ... Commitizen is a cli tool to generate conventional commits. -For more information about the topic go to https://conventionalcommits.org/ +For more information about the topic, go to https://conventionalcommits.org/ optional arguments: -h, --help show this help message and exit @@ -128,7 +128,7 @@ optional arguments: --debug use debug mode -n NAME, --name NAME use the given commitizen (default: cz_conventional_commits) -nr NO_RAISE, --no-raise NO_RAISE - comma separated error codes that won't rise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen- + comma separated error codes that won't raise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen- tools.github.io/commitizen/exit_codes/ commands: @@ -147,7 +147,7 @@ commands: ## Setting up bash completion -When using bash as your shell (limited support for zsh, fish, and tcsh is available), Commitizen can use [argcomplete](https://kislyuk.github.io/argcomplete/) for auto-completion. For this argcomplete needs to be enabled. +When using bash as your shell (limited support for zsh, fish, and tcsh is available), Commitizen can use [argcomplete](https://kislyuk.github.io/argcomplete/) for auto-completion. For this, argcomplete needs to be enabled. argcomplete is installed when you install Commitizen since it's a dependency. diff --git a/docs/contributing.md b/docs/contributing.md index 1192e57c0a..0987771066 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -4,29 +4,29 @@ First of all, thank you for taking the time to contribute! 🎉 When contributing to [commitizen](https://github.com/commitizen-tools/commitizen), please first create an [issue](https://github.com/commitizen-tools/commitizen/issues) to discuss the change you wish to make before making a change. -If you're a first-time contributor, you can check the issues with [good first issue](https://github.com/commitizen-tools/commitizen/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag. +If you're a first-time contributor, you can check the issues with the [good first issue](https://github.com/commitizen-tools/commitizen/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag. ## Install before contributing -1. Install [poetry](https://python-poetry.org/) `>=2.0.0`. See installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer). -2. Install [gpg](https://gnupg.org). See installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you can use [homebrew](https://brew.sh/). +1. Install [poetry](https://python-poetry.org/) `>=2.0.0`. See the installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer). +2. Install [gpg](https://gnupg.org). See the installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you can use [homebrew](https://brew.sh/). ## Before making a pull request 1. Fork [the repository](https://github.com/commitizen-tools/commitizen). -1. Clone the repository from your GitHub. -1. Set up development environment through [poetry](https://python-poetry.org/) (`poetry install`). -1. Set up [pre-commit](https://pre-commit.com/) hook (`poetry setup-pre-commit`). -1. Checkout a new branch and add your modifications. -1. Add test cases for all your changes. +2. Clone the repository from your GitHub. +3. Set up the development environment through [poetry](https://python-poetry.org/) (`poetry install`). +4. Set up the [pre-commit](https://pre-commit.com/) hook (`poetry setup-pre-commit`). +5. Checkout a new branch and add your modifications. +6. Add test cases for all your changes. (We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.) -1. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. We follow [conventional commits](https://www.conventionalcommits.org/). -1. Run `poetry all` to ensure you follow the coding style and the tests pass. -1. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (through running `poetry doc:screenshots`). -1. **Do not** update the `CHANGELOG.md`; it will be automatically created after merging to `master`. -1. **Do not** update the versions in the project; they will be automatically updated. -1. If your changes are about documentation, run `poetry doc` to serve documentation locally and check whether there are any warnings or errors. -1. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏 +7. Use [commitizen](https://github.com/commitizen-tools/commitizen) to make git commits. We follow [conventional commits](https://www.conventionalcommits.org/). +8. Run `poetry all` to ensure you follow the coding style and the tests pass. +9. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (by running `poetry doc:screenshots`). +10. **Do not** update the `CHANGELOG.md`; it will be automatically created after merging to `master`. +11. **Do not** update the versions in the project; they will be automatically updated. +12. If your changes are about documentation, run `poetry doc` to serve documentation locally and check whether there are any warnings or errors. +13. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏 ## Use of GitHub Labels From 23bd8936a448c15e36f775496221731fb40df0ad Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 11 May 2025 22:53:40 +0800 Subject: [PATCH 132/159] docs(README.md): sync help section with the latest `cz --help` command output --- docs/README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index ee50ad4582..bcc206642d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -115,21 +115,22 @@ Read more in the section [Getting Started](./getting_started.md). ### Help +<!-- Please manually update the following section after changing `cz --help` command output. --> + ```sh $ cz --help -usage: cz [-h] [--debug] [-n NAME] [-nr NO_RAISE] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ... +usage: cz [-h] [--config CONFIG] [--debug] [-n NAME] [-nr NO_RAISE] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ... Commitizen is a cli tool to generate conventional commits. -For more information about the topic, go to https://conventionalcommits.org/ +For more information about the topic go to https://conventionalcommits.org/ -optional arguments: +options: -h, --help show this help message and exit - --config the path of configuration file + --config CONFIG the path of configuration file --debug use debug mode - -n NAME, --name NAME use the given commitizen (default: cz_conventional_commits) - -nr NO_RAISE, --no-raise NO_RAISE - comma separated error codes that won't raise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen- - tools.github.io/commitizen/exit_codes/ + -n, --name NAME use the given commitizen (default: cz_conventional_commits) + -nr, --no-raise NO_RAISE + comma separated error codes that won't raise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen-tools.github.io/commitizen/exit_codes/ commands: {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} From 3fcefbd591aa1c14c40730d9deae82f7918f8b2a Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 11 May 2025 23:08:34 +0800 Subject: [PATCH 133/159] docs(README.md): make it easier for readers to understand what Commitizen does --- docs/README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index bcc206642d..616e7610cc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -18,17 +18,26 @@ ## About -Commitizen is a release management tool designed for teams. +Commitizen is a powerful release management tool that helps teams maintain consistent and meaningful commit messages while automating version management. -Commitizen assumes your team uses a standard way of committing rules -and from that foundation, it can bump your project's version, create -the changelog, and update files. +### What Commitizen Does -By default, commitizen uses [conventional commits][conventional_commits], but you -can build your own set of rules and publish them. +By enforcing standardized commit conventions (defaulting to [Conventional Commits][conventional_commits]), Commitizen helps teams: -Using a standardized set of rules to write commits makes commits easier to read and enforces writing -descriptive commits. +- Write clear, structured commit messages +- Automatically manage version numbers using semantic versioning +- Generate and maintain changelogs +- Streamline the release process + +### Key Benefits + +With just a simple `cz bump` command, Commitizen handles: + +1. **Version Management**: Automatically bumps version numbers and updates version files based on your commit history +2. **Changelog Generation**: Creates and updates changelogs following the [Keep a changelog][keepchangelog] format +3. **Commit Standardization**: Enforces consistent commit message formats across your team + +This standardization makes your commit history more readable and meaningful, while the automation reduces manual work and potential errors in the release process. ### Features From 889198d5688e78793e4099e7493b030a652bb670 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 11 May 2025 23:38:41 +0800 Subject: [PATCH 134/159] docs(README.md): move Getting Started to README and improve clarity of the section Closes #1405 --- docs/README.md | 137 ++++++++++++++++++++++++++++++++-------- docs/getting_started.md | 119 ---------------------------------- mkdocs.yml | 1 - 3 files changed, 112 insertions(+), 145 deletions(-) delete mode 100644 docs/getting_started.md diff --git a/docs/README.md b/docs/README.md index 616e7610cc..2a9e79bbfb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -48,81 +48,168 @@ This standardization makes your commit history more readable and meaningful, whi - Display information about your commit rules (commands: schema, example, info) - Create your own set of rules and publish them to pip. Read more on [Customization](./customization.md) -## Requirements +## Getting Started -[Python](https://www.python.org/downloads/) `3.9+` +### Requirements -[Git][gitscm] `1.8.5.2+` +Before installing Commitizen, ensure you have: -## Installation +- [Python](https://www.python.org/downloads/) `3.9+` +- [Git][gitscm] `1.8.5.2+` -Install commitizen in your system using `pipx` (Recommended, <https://pypa.github.io/pipx/installation/>): +### Installation + +#### Global Installation (Recommended) + +The recommended way to install Commitizen is using `pipx`, which ensures a clean, isolated installation: ```bash +# Install pipx if you haven't already pipx ensurepath + +# Install Commitizen pipx install commitizen + +# Keep it updated pipx upgrade commitizen ``` -Install commitizen using `pip` with the `--user` flag: +If you're on macOS, you can also install Commitizen using Homebrew: ```bash -pip install --user -U commitizen +brew install commitizen ``` -### Python project +#### Project-Specific Installation -You can add it to your local project using one of the following methods. +You can add Commitizen to your Python project using any of these package managers: -With `pip`: +**Using pip:** ```bash pip install -U commitizen ``` -With `conda`: +**Using conda:** ```bash conda install -c conda-forge commitizen ``` -With Poetry >= 1.2.0: +**Using Poetry:** ```bash +# For Poetry >= 1.2.0 poetry add commitizen --group dev + +# For Poetry < 1.2.0 +poetry add commitizen --dev ``` -With Poetry < 1.2.0: +### Basic Commands -```bash -poetry add commitizen --dev +#### Initialize Commitizen + +To get started, you'll need to set up your configuration. You have two options: + +1. Use the interactive setup: +```sh +cz init ``` -### macOS +2. Manually create a configuration file (`.cz.toml` or `cz.toml`): +```toml +[tool.commitizen] +version = "0.1.0" +update_changelog_on_bump = true +``` -via [homebrew](https://formulae.brew.sh/formula/commitizen): +#### Create Commits -```bash -brew install commitizen +Create standardized commits using: +```sh +cz commit +# or use the shortcut +cz c ``` -## Usage +To sign off your commits: +```sh +cz commit -- --signoff +# or use the shortcut +cz commit -- -s +``` -Most of the time, this is the only command you'll run: +For more commit options, run `cz commit --help`. +#### Version Management + +The most common command you'll use is: ```sh cz bump ``` -On top of that, you can use commitizen to assist you with the creation of commits: +This command: +- Bumps your project's version +- Creates a git tag +- Updates the changelog (if `update_changelog_on_bump` is enabled) +- Updates version files + +You can customize: +- [Version files](./commands/bump.md#version_files) +- [Version scheme](./commands/bump.md#version_scheme) +- [Version provider](./config.md#version-providers) + +For all available options, see the [bump command documentation](./commands/bump.md). + +### Advanced Usage + +#### Get Project Version +To get your project's version (instead of Commitizen's version): ```sh -cz commit +cz version -p +``` + +This is particularly useful for automation. For example, to preview changelog changes for Slack: +```sh +cz changelog --dry-run "$(cz version -p)" +``` + +#### Pre-commit Integration + +Commitizen can automatically validate your commit messages using pre-commit hooks. + +1. Add to your `.pre-commit-config.yaml`: +```yaml +--- +repos: + - repo: https://github.com/commitizen-tools/commitizen + rev: master # Replace with latest tag + hooks: + - id: commitizen + - id: commitizen-branch + stages: [pre-push] +``` + +2. Install the hooks: +```sh +pre-commit install --hook-type commit-msg --hook-type pre-push ``` -Read more in the section [Getting Started](./getting_started.md). +| Hook | Recommended Stage | +| ----------------- | ----------------- | +| commitizen | commit-msg | +| commitizen-branch | pre-push | + +> **Note**: Replace `master` with the [latest tag](https://github.com/commitizen-tools/commitizen/tags) to avoid warnings. You can automatically update this with: +> ```sh +> pre-commit autoupdate +> ``` -### Help +For more details about commit validation, see the [check command documentation](commands/check.md). + +## Usage <!-- Please manually update the following section after changing `cz --help` command output. --> diff --git a/docs/getting_started.md b/docs/getting_started.md deleted file mode 100644 index 3c6257c363..0000000000 --- a/docs/getting_started.md +++ /dev/null @@ -1,119 +0,0 @@ -## Initialize commitizen - -If it's your first time, you'll need to create a commitizen configuration file. - -The assistant utility will help you set up everything - -```sh -cz init -``` - -Alternatively, create a file `.cz.toml` or `cz.toml` in your project's directory. - -```toml -[tool.commitizen] -version = "0.1.0" -update_changelog_on_bump = true -``` - -## Usage - -### Bump version - -```sh -cz bump -``` - -This command will bump your project's version, and it will create a tag. - -Because of the setting `update_changelog_on_bump`, bump will also create the **changelog**. -You can also [update files](./commands/bump.md#version_files). -You can configure the [version scheme](./commands/bump.md#version_scheme) and [version provider](./config.md#version-providers). - -There are many more options available, please read the docs for the [bump command](./commands/bump.md). - -### Committing - -Run in your terminal - -```bash -cz commit -``` - -or the shortcut - -```bash -cz c -``` - -#### Sign off the commit - -Run in the terminal - -```bash -cz commit -- --signoff -``` - -or the shortcut - -```bash -cz commit -- -s -``` - -### Get project version - -Running `cz version` will return the version of commitizen, but if you want -your project's version you can run: - -```sh -cz version -p -``` - -This can be useful in many situations, where otherwise, you would require a way -to parse the version of your project. Maybe it's simple if you use a `VERSION` file, -but once you start working with many different projects, it becomes tricky. - -A common example is, when you need to send to slack, the changes for the version that you -just created: - -```sh -cz changelog --dry-run "$(cz version -p)" -``` - -### Integration with Pre-commit - -Commitizen can lint your commit message for you with `cz check`. - -You can integrate this in your [pre-commit](https://pre-commit.com/) config with: - -```yaml ---- -repos: - - repo: https://github.com/commitizen-tools/commitizen - rev: master - hooks: - - id: commitizen - - id: commitizen-branch - stages: [pre-push] -``` - -After the configuration is added, you'll need to run: - -```sh -pre-commit install --hook-type commit-msg --hook-type pre-push -``` - -If you aren't using both hooks, you needn't install both stages. - -| Hook | Recommended Stage | -| ----------------- | ----------------- | -| commitizen | commit-msg | -| commitizen-branch | pre-push | - -Note that pre-commit discourages using `master` as a revision, and the above command will print a warning. You should replace the `master` revision with the [latest tag](https://github.com/commitizen-tools/commitizen/tags). This can be done automatically with: - -```sh -pre-commit autoupdate -``` - -Read more about the `check` command [here](commands/check.md). diff --git a/mkdocs.yml b/mkdocs.yml index 6a642161d2..a8a2fe2d44 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -31,7 +31,6 @@ edit_uri: "" nav: - Introduction: "README.md" - - Getting Started: "getting_started.md" - Commands: - init: "commands/init.md" - commit: "commands/commit.md" From 36c7ae576fa4ffae3abcd16f95d5caf066fd7911 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 11 May 2025 23:55:40 +0800 Subject: [PATCH 135/159] docs(README.md): improve clarity of README reference section --- docs/README.md | 72 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 7 deletions(-) diff --git a/docs/README.md b/docs/README.md index 2a9e79bbfb..22d22f42c9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -209,7 +209,11 @@ pre-commit install --hook-type commit-msg --hook-type pre-push For more details about commit validation, see the [check command documentation](commands/check.md). -## Usage +## Help & Reference + +### Command Line Interface + +Commitizen provides a comprehensive CLI with various commands. Here's the complete reference: <!-- Please manually update the following section after changing `cz --help` command output. --> @@ -242,31 +246,85 @@ commands: version get the version of the installed commitizen or the current project (default: installed commitizen) ``` +### Quick Reference + +| Command | Description | Alias | +|---------|-------------|-------| +| `cz init` | Initialize Commitizen configuration | - | +| `cz commit` | Create a new commit | `cz c` | +| `cz bump` | Bump version and update changelog | - | +| `cz changelog` | Generate changelog | `cz ch` | +| `cz check` | Validate commit messages | - | +| `cz version` | Show version information | - | + +### Additional Resources + +- [Conventional Commits Specification][conventional_commits] +- [Exit Codes Reference](./exit_codes.md) +- [Configuration Guide](./config.md) +- [Command Documentation](./commands/init.md) + +### Getting Help + +For each command, you can get detailed help by adding `--help`: + +```sh +cz commit --help +cz bump --help +cz changelog --help +``` + +For more detailed documentation, visit our [documentation site](https://commitizen-tools.github.io/commitizen/). + ## Setting up bash completion -When using bash as your shell (limited support for zsh, fish, and tcsh is available), Commitizen can use [argcomplete](https://kislyuk.github.io/argcomplete/) for auto-completion. For this, argcomplete needs to be enabled. +Commitizen supports command-line completion through [argcomplete](https://kislyuk.github.io/argcomplete/), which is automatically installed as a dependency. This feature provides intelligent auto-completion for all Commitizen commands and options. + +### Supported Shells + +- **Bash**: Full support +- **Zsh**: Limited support +- **Fish**: Limited support +- **Tcsh**: Limited support -argcomplete is installed when you install Commitizen since it's a dependency. +### Installation Methods + +#### Global Installation (Recommended) -If Commitizen is installed globally, global activation can be executed: +If you installed Commitizen globally (e.g., using `pipx` or `brew`), you can enable global completion: ```bash +# Enable global completion for all Python applications sudo activate-global-python-argcomplete ``` -For permanent (but not global) Commitizen activation, use: +#### User-Specific Installation + +For a user-specific installation that persists across sessions: ```bash +# Add to your shell's startup file (e.g., ~/.bashrc, ~/.zshrc) register-python-argcomplete cz >> ~/.bashrc ``` -For one-time activation of argcomplete for Commitizen only, use: +#### Temporary Installation + +For one-time activation in your current shell session: ```bash +# Activate completion for current session only eval "$(register-python-argcomplete cz)" ``` -For further information on activation, please visit the [argcomplete website](https://kislyuk.github.io/argcomplete/). +### Verification + +After installation, you can verify the completion is working by: + +1. Opening a new terminal session +2. Typing `cz` followed by a space and pressing `TAB` twice +3. You should see a list of available commands + +For more detailed information about argcomplete configuration and troubleshooting, visit the [argcomplete documentation](https://kislyuk.github.io/argcomplete/). ## Sponsors From 37a4a3ae4b0f9347f3cb4445931f027fee0ea9c2 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Mon, 12 May 2025 00:58:47 +0800 Subject: [PATCH 136/159] docs(cli): align cli output with docs --- commitizen/cli.py | 5 ++--- docs/README.md | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/commitizen/cli.py b/commitizen/cli.py index f0df2f4242..cb834c5d6f 100644 --- a/commitizen/cli.py +++ b/commitizen/cli.py @@ -86,9 +86,8 @@ def __call__( data = { "prog": "cz", "description": ( - "Commitizen is a cli tool to generate conventional commits.\n" - "For more information about the topic go to " - "https://conventionalcommits.org/" + "Commitizen is a powerful release management tool that helps teams maintain consistent and meaningful commit messages while automating version management.\n" + "For more information, please visit https://commitizen-tools.github.io/commitizen" ), "formatter_class": argparse.RawDescriptionHelpFormatter, "arguments": [ diff --git a/docs/README.md b/docs/README.md index 22d22f42c9..144c253a81 100644 --- a/docs/README.md +++ b/docs/README.md @@ -221,8 +221,8 @@ Commitizen provides a comprehensive CLI with various commands. Here's the comple $ cz --help usage: cz [-h] [--config CONFIG] [--debug] [-n NAME] [-nr NO_RAISE] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ... -Commitizen is a cli tool to generate conventional commits. -For more information about the topic go to https://conventionalcommits.org/ +Commitizen is a powerful release management tool that helps teams maintain consistent and meaningful commit messages while automating version management. +For more information, please visit https://commitizen-tools.github.io/commitizen options: -h, --help show this help message and exit From 4cd6d78a6bfc603497f9cb2c1b14c38616218b9f Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Mon, 12 May 2025 01:56:29 +0800 Subject: [PATCH 137/159] docs(contributing.md): improve readability of contributing docs --- docs/contributing.md | 97 ++++++++++++++++++++++++++++++++------------ 1 file changed, 70 insertions(+), 27 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 0987771066..4ca12765aa 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,32 +1,78 @@ ## Contributing to commitizen -First of all, thank you for taking the time to contribute! 🎉 +First, thank you for taking the time to contribute! 🎉 When contributing to [commitizen](https://github.com/commitizen-tools/commitizen), please first create an [issue](https://github.com/commitizen-tools/commitizen/issues) to discuss the change you wish to make before making a change. If you're a first-time contributor, you can check the issues with the [good first issue](https://github.com/commitizen-tools/commitizen/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag. -## Install before contributing - -1. Install [poetry](https://python-poetry.org/) `>=2.0.0`. See the installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer). -2. Install [gpg](https://gnupg.org). See the installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you can use [homebrew](https://brew.sh/). - -## Before making a pull request - -1. Fork [the repository](https://github.com/commitizen-tools/commitizen). -2. Clone the repository from your GitHub. -3. Set up the development environment through [poetry](https://python-poetry.org/) (`poetry install`). -4. Set up the [pre-commit](https://pre-commit.com/) hook (`poetry setup-pre-commit`). -5. Checkout a new branch and add your modifications. -6. Add test cases for all your changes. - (We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.) -7. Use [commitizen](https://github.com/commitizen-tools/commitizen) to make git commits. We follow [conventional commits](https://www.conventionalcommits.org/). -8. Run `poetry all` to ensure you follow the coding style and the tests pass. -9. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (by running `poetry doc:screenshots`). -10. **Do not** update the `CHANGELOG.md`; it will be automatically created after merging to `master`. -11. **Do not** update the versions in the project; they will be automatically updated. -12. If your changes are about documentation, run `poetry doc` to serve documentation locally and check whether there are any warnings or errors. -13. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏 +## Prerequisites & Setup + +### Required Tools + +1. **Python Environment** + - Python `>=3.9` + - [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer) `>=2.0.0` +2. **Version Control & Security** + - Git + - Commitizen + - [GPG](https://gnupg.org) for commit signing + - [Installation page](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation) + - For Mac users: `brew install gnupg` + - For Windows users: Download from [Gpg4win](https://www.gpg4win.org/) + - For Linux users: Use your distribution's package manager (e.g., `apt install gnupg` for Ubuntu) + +### Getting Started + +1. Fork [Commitizen](https://github.com/commitizen-tools/commitizen) +2. Clone your fork: + ```bash + git clone https://github.com/YOUR_USERNAME/commitizen.git + cd commitizen + ``` +3. Add the upstream repository: + ```bash + git remote add upstream https://github.com/commitizen-tools/commitizen.git + ``` +4. Set up the development environment: + ```bash + poetry install + ``` +5. Set up pre-commit hooks: + ```bash + poetry setup-pre-commit + ``` + +## Development Workflow + +1. **Create a New Branch** + ```bash + git switch -c feature/your-feature-name + # or + git switch -c fix/your-bug-fix + ``` +2. **Make Your Changes** + - Write your code + - Add tests for new functionalities or fixes + - Update documentation if needed + - Follow the existing code style +3. **Testing** + - Run the full test suite: `poetry all` + - Ensure test coverage doesn't drop (we use [CodeCov](https://codecov.io/)) + - For documentation changes, run `poetry doc` to check for warnings/errors +4. **Committing Changes** + - Use commitizen to make commits (we follow [conventional commits](https://www.conventionalcommits.org/)) + - Example: `cz commit` +5. **Documentation** + - Update `docs/README.md` if needed + - For CLI help screenshots: `poetry doc:screenshots` + - **DO NOT** update `CHANGELOG.md` (automatically generated) + - **DO NOT** update version numbers (automatically handled) +6. **Pull Request** + - Push your changes: `git push origin your-branch-name` + - Create a pull request on GitHub + - Ensure CI checks pass + - Wait for review and address any feedback ## Use of GitHub Labels @@ -57,7 +103,7 @@ If you're a first-time contributor, you can check the issues with the [good firs * os: macOS -### Issue life cycle +## Issue life cycle ```mermaid graph TD @@ -75,7 +121,7 @@ graph TD close --> output[/close/] ``` -### Pull request life cycle +## Pull request life cycle ```mermaid flowchart TD @@ -103,6 +149,3 @@ flowchart TD --modification-received--> review ``` - - -[conventional-commits]: https://www.conventionalcommits.org/ From 5e14843ef8ac0c85724588e0f49317132c3cab0f Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Mon, 12 May 2025 03:05:22 +0800 Subject: [PATCH 138/159] docs(pyproject.toml): fix typo --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b306e5e78c..a653ecdb5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ all.sequence = [ "check-commit", ] -"doc:screenshots".help = "Render documentation screeenshots" +"doc:screenshots".help = "Render documentation screenshots" "doc:screenshots".script = "scripts.gen_cli_help_screenshots:gen_cli_help_screenshots" "doc:build".help = "Build the documentation" From 614eaa3995cf45f55e8d1e7efdcf52e94946f2f8 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Tue, 13 May 2025 00:29:29 +0800 Subject: [PATCH 139/159] docs(README): update get project version section --- docs/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/README.md b/docs/README.md index 144c253a81..721ab99791 100644 --- a/docs/README.md +++ b/docs/README.md @@ -166,16 +166,16 @@ For all available options, see the [bump command documentation](./commands/bump. #### Get Project Version -To get your project's version (instead of Commitizen's version): ```sh +# Get your project's version (instead of Commitizen's version) cz version -p -``` - -This is particularly useful for automation. For example, to preview changelog changes for Slack: -```sh +# Preview changelog changes cz changelog --dry-run "$(cz version -p)" ``` +This command is particularly useful for automation scripts and CI/CD pipelines. +For example, you can use the output of the command `cz changelog --dry-run "$(cz version -p)"` to notify your team about a new release in Slack. + #### Pre-commit Integration Commitizen can automatically validate your commit messages using pre-commit hooks. From f893d082030527dc965348ec6dfb163130b75359 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Wed, 14 May 2025 23:00:31 +0800 Subject: [PATCH 140/159] docs(README): update installation methods --- docs/README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/README.md b/docs/README.md index 721ab99791..e35cf5e358 100644 --- a/docs/README.md +++ b/docs/README.md @@ -61,12 +61,9 @@ Before installing Commitizen, ensure you have: #### Global Installation (Recommended) -The recommended way to install Commitizen is using `pipx`, which ensures a clean, isolated installation: - +The recommended way to install Commitizen is using [`pipx`](https://pipx.pypa.io/) or [`uv`](https://docs.astral.sh/uv/), which ensures a clean, isolated installation: +**Using pipx:** ```bash -# Install pipx if you haven't already -pipx ensurepath - # Install Commitizen pipx install commitizen @@ -74,8 +71,16 @@ pipx install commitizen pipx upgrade commitizen ``` -If you're on macOS, you can also install Commitizen using Homebrew: +**Using uv:** +```bash +# Install commitizen +uv tool install commitizen +# Keep it updated +uv tool upgrade commitizen +``` + +**(For macOS users) Using Homebrew:** ```bash brew install commitizen ``` @@ -85,19 +90,16 @@ brew install commitizen You can add Commitizen to your Python project using any of these package managers: **Using pip:** - ```bash pip install -U commitizen ``` **Using conda:** - ```bash conda install -c conda-forge commitizen ``` **Using Poetry:** - ```bash # For Poetry >= 1.2.0 poetry add commitizen --group dev From 6930aaaea170fba7fa1aca13cbff40b11d79564e Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Thu, 15 May 2025 20:54:23 +0800 Subject: [PATCH 141/159] docs(README): use cli screenshots Closes #1413 --- docs/README.md | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/docs/README.md b/docs/README.md index e35cf5e358..ed1aaef2a1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -217,36 +217,7 @@ For more details about commit validation, see the [check command documentation]( Commitizen provides a comprehensive CLI with various commands. Here's the complete reference: -<!-- Please manually update the following section after changing `cz --help` command output. --> - -```sh -$ cz --help -usage: cz [-h] [--config CONFIG] [--debug] [-n NAME] [-nr NO_RAISE] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ... - -Commitizen is a powerful release management tool that helps teams maintain consistent and meaningful commit messages while automating version management. -For more information, please visit https://commitizen-tools.github.io/commitizen - -options: - -h, --help show this help message and exit - --config CONFIG the path of configuration file - --debug use debug mode - -n, --name NAME use the given commitizen (default: cz_conventional_commits) - -nr, --no-raise NO_RAISE - comma separated error codes that won't raise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen-tools.github.io/commitizen/exit_codes/ - -commands: - {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} - init init commitizen configuration - commit (c) create new commit - ls show available commitizens - example show commit example - info show information about the cz - schema show commit schema - bump bump semantic version based on the git log - changelog (ch) generate changelog (note that it will overwrite existing file) - check validates that a commit message matches the commitizen schema - version get the version of the installed commitizen or the current project (default: installed commitizen) -``` +![cz --help](images/cli_help/cz___help.svg) ### Quick Reference From ec57f7de0da977f43157b7235e7f817399bc10ed Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Thu, 15 May 2025 21:13:54 +0800 Subject: [PATCH 142/159] docs: fix link warnings and minor grammar issues --- docs/commands/bump.md | 10 +++++----- docs/config.md | 24 ++++++++++++------------ docs/customization.md | 4 ++-- docs/tutorials/github_actions.md | 4 ++-- docs/tutorials/gitlab_ci.md | 4 ++-- docs/tutorials/jenkins_pipeline.md | 2 +- docs/tutorials/monorepo_guidance.md | 4 ++-- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/commands/bump.md b/docs/commands/bump.md index efdba76257..6eb5b55c54 100644 --- a/docs/commands/bump.md +++ b/docs/commands/bump.md @@ -72,7 +72,7 @@ cz bump --changelog The bump is a pre-release bump, meaning that in addition to a possible version bump the new version receives a pre-release segment compatible with the bump’s version scheme, where the segment consist of a _phase_ and a -non-negative number. Supported options for `--prerelease` are the following phase names `alpha`, `beta`, or +non-negative number. Supported options for `--prerelease` are the following phase names `alpha`, `beta`, or `rc` (release candidate). For more details, refer to the [Python Packaging User Guide](https://packaging.python.org/en/latest/specifications/version-specifiers/#pre-releases). @@ -387,7 +387,7 @@ to skip and why. Remember to document somewhere this, because you'll forget. For example if the system raises a `NoneIncrementExit` error, you look it up -on the list and then you can use the exit code: +on the list, and then you can use the exit code: ```sh cz -nr 21 bump @@ -403,7 +403,7 @@ These are used in: - `cz bump`: Find previous release tag (exact match) and generate new tag. - Find previous release tags in `cz changelog`. - - If `--incremental`: Using latest version found in the changelog, scan existing Git tags with 89\% similarity match. + - If `--incremental`: Using the latest version found in the changelog, scan existing Git tags with 89\% similarity match. - `--rev-range` is converted to Git tag names with `tag_format` before searching Git history. - If the `scm` `version_provider` is used, it uses different regexes to find the previous version tags: - If `tag_format` is set to `$version` (default): `VersionProtocol.parser` (allows `v` prefix) @@ -477,7 +477,7 @@ in a line containing the `version` substring. Template used to specify the commit message generated when bumping. -defaults to: `bump: version $current_version → $new_version` +Defaults to: `bump: version $current_version → $new_version` | Variable | Description | | ------------------ | ----------------------------------- | @@ -499,7 +499,7 @@ bump_message = "release $current_version → $new_version [skip-ci]" When set to `true` the changelog is always updated incrementally when running `cz bump`, so the user does not have to provide the `--changelog` flag every time. -defaults to: `false` +Defaults to: `false` ```toml [tool.commitizen] diff --git a/docs/config.md b/docs/config.md index b6dd794fb3..1ea02d5f67 100644 --- a/docs/config.md +++ b/docs/config.md @@ -59,7 +59,7 @@ Default: `[ ]` Legacy git tag formats, useful for old projects that changed tag format. Tags matching those formats will be recognized as version tags and be included in the changelog. -Each entry use the the syntax as [`tag_format`](#tag_format). [Read more][tag_format] +Each entry uses the syntax as [`tag_format`](#tag_format). [Read more][tag_format] ### `ignored_tag_formats` @@ -68,7 +68,7 @@ Type: `list` Default: `[ ]` Tags matching those formats will be totally ignored and won't raise a warning. -Each entry use the the syntax as [`tag_format`](#tag_format) with the addition of `*` +Each entry uses the syntax as [`tag_format`](#tag_format) with the addition of `*` that will match everything (non-greedy). [Read more][tag_format] ### `update_changelog_on_bump` @@ -101,7 +101,7 @@ Type: `str` Default: `None` -Create custom commit message, useful to skip ci. [Read more][bump_message] +Create custom commit message, useful to skip CI. [Read more][bump_message] ### `retry_after_failure` @@ -117,7 +117,7 @@ Type: `bool` Default: `false` -Disallow empty commit messages, useful in ci. [Read more][allow_abort] +Disallow empty commit messages, useful in CI. [Read more][allow_abort] ### `allowed_prefixes` @@ -195,7 +195,7 @@ Type: `bool` Default: `false` -When true, breaking changes on a `0.x` will remain as a `0.x` version. On `false`, a breaking change will bump a `0.x` version to `1.0`. [major-version-zero] +When true, breaking changes on a `0.x` will remain as a `0.x` version. On `false`, a breaking change will bump a `0.x` version to `1.0`. [Read more][major-version-zero] ### `prerelease_offset` @@ -203,7 +203,7 @@ Type: `int` Default: `0` -In some circumstances, a prerelease cannot start with a 0, e.g. in an embedded project individual characters are encoded as bytes. This can be done by specifying an offset from which to start counting. [prerelease-offset] +In some circumstances, a prerelease cannot start with a 0, e.g. in an embedded project individual characters are encoded as bytes. This can be done by specifying an offset from which to start counting. [Read more][prerelease-offset] ### `pre_bump_hooks` @@ -247,7 +247,7 @@ Provide extra variables to the changelog template. [Read more][template-customiz ## Configuration file -### pyproject.toml, .cz.toml or cz.toml +### `pyproject.toml`, `.cz.toml` or `cz.toml` Default and recommended configuration format for a project. For a **python** project, we recommend adding an entry to your `pyproject.toml`. @@ -278,7 +278,7 @@ style = [ ] ``` -### .cz.json or cz.json +### `.cz.json` or `cz.json` Commitizen has support for JSON configuration. Recommended for `NodeJS` projects. @@ -304,7 +304,7 @@ Commitizen has support for JSON configuration. Recommended for `NodeJS` projects } ``` -### .cz.yaml or cz.yaml +### `.cz.yaml` or `cz.yaml` YAML configuration is supported by Commitizen. Recommended for `Go`, `ansible`, or even `helm` charts projects. @@ -358,7 +358,7 @@ Commitizen provides some version providers for some well known formats: | `composer` | Get and set version from `composer.json` `project.version` field | !!! note -The `scm` provider is meant to be used with `setuptools-scm` or any packager `*-scm` plugin. + The `scm` provider is meant to be used with `setuptools-scm` or any packager `*-scm` plugin. An example in your `.cz.toml` or `cz.toml` would look like this: @@ -408,10 +408,10 @@ setup( [tag_format]: commands/bump.md#tag_format [bump_message]: commands/bump.md#bump_message [major-version-zero]: commands/bump.md#-major-version-zero -[prerelease-offset]: commands/bump.md#-prerelease_offset +[prerelease-offset]: commands/bump.md#prerelease_offset [retry_after_failure]: commands/commit.md#retry [allow_abort]: commands/check.md#allow-abort -[version-scheme]: commands/bump.md#version-scheme +[version-scheme]: commands/bump.md#-version-scheme [pre_bump_hooks]: commands/bump.md#pre_bump_hooks [post_bump_hooks]: commands/bump.md#post_bump_hooks [allowed_prefixes]: commands/check.md#allowed-prefixes diff --git a/docs/customization.md b/docs/customization.md index cef03469e0..805173e900 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -490,7 +490,7 @@ Users can provide their own template from their current working directory (your - setting your template path as `template` configuration - giving your template path as `--template` parameter to `bump` and `changelog` commands -!!! Note +!!! note The path is relative to the current working directory, aka your project root most of the time. ### Template variables @@ -514,7 +514,7 @@ Each `Change` has the following fields: | author | `str` | The commit author name | | author_email | `str` | The commit author email | -!!! Note +!!! note The field values depend on the customization class and/or the settings you provide The `parents` field can be used to identify merge commits and generate a changelog based on those. Another use case diff --git a/docs/tutorials/github_actions.md b/docs/tutorials/github_actions.md index bcb3fda22c..4f50aaf4e7 100644 --- a/docs/tutorials/github_actions.md +++ b/docs/tutorials/github_actions.md @@ -41,14 +41,14 @@ jobs: Push to master and that's it. -### Creating a github release +### Creating a GitHub release You can modify the previous action. Add the variable `changelog_increment_filename` in the `commitizen-action`, specifying where to output the content of the changelog for the newly created version. -And then add a step using a github action to create the release: `softprops/action-gh-release` +And then add a step using a GitHub action to create the release: `softprops/action-gh-release` The commitizen action creates an env variable called `REVISION`, containing the newly created version. diff --git a/docs/tutorials/gitlab_ci.md b/docs/tutorials/gitlab_ci.md index 85b6a615c3..6f6d53a57e 100644 --- a/docs/tutorials/gitlab_ci.md +++ b/docs/tutorials/gitlab_ci.md @@ -12,9 +12,9 @@ _Goal_: Bump a new version every time that a change occurs on the `master` branc 4. For simplification, we store the software version in a file called `VERSION`. You can use any file that you want as `commitizen` supports it. 5. The commit message executed automatically by the `CI` must include `[skip-ci]` in the message; otherwise, the process will generate a loop. You can define the message structure in [commitizen](../commands/bump.md) as well. -### Gitlab Configuration +### GitLab Configuration -To be able to change files and push new changes with `Gitlab CI` runners, we need to have a `ssh` key and configure a git user. +To be able to change files and push new changes with `GitLab CI` runners, we need to have a `ssh` key and configure a git user. First, let's create a `ssh key`. The only requirement is to create it without a passphrase: diff --git a/docs/tutorials/jenkins_pipeline.md b/docs/tutorials/jenkins_pipeline.md index fb87820c4c..2b9ad173d3 100644 --- a/docs/tutorials/jenkins_pipeline.md +++ b/docs/tutorials/jenkins_pipeline.md @@ -47,7 +47,7 @@ def useCz(String authorName = 'Jenkins CI Server', String authorEmail = 'your-je ``` !!! warning - Using jenkins pipeline with any git plugin may require many different configurations, + Using jenkins pipeline with any git plugin may require many configurations, you'll have to tinker with it until your pipelines properly detects git events. Check your webhook in your git repository and check the "behaviors" and "build strategies" in your pipeline settings. diff --git a/docs/tutorials/monorepo_guidance.md b/docs/tutorials/monorepo_guidance.md index 792c8c224f..434899f86f 100644 --- a/docs/tutorials/monorepo_guidance.md +++ b/docs/tutorials/monorepo_guidance.md @@ -56,9 +56,9 @@ In order to filter the correct commits for each component, you'll have to come u For example: - Trigger the pipeline based on the changed path, which can have some downsides, as you'll rely on the developer not including files from other files - - [github actions](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore) uses `path` + - [GitHub actions](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore) uses `path` - [Jenkins](https://www.jenkins.io/doc/book/pipeline/syntax/#built-in-conditions) uses `changeset` - - [Gitlab](https://docs.gitlab.com/ee/ci/yaml/#ruleschanges) uses `rules:changes` + - [GitLab](https://docs.gitlab.com/ee/ci/yaml/#ruleschanges) uses `rules:changes` - Filter certain pattern of the commit message (recommended) From 71c2e914d477ac7e45a05eddb9ad511f4fe0c4ca Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Thu, 15 May 2025 21:22:04 +0800 Subject: [PATCH 143/159] docs(pull_request_template): add broken link check to the checklist --- .github/pull_request_template.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e28480e5b9..5686474709 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -25,6 +25,13 @@ Please fill in the following content to let us know better about this change. ### Documentation Changes - [ ] Run `poetry doc` locally to ensure the documentation pages renders correctly + - [ ] Check if there are any broken links in the documentation + +> When running `poetry doc`, any broken internal documentation links will be reported in the console output like this: +> +> ```text +> INFO - Doc file 'config.md' contains a link 'commands/bump.md#-post_bump_hooks', but the doc 'commands/bump.md' does not contain an anchor '#-post_bump_hooks'. +> ``` ## Expected Behavior <!-- A clear and concise description of what you expected to happen --> From 2a68e89aed582ef4d89c3d0799406f5cb6584c5a Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Thu, 15 May 2025 21:27:41 +0800 Subject: [PATCH 144/159] docs(contributing): update codecov link --- docs/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing.md b/docs/contributing.md index 4ca12765aa..336f83352a 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -58,7 +58,7 @@ If you're a first-time contributor, you can check the issues with the [good firs - Follow the existing code style 3. **Testing** - Run the full test suite: `poetry all` - - Ensure test coverage doesn't drop (we use [CodeCov](https://codecov.io/)) + - Ensure test coverage doesn't drop (we use [CodeCov](https://app.codecov.io/gh/commitizen-tools/commitizen)) - For documentation changes, run `poetry doc` to check for warnings/errors 4. **Committing Changes** - Use commitizen to make commits (we follow [conventional commits](https://www.conventionalcommits.org/)) From 1c58b1c272c4ab9ee2ce93907280d5ac3bde10a6 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Thu, 15 May 2025 21:44:23 +0800 Subject: [PATCH 145/159] docs(README): update project specific installation methods --- docs/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/README.md b/docs/README.md index ed1aaef2a1..e0c3fed747 100644 --- a/docs/README.md +++ b/docs/README.md @@ -108,6 +108,16 @@ poetry add commitizen --group dev poetry add commitizen --dev ``` +**Using uv:** +```bash +uv add commitizen +``` + +**Using pdm:** +```bash +pdm add -d commitizen +``` + ### Basic Commands #### Initialize Commitizen From 70af1a6dc947cb78d10de546d6441b89ccd5bcd8 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Thu, 15 May 2025 22:03:19 +0800 Subject: [PATCH 146/159] docs: capitalize commitizen for consistency --- docs/README.md | 2 +- docs/commands/bump.md | 26 +++++++++---------- docs/commands/commit.md | 10 +++---- docs/commands/init.md | 2 +- docs/commands/version.md | 2 +- docs/config.md | 6 ++--- docs/contributing.md | 2 +- docs/customization.md | 12 ++++----- docs/exit_codes.md | 2 +- docs/external_links.md | 2 +- docs/faq.md | 6 ++--- docs/third-party-commitizen.md | 4 +-- docs/tutorials/auto_prepare_commit_message.md | 8 +++--- docs/tutorials/github_actions.md | 4 +-- docs/tutorials/monorepo_guidance.md | 2 +- docs/tutorials/writing_commits.md | 2 +- 16 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/README.md b/docs/README.md index e0c3fed747..9bb1555721 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,7 +8,7 @@ [![Codecov](https://img.shields.io/codecov/c/github/commitizen-tools/commitizen.svg?style=flat-square)](https://codecov.io/gh/commitizen-tools/commitizen) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) -![Using commitizen cli](images/demo.gif) +![Using Commitizen cli](images/demo.gif) --- diff --git a/docs/commands/bump.md b/docs/commands/bump.md index 6eb5b55c54..ee3d77430a 100644 --- a/docs/commands/bump.md +++ b/docs/commands/bump.md @@ -116,7 +116,7 @@ Below are some examples that illustrate the difference in behavior: ### `--check-consistency` -Check whether the versions defined in `version_files` and the version in commitizen +Check whether the versions defined in `version_files` and the version in Commitizen configuration are consistent before bumping version. ```bash @@ -148,7 +148,7 @@ from setuptools import setup setup(..., version="1.0.5", ...) ``` -If `--check-consistency` is used, commitizen will check whether the current version in `pyproject.toml` +If `--check-consistency` is used, Commitizen will check whether the current version in `pyproject.toml` exists in all version_files and find out it does not exist in `setup.py` and fails. However, it will still update `pyproject.toml` and `src/__version__.py`. @@ -174,11 +174,11 @@ If `--local-version` is used, it will bump only the local version `0.1.0` and ke ### `--annotated-tag` -If `--annotated-tag` is used, commitizen will create annotated tags. Also available via configuration, in `pyproject.toml` or `.cz.toml`. +If `--annotated-tag` is used, Commitizen will create annotated tags. It is also available via configuration, in `pyproject.toml` or `.cz.toml`. ### `--annotated-tag-message` -If `--annotated-tag-message` is used, commitizen will create annotated tags with the given message. +If `--annotated-tag-message` is used, Commitizen will create annotated tags with the given message. ### `--changelog-to-stdout` @@ -332,11 +332,11 @@ cz bump --allow-no-commit 2.0.0 ## Avoid raising errors -Some situations from commitizen raise an exit code different than 0. -If the error code is different than 0, any CI or script running commitizen might be interrupted. +Some situations from Commitizen raise an exit code different from 0. +If the error code is different from 0, any CI or script running Commitizen might be interrupted. If you have a special use case, where you don't want to raise one of this error codes, you can -tell commitizen to not raise them. +tell Commitizen to not raise them. ### Recommended use case @@ -355,7 +355,7 @@ cz -nr 21 bump ### Easy way -Check which error code was raised by commitizen by running in the terminal +Check which error code was raised by Commitizen by running in the terminal ```sh echo $? @@ -367,13 +367,13 @@ The output should be an integer like this 3 ``` -And then you can tell commitizen to ignore it: +And then you can tell Commitizen to ignore it: ```sh cz --no-raise 3 ``` -You can tell commitizen to skip more than one if needed: +You can tell Commitizen to skip more than one if needed: ```sh cz --no-raise 3,4,5 @@ -510,7 +510,7 @@ update_changelog_on_bump = true ### `annotated_tag` -When set to `true` commitizen will create annotated tags. +When set to `true`, Commitizen will create annotated tags. ```toml [tool.commitizen] @@ -521,7 +521,7 @@ annotated_tag = true ### `gpg_sign` -When set to `true` commitizen will create gpg signed tags. +When set to `true`, Commitizen will create gpg signed tags. ```toml [tool.commitizen] @@ -532,7 +532,7 @@ gpg_sign = true ### `major_version_zero` -When set to `true` commitizen will keep the major version at zero. +When set to `true`, Commitizen will keep the major version at zero. Useful during the initial development stage of your project. Defaults to: `false` diff --git a/docs/commands/commit.md b/docs/commands/commit.md index ea033cc411..febaee3cf2 100644 --- a/docs/commands/commit.md +++ b/docs/commands/commit.md @@ -1,4 +1,4 @@ -![Using commitizen cli](../images/demo.gif) +![Using Commitizen cli](../images/demo.gif) ## About @@ -20,14 +20,14 @@ case for this is to [automatically prepare a commit message](../tutorials/auto_p ### git options -`git` command options that are not implemented by commitizen can be use via the `--` syntax for the `commit` command. -The syntax separates commitizen arguments from `git commit` arguments by a double dash. This is the resulting syntax: +`git` command options that are not implemented by Commitizen can be use via the `--` syntax for the `commit` command. +The syntax separates Commitizen arguments from `git commit` arguments by a double dash. This is the resulting syntax: ```sh cz commit <commitizen-args> -- <git-cli-args> # e.g., cz commit --dry-run -- -a -S ``` -For example, using the `-S` option on `git commit` to sign a commit is now commitizen compatible: `cz c -- -S` +For example, using the `-S` option on `git commit` to sign a commit is now Commitizen compatible: `cz c -- -S` !!! note Deprecation warning: A commit can be signed off using `cz commit --signoff` or the shortcut `cz commit -s`. @@ -37,7 +37,7 @@ For example, using the `-S` option on `git commit` to sign a commit is now commi You can use `cz commit --retry` to reuse the last commit message when the previous commit attempt failed. To automatically retry when running `cz commit`, you can set the `retry_after_failure` -configuration option to `true`. Running `cz commit --no-retry` makes commitizen ignore `retry_after_failure`, forcing +configuration option to `true`. Running `cz commit --no-retry` makes Commitizen ignore `retry_after_failure`, forcing a new commit message to be prompted. ### Commit message length limit diff --git a/docs/commands/init.md b/docs/commands/init.md index 01e1db6be8..a799c44810 100644 --- a/docs/commands/init.md +++ b/docs/commands/init.md @@ -4,7 +4,7 @@ ## Example -To start using commitizen, the recommended approach is to run +To start using Commitizen, the recommended approach is to run ```sh cz init diff --git a/docs/commands/version.md b/docs/commands/version.md index 9a8176b45f..4d2e6a0323 100644 --- a/docs/commands/version.md +++ b/docs/commands/version.md @@ -1,4 +1,4 @@ -Get the version of the installed commitizen or the current project (default: installed commitizen) +Get the version of the installed Commitizen or the current project (default: installed commitizen) ## Usage diff --git a/docs/config.md b/docs/config.md index 1ea02d5f67..5ca2c5d788 100644 --- a/docs/config.md +++ b/docs/config.md @@ -187,7 +187,7 @@ Type: `bool` Default: `false` -If enabled, commitizen will show keyboard shortcuts when selecting from a list. Define a `key` for each of your choices to set the key. [Read more][shortcuts] +If enabled, Commitizen will show keyboard shortcuts when selecting from a list. Define a `key` for each of your choices to set the key. [Read more][shortcuts] ### `major_version_zero` @@ -341,14 +341,14 @@ commitizen: ## Version providers Commitizen can read and write version from different sources. -By default, it uses the `commitizen` one which is using the `version` field from the commitizen settings. +By default, it uses the `commitizen` one which is using the `version` field from the Commitizen settings. But you can use any `commitizen.provider` entrypoint as value for `version_provider`. Commitizen provides some version providers for some well known formats: | name | description | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `commitizen` | Default version provider: Fetch and set version in commitizen config. | +| `commitizen` | Default version provider: Fetch and set version in Commitizen config. | | `scm` | Fetch the version from git and does not need to set it back | | `pep621` | Get and set version from `pyproject.toml` `project.version` field | | `poetry` | Get and set version from `pyproject.toml` `tool.poetry.version` field | diff --git a/docs/contributing.md b/docs/contributing.md index 336f83352a..e9e162d2df 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -61,7 +61,7 @@ If you're a first-time contributor, you can check the issues with the [good firs - Ensure test coverage doesn't drop (we use [CodeCov](https://app.codecov.io/gh/commitizen-tools/commitizen)) - For documentation changes, run `poetry doc` to check for warnings/errors 4. **Committing Changes** - - Use commitizen to make commits (we follow [conventional commits](https://www.conventionalcommits.org/)) + - Use Commitizen to make commits (we follow [conventional commits](https://www.conventionalcommits.org/)) - Example: `cz commit` 5. **Documentation** - Update `docs/README.md` if needed diff --git a/docs/customization.md b/docs/customization.md index 805173e900..e97558a308 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -1,4 +1,4 @@ -Customizing commitizen is not hard at all. +Customizing Commitizen is not hard at all. We have two different ways to do so. ## 1. Customize in configuration file @@ -6,7 +6,7 @@ We have two different ways to do so. The basic steps are: 1. Define your custom committing or bumping rules in the configuration file. -2. Declare `name = "cz_customize"` in your configuration file, or add `-n cz_customize` when running commitizen. +2. Declare `name = "cz_customize"` in your configuration file, or add `-n cz_customize` when running Commitizen. Example: @@ -184,8 +184,8 @@ commitizen: #### Shortcut keys -When the [`use_shortcuts`](config.md#settings) config option is enabled, commitizen can show and use keyboard shortcuts to select items from lists directly. -For example, when using the `cz_conventional_commits` commitizen template, shortcut keys are shown when selecting the commit type. Unless otherwise defined, keyboard shortcuts will be numbered automatically. +When the [`use_shortcuts`](config.md#settings) config option is enabled, Commitizen can show and use keyboard shortcuts to select items from lists directly. +For example, when using the `cz_conventional_commits` Commitizen template, shortcut keys are shown when selecting the commit type. Unless otherwise defined, keyboard shortcuts will be numbered automatically. To specify keyboard shortcuts for your custom choices, provide the shortcut using the `key` parameter in dictionary form for each choice you would like to customize. ## 2. Customize through customizing a class @@ -304,7 +304,7 @@ class StrangeCommitizen(BaseCommitizen): bump_map = {"break": "MAJOR", "new": "MINOR", "fix": "PATCH", "hotfix": "PATCH"} ``` -That's it, your commitizen now supports custom rules, and you can run. +That's it, your Commitizen now supports custom rules, and you can run. ```bash cz -n cz_strange bump @@ -451,7 +451,7 @@ Commitizen gives you the possibility to provide your own changelog template, by: - as `--template` parameter to both `bump` and `changelog` commands - either by providing a template with the same name as the default template -By default, the template used is the `CHANGELOG.md.j2` file from the commitizen repository. +By default, the template used is the `CHANGELOG.md.j2` file from the Commitizen repository. ### Providing a template with your customization class diff --git a/docs/exit_codes.md b/docs/exit_codes.md index af9cb83627..fd92961d38 100644 --- a/docs/exit_codes.md +++ b/docs/exit_codes.md @@ -20,7 +20,7 @@ These exit codes can be found in `commitizen/exceptions.py::ExitCode`. | NoCommitBackupError | 10 | Commit back up file cannot be found | | NothingToCommitError | 11 | Nothing in staging to be committed | | CustomError | 12 | `CzException` raised | -| NoCommandFoundError | 13 | No command found when running commitizen cli (e.g., `cz --debug`) | +| NoCommandFoundError | 13 | No command found when running Commitizen cli (e.g., `cz --debug`) | | InvalidCommitMessageError | 14 | The commit message does not pass `cz check` | | MissingConfigError | 15 | Configuration missed for `cz_customize` | | NoRevisionError | 16 | No revision found | diff --git a/docs/external_links.md b/docs/external_links.md index 388bcc8dea..24e4127d86 100644 --- a/docs/external_links.md +++ b/docs/external_links.md @@ -1,4 +1,4 @@ -> If you have written over commitizen, make a PR and add the link here 💪 +> If you have written over Commitizen, make a PR and add the link here 💪 ## Talks diff --git a/docs/faq.md b/docs/faq.md index 0302efd267..ceabac2e10 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -63,7 +63,7 @@ Where do they cross paths? If you are using conventional commits in your git history, then you could swap one with the other in theory. -Regarding the name, [cz-js][cz-js] came first, they used the word commitizen first. When this project was created originally, the creator read "be a good commitizen", and thought it was just a cool word that made sense, and this would be a package that helps you be a good "commit citizen". +Regarding the name, [cz-js][cz-js] came first, they used the word Commitizen first. When this project was created originally, the creator read "be a good commitizen", and thought it was just a cool word that made sense, and this would be a package that helps you be a good "commit citizen". [cz-js]: https://github.com/commitizen/cz-cli @@ -80,7 +80,7 @@ This error was caused by a Python bug on Windows. It's been fixed by [this PR](h More discussion can be found in issue [#318](https://github.com/commitizen-tools/commitizen/issues/318). -## Why does commitizen not support CalVer? +## Why does Commitizen not support CalVer? `commitizen` could support CalVer alongside SemVer, but in practice implementing CalVer creates numerous edge cases that are difficult to maintain ([#385]) and more generally, @@ -117,7 +117,7 @@ New bumped tags will be in the new format but old ones will still work for: So given if you change from `myproject-$version` to `${version}` and then `v${version}`, -your commitizen configuration will look like this: +your Commitizen configuration will look like this: ```toml tag_format = "v${version}" diff --git a/docs/third-party-commitizen.md b/docs/third-party-commitizen.md index e9eb822ed3..dc9b539c85 100644 --- a/docs/third-party-commitizen.md +++ b/docs/third-party-commitizen.md @@ -33,9 +33,9 @@ pip install conventional-JIRA ### [GitHub JIRA Conventional](https://pypi.org/project/cz-github-jira-conventional/) -This plugin extends the commitizen tools by: +This plugin extends the Commitizen tools by: -- requiring a JIRA issue id in the commit message +- requiring a JIRA issue ID in the commit message - creating links to GitHub commits in the CHANGELOG.md - creating links to JIRA issues in the CHANGELOG.md diff --git a/docs/tutorials/auto_prepare_commit_message.md b/docs/tutorials/auto_prepare_commit_message.md index 7e8295b7c8..84ac62b689 100644 --- a/docs/tutorials/auto_prepare_commit_message.md +++ b/docs/tutorials/auto_prepare_commit_message.md @@ -2,7 +2,7 @@ ## About -It can be desirable to use commitizen for all types of commits (i.e. regular, merge, +It can be desirable to use Commitizen for all types of commits (i.e. regular, merge, squash) so that the complete git history adheres to the commit message convention without ever having to call `cz commit`. @@ -18,10 +18,10 @@ To automatically perform arbitrary cleanup steps after a successful commit you c > This hook is invoked by git-commit. It takes no parameters, and is invoked after a > commit is made. -A combination of these two hooks allows for enforcing the usage of commitizen so that -whenever a commit is about to be created, commitizen is used for creating the commit +A combination of these two hooks allows for enforcing the usage of Commitizen so that +whenever a commit is about to be created, Commitizen is used for creating the commit message. Running `git commit` or `git commit -m "..."` for example, would trigger -commitizen and use the generated commit message for the commit. +Commitizen and use the generated commit message for the commit. ## Installation diff --git a/docs/tutorials/github_actions.md b/docs/tutorials/github_actions.md index 4f50aaf4e7..bf08eb3bc5 100644 --- a/docs/tutorials/github_actions.md +++ b/docs/tutorials/github_actions.md @@ -50,7 +50,7 @@ where to output the content of the changelog for the newly created version. And then add a step using a GitHub action to create the release: `softprops/action-gh-release` -The commitizen action creates an env variable called `REVISION`, containing the +Commitizen action creates an env variable called `REVISION`, containing the newly created version. ```yaml @@ -119,7 +119,7 @@ jobs: ./scripts/publish ``` -Notice that we are using poetry, and we are calling a bash script in `./scripts/publish`. You should configure the action, and publish with your tools (twine, poetry, etc.). Check [commitizen example](https://github.com/commitizen-tools/commitizen/blob/master/scripts/publish) +Notice that we are using poetry, and we are calling a bash script in `./scripts/publish`. You should configure the action, and publish with your tools (twine, poetry, etc.). Check [Commitizen example](https://github.com/commitizen-tools/commitizen/blob/master/scripts/publish) You can also use [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) to publish your package. Push the changes and that's it. diff --git a/docs/tutorials/monorepo_guidance.md b/docs/tutorials/monorepo_guidance.md index 434899f86f..6f15a87247 100644 --- a/docs/tutorials/monorepo_guidance.md +++ b/docs/tutorials/monorepo_guidance.md @@ -1,4 +1,4 @@ -# Configuring commitizen in a monorepo +# Configuring Commitizen in a monorepo This tutorial assumes the monorepo layout is designed with multiple components that can be released independently of each other, it also assumes that conventional commits with scopes are in use. Some suggested layouts: diff --git a/docs/tutorials/writing_commits.md b/docs/tutorials/writing_commits.md index d1b2c6645d..7d9139929c 100644 --- a/docs/tutorials/writing_commits.md +++ b/docs/tutorials/writing_commits.md @@ -1,6 +1,6 @@ For this project to work well in your pipeline, a commit convention must be followed. -By default, commitizen uses the known [conventional commits][conventional_commits], but +By default, Commitizen uses the known [conventional commits][conventional_commits], but you can create your own following the documentation information over at [customization][customization]. From f6280c88a14aabf30324a4d9901f4fee577debfc Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 18 May 2025 21:41:24 +0800 Subject: [PATCH 147/159] docs(README): update documentation site link text --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 9bb1555721..516b2a4863 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,7 @@ --- -**Documentation:** [https://commitizen-tools.github.io/commitizen/](https://commitizen-tools.github.io/commitizen/) +[**Commitizen Documentation Site**](https://commitizen-tools.github.io/commitizen/) --- From ba1c9c0ce4cba699e61a2ab26d08d3159d0f3bdb Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 18 May 2025 21:46:08 +0800 Subject: [PATCH 148/159] docs(README): replace internal links with documentation site link --- docs/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/README.md b/docs/README.md index 516b2a4863..078d6da06e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -42,11 +42,11 @@ This standardization makes your commit history more readable and meaningful, whi ### Features - Command-line utility to create commits with your rules. Defaults: [Conventional commits][conventional_commits] -- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](./commands/bump.md) +- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](https://commitizen-tools.github.io/commitizen/commands/bump/) - Generate a changelog using [Keep a changelog][keepchangelog] - Update your project's version files automatically - Display information about your commit rules (commands: schema, example, info) -- Create your own set of rules and publish them to pip. Read more on [Customization](./customization.md) +- Create your own set of rules and publish them to pip. Read more on [Customization](https://commitizen-tools.github.io/commitizen/customization/) ## Getting Started @@ -168,11 +168,11 @@ This command: - Updates version files You can customize: -- [Version files](./commands/bump.md#version_files) -- [Version scheme](./commands/bump.md#version_scheme) -- [Version provider](./config.md#version-providers) +- [Version files](https://commitizen-tools.github.io/commitizen/commands/bump/#version_files) +- [Version scheme](https://commitizen-tools.github.io/commitizen/commands/bump/#version_scheme) +- [Version provider](https://commitizen-tools.github.io/commitizen/config/#version-providers) -For all available options, see the [bump command documentation](./commands/bump.md). +For all available options, see the [bump command documentation](https://commitizen-tools.github.io/commitizen/commands/bump/). ### Advanced Usage @@ -219,7 +219,7 @@ pre-commit install --hook-type commit-msg --hook-type pre-push > pre-commit autoupdate > ``` -For more details about commit validation, see the [check command documentation](commands/check.md). +For more details about commit validation, see the [check command documentation](https://commitizen-tools.github.io/commitizen/commands/check/). ## Help & Reference @@ -243,9 +243,9 @@ Commitizen provides a comprehensive CLI with various commands. Here's the comple ### Additional Resources - [Conventional Commits Specification][conventional_commits] -- [Exit Codes Reference](./exit_codes.md) -- [Configuration Guide](./config.md) -- [Command Documentation](./commands/init.md) +- [Exit Codes Reference](https://commitizen-tools.github.io/commitizen/exit_codes/) +- [Configuration Guide](https://commitizen-tools.github.io/commitizen/config/) +- [Command Documentation](https://commitizen-tools.github.io/commitizen/commands/init/) ### Getting Help @@ -257,7 +257,7 @@ cz bump --help cz changelog --help ``` -For more detailed documentation, visit our [documentation site](https://commitizen-tools.github.io/commitizen/). +For more details, visit our [documentation site](https://commitizen-tools.github.io/commitizen/). ## Setting up bash completion From bb1539deb206d58f7b94c3b8ece268f8f34f287d Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 18 May 2025 21:57:02 +0800 Subject: [PATCH 149/159] docs(README): paraphase features --- docs/README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/README.md b/docs/README.md index 078d6da06e..f730c17837 100644 --- a/docs/README.md +++ b/docs/README.md @@ -41,12 +41,13 @@ This standardization makes your commit history more readable and meaningful, whi ### Features -- Command-line utility to create commits with your rules. Defaults: [Conventional commits][conventional_commits] -- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](https://commitizen-tools.github.io/commitizen/commands/bump/) -- Generate a changelog using [Keep a changelog][keepchangelog] -- Update your project's version files automatically -- Display information about your commit rules (commands: schema, example, info) -- Create your own set of rules and publish them to pip. Read more on [Customization](https://commitizen-tools.github.io/commitizen/customization/) +- Interactive CLI for standardized commits with default [Conventional Commits][conventional_commits] support +- Intelligent [version bumping](https://commitizen-tools.github.io/commitizen/commands/bump/) using [Semantic Versioning][semver] +- Automatic [keep a changelog][keepchangelog] generation +- Built-in commit validation with pre-commit hooks +- [Customizable](https://commitizen-tools.github.io/commitizen/customization/) commit rules and templates +- Multi-format version file support +- Custom rules and plugins via pip ## Getting Started From 8e65b88288328dd794e9f8046f5b1164c9afb569 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 01:27:30 +0000 Subject: [PATCH 150/159] docs(cli/screenshots): update CLI screenshots [skip ci] --- docs/images/cli_help/cz___help.svg | 172 +++++++++++++++-------------- 1 file changed, 88 insertions(+), 84 deletions(-) diff --git a/docs/images/cli_help/cz___help.svg b/docs/images/cli_help/cz___help.svg index 098e7df70d..d580cfe619 100644 --- a/docs/images/cli_help/cz___help.svg +++ b/docs/images/cli_help/cz___help.svg @@ -1,4 +1,4 @@ -<svg class="rich-terminal" viewBox="0 0 994 928.4" xmlns="http://www.w3.org/2000/svg"> +<svg class="rich-terminal" viewBox="0 0 994 952.8" xmlns="http://www.w3.org/2000/svg"> <!-- Generated with Rich https://www.textualize.io --> <style> @@ -19,183 +19,187 @@ font-weight: 700; } - .terminal-2205183093-matrix { + .terminal-1389600277-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-2205183093-title { + .terminal-1389600277-title { font-size: 18px; font-weight: bold; font-family: arial; } - .terminal-2205183093-r1 { fill: #c5c8c6 } -.terminal-2205183093-r2 { fill: #c5c8c6;font-weight: bold } -.terminal-2205183093-r3 { fill: #d0b344 } -.terminal-2205183093-r4 { fill: #1984e9;text-decoration: underline; } -.terminal-2205183093-r5 { fill: #68a0b3;font-weight: bold } + .terminal-1389600277-r1 { fill: #c5c8c6 } +.terminal-1389600277-r2 { fill: #c5c8c6;font-weight: bold } +.terminal-1389600277-r3 { fill: #d0b344 } +.terminal-1389600277-r4 { fill: #1984e9;text-decoration: underline; } +.terminal-1389600277-r5 { fill: #68a0b3;font-weight: bold } </style> <defs> - <clipPath id="terminal-2205183093-clip-terminal"> - <rect x="0" y="0" width="975.0" height="877.4" /> + <clipPath id="terminal-1389600277-clip-terminal"> + <rect x="0" y="0" width="975.0" height="901.8" /> </clipPath> - <clipPath id="terminal-2205183093-line-0"> + <clipPath id="terminal-1389600277-line-0"> <rect x="0" y="1.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-1"> +<clipPath id="terminal-1389600277-line-1"> <rect x="0" y="25.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-2"> +<clipPath id="terminal-1389600277-line-2"> <rect x="0" y="50.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-3"> +<clipPath id="terminal-1389600277-line-3"> <rect x="0" y="74.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-4"> +<clipPath id="terminal-1389600277-line-4"> <rect x="0" y="99.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-5"> +<clipPath id="terminal-1389600277-line-5"> <rect x="0" y="123.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-6"> +<clipPath id="terminal-1389600277-line-6"> <rect x="0" y="147.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-7"> +<clipPath id="terminal-1389600277-line-7"> <rect x="0" y="172.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-8"> +<clipPath id="terminal-1389600277-line-8"> <rect x="0" y="196.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-9"> +<clipPath id="terminal-1389600277-line-9"> <rect x="0" y="221.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-10"> +<clipPath id="terminal-1389600277-line-10"> <rect x="0" y="245.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-11"> +<clipPath id="terminal-1389600277-line-11"> <rect x="0" y="269.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-12"> +<clipPath id="terminal-1389600277-line-12"> <rect x="0" y="294.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-13"> +<clipPath id="terminal-1389600277-line-13"> <rect x="0" y="318.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-14"> +<clipPath id="terminal-1389600277-line-14"> <rect x="0" y="343.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-15"> +<clipPath id="terminal-1389600277-line-15"> <rect x="0" y="367.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-16"> +<clipPath id="terminal-1389600277-line-16"> <rect x="0" y="391.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-17"> +<clipPath id="terminal-1389600277-line-17"> <rect x="0" y="416.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-18"> +<clipPath id="terminal-1389600277-line-18"> <rect x="0" y="440.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-19"> +<clipPath id="terminal-1389600277-line-19"> <rect x="0" y="465.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-20"> +<clipPath id="terminal-1389600277-line-20"> <rect x="0" y="489.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-21"> +<clipPath id="terminal-1389600277-line-21"> <rect x="0" y="513.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-22"> +<clipPath id="terminal-1389600277-line-22"> <rect x="0" y="538.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-23"> +<clipPath id="terminal-1389600277-line-23"> <rect x="0" y="562.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-24"> +<clipPath id="terminal-1389600277-line-24"> <rect x="0" y="587.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-25"> +<clipPath id="terminal-1389600277-line-25"> <rect x="0" y="611.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-26"> +<clipPath id="terminal-1389600277-line-26"> <rect x="0" y="635.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-27"> +<clipPath id="terminal-1389600277-line-27"> <rect x="0" y="660.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-28"> +<clipPath id="terminal-1389600277-line-28"> <rect x="0" y="684.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-29"> +<clipPath id="terminal-1389600277-line-29"> <rect x="0" y="709.1" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-30"> +<clipPath id="terminal-1389600277-line-30"> <rect x="0" y="733.5" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-31"> +<clipPath id="terminal-1389600277-line-31"> <rect x="0" y="757.9" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-32"> +<clipPath id="terminal-1389600277-line-32"> <rect x="0" y="782.3" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-33"> +<clipPath id="terminal-1389600277-line-33"> <rect x="0" y="806.7" width="976" height="24.65"/> </clipPath> -<clipPath id="terminal-2205183093-line-34"> +<clipPath id="terminal-1389600277-line-34"> <rect x="0" y="831.1" width="976" height="24.65"/> </clipPath> +<clipPath id="terminal-1389600277-line-35"> + <rect x="0" y="855.5" width="976" height="24.65"/> + </clipPath> </defs> - <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="992" height="926.4" rx="8"/> + <rect fill="#292929" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="1" y="1" width="992" height="950.8" rx="8"/> <g transform="translate(26,22)"> <circle cx="0" cy="0" r="7" fill="#ff5f57"/> <circle cx="22" cy="0" r="7" fill="#febc2e"/> <circle cx="44" cy="0" r="7" fill="#28c840"/> </g> - <g transform="translate(9, 41)" clip-path="url(#terminal-2205183093-clip-terminal)"> + <g transform="translate(9, 41)" clip-path="url(#terminal-1389600277-clip-terminal)"> - <g class="terminal-2205183093-matrix"> - <text class="terminal-2205183093-r1" x="0" y="20" textLength="134.2" clip-path="url(#terminal-2205183093-line-0)">$ cz --help</text><text class="terminal-2205183093-r1" x="976" y="20" textLength="12.2" clip-path="url(#terminal-2205183093-line-0)"> -</text><text class="terminal-2205183093-r1" x="0" y="44.4" textLength="122" clip-path="url(#terminal-2205183093-line-1)">usage: cz </text><text class="terminal-2205183093-r2" x="122" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">[</text><text class="terminal-2205183093-r1" x="134.2" y="44.4" textLength="24.4" clip-path="url(#terminal-2205183093-line-1)">-h</text><text class="terminal-2205183093-r2" x="158.6" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">]</text><text class="terminal-2205183093-r2" x="183" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">[</text><text class="terminal-2205183093-r1" x="195.2" y="44.4" textLength="183" clip-path="url(#terminal-2205183093-line-1)">--config CONFIG</text><text class="terminal-2205183093-r2" x="378.2" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">]</text><text class="terminal-2205183093-r2" x="402.6" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">[</text><text class="terminal-2205183093-r1" x="414.8" y="44.4" textLength="85.4" clip-path="url(#terminal-2205183093-line-1)">--debug</text><text class="terminal-2205183093-r2" x="500.2" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">]</text><text class="terminal-2205183093-r2" x="524.6" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">[</text><text class="terminal-2205183093-r1" x="536.8" y="44.4" textLength="85.4" clip-path="url(#terminal-2205183093-line-1)">-n NAME</text><text class="terminal-2205183093-r2" x="622.2" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">]</text><text class="terminal-2205183093-r2" x="646.6" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">[</text><text class="terminal-2205183093-r1" x="658.8" y="44.4" textLength="146.4" clip-path="url(#terminal-2205183093-line-1)">-nr NO_RAISE</text><text class="terminal-2205183093-r2" x="805.2" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)">]</text><text class="terminal-2205183093-r1" x="976" y="44.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-1)"> -</text><text class="terminal-2205183093-r2" x="122" y="68.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-2)">{</text><text class="terminal-2205183093-r1" x="134.2" y="68.8" textLength="829.6" clip-path="url(#terminal-2205183093-line-2)">init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version</text><text class="terminal-2205183093-r2" x="963.8" y="68.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-2)">}</text><text class="terminal-2205183093-r1" x="976" y="68.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-2)"> -</text><text class="terminal-2205183093-r3" x="0" y="93.2" textLength="36.6" clip-path="url(#terminal-2205183093-line-3)">...</text><text class="terminal-2205183093-r1" x="976" y="93.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-3)"> -</text><text class="terminal-2205183093-r1" x="976" y="117.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-4)"> -</text><text class="terminal-2205183093-r1" x="0" y="142" textLength="707.6" clip-path="url(#terminal-2205183093-line-5)">Commitizen is a cli tool to generate conventional commits.</text><text class="terminal-2205183093-r1" x="976" y="142" textLength="12.2" clip-path="url(#terminal-2205183093-line-5)"> -</text><text class="terminal-2205183093-r1" x="0" y="166.4" textLength="524.6" clip-path="url(#terminal-2205183093-line-6)">For more information about the topic go to </text><text class="terminal-2205183093-r4" x="524.6" y="166.4" textLength="390.4" clip-path="url(#terminal-2205183093-line-6)">https://conventionalcommits.org/</text><text class="terminal-2205183093-r1" x="976" y="166.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-6)"> -</text><text class="terminal-2205183093-r1" x="976" y="190.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-7)"> -</text><text class="terminal-2205183093-r1" x="0" y="215.2" textLength="97.6" clip-path="url(#terminal-2205183093-line-8)">options:</text><text class="terminal-2205183093-r1" x="976" y="215.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-8)"> -</text><text class="terminal-2205183093-r1" x="0" y="239.6" textLength="671" clip-path="url(#terminal-2205183093-line-9)">  -h, --help            show this help message and exit</text><text class="terminal-2205183093-r1" x="976" y="239.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-9)"> -</text><text class="terminal-2205183093-r1" x="0" y="264" textLength="658.8" clip-path="url(#terminal-2205183093-line-10)">  --config CONFIG       the path of configuration file</text><text class="terminal-2205183093-r1" x="976" y="264" textLength="12.2" clip-path="url(#terminal-2205183093-line-10)"> -</text><text class="terminal-2205183093-r1" x="0" y="288.4" textLength="463.6" clip-path="url(#terminal-2205183093-line-11)">  --debug               use debug mode</text><text class="terminal-2205183093-r1" x="976" y="288.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-11)"> -</text><text class="terminal-2205183093-r1" x="0" y="312.8" textLength="597.8" clip-path="url(#terminal-2205183093-line-12)">  -n, --name NAME       use the given commitizen </text><text class="terminal-2205183093-r2" x="597.8" y="312.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-12)">(</text><text class="terminal-2205183093-r1" x="610" y="312.8" textLength="97.6" clip-path="url(#terminal-2205183093-line-12)">default:</text><text class="terminal-2205183093-r1" x="976" y="312.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-12)"> -</text><text class="terminal-2205183093-r1" x="0" y="337.2" textLength="573.4" clip-path="url(#terminal-2205183093-line-13)">                        cz_conventional_commits</text><text class="terminal-2205183093-r2" x="573.4" y="337.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-13)">)</text><text class="terminal-2205183093-r1" x="976" y="337.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-13)"> -</text><text class="terminal-2205183093-r1" x="0" y="361.6" textLength="317.2" clip-path="url(#terminal-2205183093-line-14)">  -nr, --no-raise NO_RAISE</text><text class="terminal-2205183093-r1" x="976" y="361.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-14)"> -</text><text class="terminal-2205183093-r1" x="0" y="386" textLength="902.8" clip-path="url(#terminal-2205183093-line-15)">                        comma separated error codes that won't rise error,</text><text class="terminal-2205183093-r1" x="976" y="386" textLength="12.2" clip-path="url(#terminal-2205183093-line-15)"> -</text><text class="terminal-2205183093-r1" x="0" y="410.4" textLength="439.2" clip-path="url(#terminal-2205183093-line-16)">                        e.g: cz -nr </text><text class="terminal-2205183093-r5" x="439.2" y="410.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-16)">1</text><text class="terminal-2205183093-r1" x="451.4" y="410.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-16)">,</text><text class="terminal-2205183093-r5" x="463.6" y="410.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-16)">2</text><text class="terminal-2205183093-r1" x="475.8" y="410.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-16)">,</text><text class="terminal-2205183093-r5" x="488" y="410.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-16)">3</text><text class="terminal-2205183093-r1" x="500.2" y="410.4" textLength="231.8" clip-path="url(#terminal-2205183093-line-16)"> bump. See codes at</text><text class="terminal-2205183093-r1" x="976" y="410.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-16)"> -</text><text class="terminal-2205183093-r4" x="292.8" y="434.8" textLength="231.8" clip-path="url(#terminal-2205183093-line-17)">https://commitizen-</text><text class="terminal-2205183093-r1" x="976" y="434.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-17)"> -</text><text class="terminal-2205183093-r1" x="0" y="459.2" textLength="756.4" clip-path="url(#terminal-2205183093-line-18)">                        tools.github.io/commitizen/exit_codes/</text><text class="terminal-2205183093-r1" x="976" y="459.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-18)"> -</text><text class="terminal-2205183093-r1" x="976" y="483.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-19)"> -</text><text class="terminal-2205183093-r1" x="0" y="508" textLength="109.8" clip-path="url(#terminal-2205183093-line-20)">commands:</text><text class="terminal-2205183093-r1" x="976" y="508" textLength="12.2" clip-path="url(#terminal-2205183093-line-20)"> -</text><text class="terminal-2205183093-r2" x="24.4" y="532.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-21)">{</text><text class="terminal-2205183093-r1" x="36.6" y="532.4" textLength="829.6" clip-path="url(#terminal-2205183093-line-21)">init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version</text><text class="terminal-2205183093-r2" x="866.2" y="532.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-21)">}</text><text class="terminal-2205183093-r1" x="976" y="532.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-21)"> -</text><text class="terminal-2205183093-r1" x="0" y="556.8" textLength="646.6" clip-path="url(#terminal-2205183093-line-22)">    init                init commitizen configuration</text><text class="terminal-2205183093-r1" x="976" y="556.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-22)"> -</text><text class="terminal-2205183093-r1" x="0" y="581.2" textLength="134.2" clip-path="url(#terminal-2205183093-line-23)">    commit </text><text class="terminal-2205183093-r2" x="134.2" y="581.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-23)">(</text><text class="terminal-2205183093-r1" x="146.4" y="581.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-23)">c</text><text class="terminal-2205183093-r2" x="158.6" y="581.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-23)">)</text><text class="terminal-2205183093-r1" x="170.8" y="581.2" textLength="329.4" clip-path="url(#terminal-2205183093-line-23)">          create new commit</text><text class="terminal-2205183093-r1" x="976" y="581.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-23)"> -</text><text class="terminal-2205183093-r1" x="0" y="605.6" textLength="610" clip-path="url(#terminal-2205183093-line-24)">    ls                  show available commitizens</text><text class="terminal-2205183093-r1" x="976" y="605.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-24)"> -</text><text class="terminal-2205183093-r1" x="0" y="630" textLength="524.6" clip-path="url(#terminal-2205183093-line-25)">    example             show commit example</text><text class="terminal-2205183093-r1" x="976" y="630" textLength="12.2" clip-path="url(#terminal-2205183093-line-25)"> -</text><text class="terminal-2205183093-r1" x="0" y="654.4" textLength="646.6" clip-path="url(#terminal-2205183093-line-26)">    info                show information about the cz</text><text class="terminal-2205183093-r1" x="976" y="654.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-26)"> -</text><text class="terminal-2205183093-r1" x="0" y="678.8" textLength="512.4" clip-path="url(#terminal-2205183093-line-27)">    schema              show commit schema</text><text class="terminal-2205183093-r1" x="976" y="678.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-27)"> -</text><text class="terminal-2205183093-r1" x="0" y="703.2" textLength="805.2" clip-path="url(#terminal-2205183093-line-28)">    bump                bump semantic version based on the git log</text><text class="terminal-2205183093-r1" x="976" y="703.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-28)"> -</text><text class="terminal-2205183093-r1" x="0" y="727.6" textLength="170.8" clip-path="url(#terminal-2205183093-line-29)">    changelog </text><text class="terminal-2205183093-r2" x="170.8" y="727.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-29)">(</text><text class="terminal-2205183093-r1" x="183" y="727.6" textLength="24.4" clip-path="url(#terminal-2205183093-line-29)">ch</text><text class="terminal-2205183093-r2" x="207.4" y="727.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-29)">)</text><text class="terminal-2205183093-r1" x="219.6" y="727.6" textLength="305" clip-path="url(#terminal-2205183093-line-29)">      generate changelog </text><text class="terminal-2205183093-r2" x="524.6" y="727.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-29)">(</text><text class="terminal-2205183093-r1" x="536.8" y="727.6" textLength="329.4" clip-path="url(#terminal-2205183093-line-29)">note that it will overwrite</text><text class="terminal-2205183093-r1" x="976" y="727.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-29)"> -</text><text class="terminal-2205183093-r1" x="0" y="752" textLength="451.4" clip-path="url(#terminal-2205183093-line-30)">                        existing file</text><text class="terminal-2205183093-r2" x="451.4" y="752" textLength="12.2" clip-path="url(#terminal-2205183093-line-30)">)</text><text class="terminal-2205183093-r1" x="976" y="752" textLength="12.2" clip-path="url(#terminal-2205183093-line-30)"> -</text><text class="terminal-2205183093-r1" x="0" y="776.4" textLength="951.6" clip-path="url(#terminal-2205183093-line-31)">    check               validates that a commit message matches the commitizen</text><text class="terminal-2205183093-r1" x="976" y="776.4" textLength="12.2" clip-path="url(#terminal-2205183093-line-31)"> -</text><text class="terminal-2205183093-r1" x="0" y="800.8" textLength="366" clip-path="url(#terminal-2205183093-line-32)">                        schema</text><text class="terminal-2205183093-r1" x="976" y="800.8" textLength="12.2" clip-path="url(#terminal-2205183093-line-32)"> -</text><text class="terminal-2205183093-r1" x="0" y="825.2" textLength="902.8" clip-path="url(#terminal-2205183093-line-33)">    version             get the version of the installed commitizen or the</text><text class="terminal-2205183093-r1" x="976" y="825.2" textLength="12.2" clip-path="url(#terminal-2205183093-line-33)"> -</text><text class="terminal-2205183093-r1" x="0" y="849.6" textLength="488" clip-path="url(#terminal-2205183093-line-34)">                        current project </text><text class="terminal-2205183093-r2" x="488" y="849.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-34)">(</text><text class="terminal-2205183093-r1" x="500.2" y="849.6" textLength="353.8" clip-path="url(#terminal-2205183093-line-34)">default: installed commitizen</text><text class="terminal-2205183093-r2" x="854" y="849.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-34)">)</text><text class="terminal-2205183093-r1" x="976" y="849.6" textLength="12.2" clip-path="url(#terminal-2205183093-line-34)"> -</text><text class="terminal-2205183093-r1" x="976" y="874" textLength="12.2" clip-path="url(#terminal-2205183093-line-35)"> + <g class="terminal-1389600277-matrix"> + <text class="terminal-1389600277-r1" x="0" y="20" textLength="134.2" clip-path="url(#terminal-1389600277-line-0)">$ cz --help</text><text class="terminal-1389600277-r1" x="976" y="20" textLength="12.2" clip-path="url(#terminal-1389600277-line-0)"> +</text><text class="terminal-1389600277-r1" x="0" y="44.4" textLength="122" clip-path="url(#terminal-1389600277-line-1)">usage: cz </text><text class="terminal-1389600277-r2" x="122" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">[</text><text class="terminal-1389600277-r1" x="134.2" y="44.4" textLength="24.4" clip-path="url(#terminal-1389600277-line-1)">-h</text><text class="terminal-1389600277-r2" x="158.6" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">]</text><text class="terminal-1389600277-r2" x="183" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">[</text><text class="terminal-1389600277-r1" x="195.2" y="44.4" textLength="183" clip-path="url(#terminal-1389600277-line-1)">--config CONFIG</text><text class="terminal-1389600277-r2" x="378.2" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">]</text><text class="terminal-1389600277-r2" x="402.6" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">[</text><text class="terminal-1389600277-r1" x="414.8" y="44.4" textLength="85.4" clip-path="url(#terminal-1389600277-line-1)">--debug</text><text class="terminal-1389600277-r2" x="500.2" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">]</text><text class="terminal-1389600277-r2" x="524.6" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">[</text><text class="terminal-1389600277-r1" x="536.8" y="44.4" textLength="85.4" clip-path="url(#terminal-1389600277-line-1)">-n NAME</text><text class="terminal-1389600277-r2" x="622.2" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">]</text><text class="terminal-1389600277-r2" x="646.6" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">[</text><text class="terminal-1389600277-r1" x="658.8" y="44.4" textLength="146.4" clip-path="url(#terminal-1389600277-line-1)">-nr NO_RAISE</text><text class="terminal-1389600277-r2" x="805.2" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)">]</text><text class="terminal-1389600277-r1" x="976" y="44.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-1)"> +</text><text class="terminal-1389600277-r2" x="122" y="68.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-2)">{</text><text class="terminal-1389600277-r1" x="134.2" y="68.8" textLength="829.6" clip-path="url(#terminal-1389600277-line-2)">init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version</text><text class="terminal-1389600277-r2" x="963.8" y="68.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-2)">}</text><text class="terminal-1389600277-r1" x="976" y="68.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-2)"> +</text><text class="terminal-1389600277-r3" x="0" y="93.2" textLength="36.6" clip-path="url(#terminal-1389600277-line-3)">...</text><text class="terminal-1389600277-r1" x="976" y="93.2" textLength="12.2" clip-path="url(#terminal-1389600277-line-3)"> +</text><text class="terminal-1389600277-r1" x="976" y="117.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-4)"> +</text><text class="terminal-1389600277-r1" x="0" y="142" textLength="915" clip-path="url(#terminal-1389600277-line-5)">Commitizen is a powerful release management tool that helps teams maintain </text><text class="terminal-1389600277-r1" x="976" y="142" textLength="12.2" clip-path="url(#terminal-1389600277-line-5)"> +</text><text class="terminal-1389600277-r1" x="0" y="166.4" textLength="951.6" clip-path="url(#terminal-1389600277-line-6)">consistent and meaningful commit messages while automating version management.</text><text class="terminal-1389600277-r1" x="976" y="166.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-6)"> +</text><text class="terminal-1389600277-r1" x="0" y="190.8" textLength="427" clip-path="url(#terminal-1389600277-line-7)">For more information, please visit </text><text class="terminal-1389600277-r4" x="427" y="190.8" textLength="549" clip-path="url(#terminal-1389600277-line-7)">https://commitizen-tools.github.io/commitizen</text><text class="terminal-1389600277-r1" x="976" y="190.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-7)"> +</text><text class="terminal-1389600277-r1" x="976" y="215.2" textLength="12.2" clip-path="url(#terminal-1389600277-line-8)"> +</text><text class="terminal-1389600277-r1" x="0" y="239.6" textLength="97.6" clip-path="url(#terminal-1389600277-line-9)">options:</text><text class="terminal-1389600277-r1" x="976" y="239.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-9)"> +</text><text class="terminal-1389600277-r1" x="0" y="264" textLength="671" clip-path="url(#terminal-1389600277-line-10)">  -h, --help            show this help message and exit</text><text class="terminal-1389600277-r1" x="976" y="264" textLength="12.2" clip-path="url(#terminal-1389600277-line-10)"> +</text><text class="terminal-1389600277-r1" x="0" y="288.4" textLength="658.8" clip-path="url(#terminal-1389600277-line-11)">  --config CONFIG       the path of configuration file</text><text class="terminal-1389600277-r1" x="976" y="288.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-11)"> +</text><text class="terminal-1389600277-r1" x="0" y="312.8" textLength="463.6" clip-path="url(#terminal-1389600277-line-12)">  --debug               use debug mode</text><text class="terminal-1389600277-r1" x="976" y="312.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-12)"> +</text><text class="terminal-1389600277-r1" x="0" y="337.2" textLength="597.8" clip-path="url(#terminal-1389600277-line-13)">  -n, --name NAME       use the given commitizen </text><text class="terminal-1389600277-r2" x="597.8" y="337.2" textLength="12.2" clip-path="url(#terminal-1389600277-line-13)">(</text><text class="terminal-1389600277-r1" x="610" y="337.2" textLength="97.6" clip-path="url(#terminal-1389600277-line-13)">default:</text><text class="terminal-1389600277-r1" x="976" y="337.2" textLength="12.2" clip-path="url(#terminal-1389600277-line-13)"> +</text><text class="terminal-1389600277-r1" x="0" y="361.6" textLength="573.4" clip-path="url(#terminal-1389600277-line-14)">                        cz_conventional_commits</text><text class="terminal-1389600277-r2" x="573.4" y="361.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-14)">)</text><text class="terminal-1389600277-r1" x="976" y="361.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-14)"> +</text><text class="terminal-1389600277-r1" x="0" y="386" textLength="317.2" clip-path="url(#terminal-1389600277-line-15)">  -nr, --no-raise NO_RAISE</text><text class="terminal-1389600277-r1" x="976" y="386" textLength="12.2" clip-path="url(#terminal-1389600277-line-15)"> +</text><text class="terminal-1389600277-r1" x="0" y="410.4" textLength="915" clip-path="url(#terminal-1389600277-line-16)">                        comma separated error codes that won't raise error,</text><text class="terminal-1389600277-r1" x="976" y="410.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-16)"> +</text><text class="terminal-1389600277-r1" x="0" y="434.8" textLength="439.2" clip-path="url(#terminal-1389600277-line-17)">                        e.g: cz -nr </text><text class="terminal-1389600277-r5" x="439.2" y="434.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-17)">1</text><text class="terminal-1389600277-r1" x="451.4" y="434.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-17)">,</text><text class="terminal-1389600277-r5" x="463.6" y="434.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-17)">2</text><text class="terminal-1389600277-r1" x="475.8" y="434.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-17)">,</text><text class="terminal-1389600277-r5" x="488" y="434.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-17)">3</text><text class="terminal-1389600277-r1" x="500.2" y="434.8" textLength="231.8" clip-path="url(#terminal-1389600277-line-17)"> bump. See codes at</text><text class="terminal-1389600277-r1" x="976" y="434.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-17)"> +</text><text class="terminal-1389600277-r4" x="292.8" y="459.2" textLength="231.8" clip-path="url(#terminal-1389600277-line-18)">https://commitizen-</text><text class="terminal-1389600277-r1" x="976" y="459.2" textLength="12.2" clip-path="url(#terminal-1389600277-line-18)"> +</text><text class="terminal-1389600277-r1" x="0" y="483.6" textLength="756.4" clip-path="url(#terminal-1389600277-line-19)">                        tools.github.io/commitizen/exit_codes/</text><text class="terminal-1389600277-r1" x="976" y="483.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-19)"> +</text><text class="terminal-1389600277-r1" x="976" y="508" textLength="12.2" clip-path="url(#terminal-1389600277-line-20)"> +</text><text class="terminal-1389600277-r1" x="0" y="532.4" textLength="109.8" clip-path="url(#terminal-1389600277-line-21)">commands:</text><text class="terminal-1389600277-r1" x="976" y="532.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-21)"> +</text><text class="terminal-1389600277-r2" x="24.4" y="556.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-22)">{</text><text class="terminal-1389600277-r1" x="36.6" y="556.8" textLength="829.6" clip-path="url(#terminal-1389600277-line-22)">init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version</text><text class="terminal-1389600277-r2" x="866.2" y="556.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-22)">}</text><text class="terminal-1389600277-r1" x="976" y="556.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-22)"> +</text><text class="terminal-1389600277-r1" x="0" y="581.2" textLength="646.6" clip-path="url(#terminal-1389600277-line-23)">    init                init commitizen configuration</text><text class="terminal-1389600277-r1" x="976" y="581.2" textLength="12.2" clip-path="url(#terminal-1389600277-line-23)"> +</text><text class="terminal-1389600277-r1" x="0" y="605.6" textLength="134.2" clip-path="url(#terminal-1389600277-line-24)">    commit </text><text class="terminal-1389600277-r2" x="134.2" y="605.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-24)">(</text><text class="terminal-1389600277-r1" x="146.4" y="605.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-24)">c</text><text class="terminal-1389600277-r2" x="158.6" y="605.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-24)">)</text><text class="terminal-1389600277-r1" x="170.8" y="605.6" textLength="329.4" clip-path="url(#terminal-1389600277-line-24)">          create new commit</text><text class="terminal-1389600277-r1" x="976" y="605.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-24)"> +</text><text class="terminal-1389600277-r1" x="0" y="630" textLength="610" clip-path="url(#terminal-1389600277-line-25)">    ls                  show available commitizens</text><text class="terminal-1389600277-r1" x="976" y="630" textLength="12.2" clip-path="url(#terminal-1389600277-line-25)"> +</text><text class="terminal-1389600277-r1" x="0" y="654.4" textLength="524.6" clip-path="url(#terminal-1389600277-line-26)">    example             show commit example</text><text class="terminal-1389600277-r1" x="976" y="654.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-26)"> +</text><text class="terminal-1389600277-r1" x="0" y="678.8" textLength="646.6" clip-path="url(#terminal-1389600277-line-27)">    info                show information about the cz</text><text class="terminal-1389600277-r1" x="976" y="678.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-27)"> +</text><text class="terminal-1389600277-r1" x="0" y="703.2" textLength="512.4" clip-path="url(#terminal-1389600277-line-28)">    schema              show commit schema</text><text class="terminal-1389600277-r1" x="976" y="703.2" textLength="12.2" clip-path="url(#terminal-1389600277-line-28)"> +</text><text class="terminal-1389600277-r1" x="0" y="727.6" textLength="805.2" clip-path="url(#terminal-1389600277-line-29)">    bump                bump semantic version based on the git log</text><text class="terminal-1389600277-r1" x="976" y="727.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-29)"> +</text><text class="terminal-1389600277-r1" x="0" y="752" textLength="170.8" clip-path="url(#terminal-1389600277-line-30)">    changelog </text><text class="terminal-1389600277-r2" x="170.8" y="752" textLength="12.2" clip-path="url(#terminal-1389600277-line-30)">(</text><text class="terminal-1389600277-r1" x="183" y="752" textLength="24.4" clip-path="url(#terminal-1389600277-line-30)">ch</text><text class="terminal-1389600277-r2" x="207.4" y="752" textLength="12.2" clip-path="url(#terminal-1389600277-line-30)">)</text><text class="terminal-1389600277-r1" x="219.6" y="752" textLength="305" clip-path="url(#terminal-1389600277-line-30)">      generate changelog </text><text class="terminal-1389600277-r2" x="524.6" y="752" textLength="12.2" clip-path="url(#terminal-1389600277-line-30)">(</text><text class="terminal-1389600277-r1" x="536.8" y="752" textLength="329.4" clip-path="url(#terminal-1389600277-line-30)">note that it will overwrite</text><text class="terminal-1389600277-r1" x="976" y="752" textLength="12.2" clip-path="url(#terminal-1389600277-line-30)"> +</text><text class="terminal-1389600277-r1" x="0" y="776.4" textLength="451.4" clip-path="url(#terminal-1389600277-line-31)">                        existing file</text><text class="terminal-1389600277-r2" x="451.4" y="776.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-31)">)</text><text class="terminal-1389600277-r1" x="976" y="776.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-31)"> +</text><text class="terminal-1389600277-r1" x="0" y="800.8" textLength="951.6" clip-path="url(#terminal-1389600277-line-32)">    check               validates that a commit message matches the commitizen</text><text class="terminal-1389600277-r1" x="976" y="800.8" textLength="12.2" clip-path="url(#terminal-1389600277-line-32)"> +</text><text class="terminal-1389600277-r1" x="0" y="825.2" textLength="366" clip-path="url(#terminal-1389600277-line-33)">                        schema</text><text class="terminal-1389600277-r1" x="976" y="825.2" textLength="12.2" clip-path="url(#terminal-1389600277-line-33)"> +</text><text class="terminal-1389600277-r1" x="0" y="849.6" textLength="902.8" clip-path="url(#terminal-1389600277-line-34)">    version             get the version of the installed commitizen or the</text><text class="terminal-1389600277-r1" x="976" y="849.6" textLength="12.2" clip-path="url(#terminal-1389600277-line-34)"> +</text><text class="terminal-1389600277-r1" x="0" y="874" textLength="488" clip-path="url(#terminal-1389600277-line-35)">                        current project </text><text class="terminal-1389600277-r2" x="488" y="874" textLength="12.2" clip-path="url(#terminal-1389600277-line-35)">(</text><text class="terminal-1389600277-r1" x="500.2" y="874" textLength="353.8" clip-path="url(#terminal-1389600277-line-35)">default: installed commitizen</text><text class="terminal-1389600277-r2" x="854" y="874" textLength="12.2" clip-path="url(#terminal-1389600277-line-35)">)</text><text class="terminal-1389600277-r1" x="976" y="874" textLength="12.2" clip-path="url(#terminal-1389600277-line-35)"> +</text><text class="terminal-1389600277-r1" x="976" y="898.4" textLength="12.2" clip-path="url(#terminal-1389600277-line-36)"> </text> </g> </g> From aaa64aca07db9acd52ee069fc4abb572524e0cf4 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sat, 24 May 2025 00:56:51 +0800 Subject: [PATCH 151/159] docs(faq): add features we wont add Closes #1129 --- docs/faq.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/faq.md b/docs/faq.md index ceabac2e10..920f533d73 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,3 +1,11 @@ +## Features we won't add + +For a comprehensive list of features that have been considered but won't be implemented, please refer to our [issue tracker](https://github.com/commitizen-tools/commitizen/issues?q=is:issue%20state:closed%20label:%22issue-status:%20wont-fix%22%20OR%20label:%22issue-status:%20wont-implement%22). + +- Enable multiple locations of config file `.cz.*` [#955](https://github.com/commitizen-tools/commitizen/issues/955) +- Create a flag to build the changelog from commits in multiple git repositories [#790](https://github.com/commitizen-tools/commitizen/issues/790) +- Global Configuration [#597](https://github.com/commitizen-tools/commitizen/issues/597) + ## Support for PEP621 PEP621 establishes a `[project]` definition inside `pyproject.toml` From 3560156e518416846baec3cd7d3b772a7478ffb8 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sat, 24 May 2025 01:17:32 +0800 Subject: [PATCH 152/159] docs(bump): rewrite bump about section, fix incorrect version increment rules Closes #781 --- docs/commands/bump.md | 92 ++++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 32 deletions(-) diff --git a/docs/commands/bump.md b/docs/commands/bump.md index ee3d77430a..d399ec9eb8 100644 --- a/docs/commands/bump.md +++ b/docs/commands/bump.md @@ -2,51 +2,79 @@ ## About -`cz bump` **automatically** increases the version, based on the commits. +`cz bump` is a powerful command that **automatically** determines and increases your project's version number based on your commit history. It analyzes your commits to determine the appropriate version increment according to semantic versioning principles. -The commits should follow the rules established by the committer in order to be parsed correctly. +### Key Features -**prerelease** versions are supported (alpha, beta, release candidate). +- **Automatic Version Detection**: Analyzes commit history to determine the appropriate version bump +- **Manual Version Control**: Supports manual version specification when needed +- **Pre-release Support**: Handles alpha, beta, and release candidate versions +- **Multiple Version Schemes**: Supports both [PEP 0440][pep440] and [semantic versioning][semver] formats -The version can also be **manually** bumped. +### Version Increment Rules -The version format follows [PEP 0440][pep440] and [semantic versioning][semver]. - -This means `MAJOR.MINOR.PATCH` +The version follows the `MAJOR.MINOR.PATCH` format, with increments determined by your commit types: | Increment | Description | Conventional commit map | | --------- | --------------------------- | ----------------------- | -| `MAJOR` | Breaking changes introduced | `BREAKING CHANGE` | +| `MAJOR` | Breaking changes introduced | `BREAKING CHANGE`, bang (e.g. `feat!`)| | `MINOR` | New features | `feat` | -| `PATCH` | Fixes | `fix` + everything else | +| `PATCH` | Fixes and improvements | `fix`, `perf`, `refactor`| + +### Version Schemes -[PEP 0440][pep440] is the default, you can switch by using the setting `version_scheme` or the cli: +By default, Commitizen uses [PEP 0440][pep440] for version formatting. You can switch to semantic versioning using either: +1. Command line: ```sh cz bump --version-scheme semver ``` -Some examples of pep440: +2. Configuration file: +```toml +[tool.commitizen] +version_scheme = "semver" +``` -```bash -0.9.0 -0.9.1 -0.9.2 -0.9.10 -0.9.11 -1.0.0a0 # alpha -1.0.0a1 -1.0.0b0 # beta -1.0.0rc0 # release candidate -1.0.0rc1 -1.0.0 -1.0.1 -1.1.0 -2.0.0 -2.0.1a -``` - -`post` releases are not supported yet. +### PEP440 Version Examples + +Commitizen supports the [PEP 440][pep440] version format, which includes several version types. Here are examples of each: + +#### Standard Releases +```text +0.9.0 # Initial development release +0.9.1 # Patch release +0.9.2 # Another patch release +0.9.10 # Tenth patch release +0.9.11 # Eleventh patch release +1.0.0 # First stable release +1.0.1 # Patch release after stable +1.1.0 # Minor feature release +2.0.0 # Major version release +``` + +#### Pre-releases +```text +1.0.0a0 # Alpha release 0 +1.0.0a1 # Alpha release 1 +1.0.0b0 # Beta release 0 +1.0.0rc0 # Release candidate 0 +1.0.0rc1 # Release candidate 1 +``` + +#### Development Releases +```text +1.0.0.dev0 # Development release 0 +1.0.0.dev1 # Development release 1 +``` + +#### Combined Pre-release and Development +```text +1.0.0a1.dev0 # Development release 0 of alpha 1 +1.0.0b2.dev1 # Development release 1 of beta 2 +``` + +> **Note**: `post` releases (e.g., `1.0.0.post1`) are not currently supported. ## Usage @@ -97,7 +125,7 @@ by their precedence and showcase how a release might flow through a development By default, `--increment-mode` is set to `linear`, which ensures that bumping pre-releases _maintains linearity_: bumping of a pre-release with lower precedence than the current pre-release phase maintains the current phase of higher precedence. For example, if the current version is `1.0.0b1` then bumping with `--prerelease alpha` will -continue to bump the “beta” phase. +continue to bump the "beta" phase. Setting `--increment-mode` to `exact` instructs `cz bump` to instead apply the exact changes that have been specified with `--increment` or determined from the commit log. For example, @@ -223,7 +251,7 @@ If used together with a manual version the command also fails. We recommend setting `major_version_zero = true` in your configuration file while a project is in its initial development. Remove that configuration using a breaking-change commit to bump -your project’s major version to `v1.0.0` once your project has reached maturity. +your project's major version to `v1.0.0` once your project has reached maturity. ### `--version-scheme` From 08ced5dbfc6a3283be7cfac87afb86a652069622 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Wed, 28 May 2025 18:04:31 +0800 Subject: [PATCH 153/159] docs(README): fix broken bullet points --- docs/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/README.md b/docs/README.md index f730c17837..31f2a77d15 100644 --- a/docs/README.md +++ b/docs/README.md @@ -163,12 +163,14 @@ cz bump ``` This command: + - Bumps your project's version - Creates a git tag - Updates the changelog (if `update_changelog_on_bump` is enabled) - Updates version files You can customize: + - [Version files](https://commitizen-tools.github.io/commitizen/commands/bump/#version_files) - [Version scheme](https://commitizen-tools.github.io/commitizen/commands/bump/#version_scheme) - [Version provider](https://commitizen-tools.github.io/commitizen/config/#version-providers) @@ -187,6 +189,7 @@ cz changelog --dry-run "$(cz version -p)" ``` This command is particularly useful for automation scripts and CI/CD pipelines. + For example, you can use the output of the command `cz changelog --dry-run "$(cz version -p)"` to notify your team about a new release in Slack. #### Pre-commit Integration From 59e7532cccabf08a0a4b633a13ee174853f5c6f0 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Wed, 28 May 2025 18:31:53 +0800 Subject: [PATCH 154/159] docs(external_links): typo --- docs/external_links.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/external_links.md b/docs/external_links.md index 24e4127d86..a90bbd085b 100644 --- a/docs/external_links.md +++ b/docs/external_links.md @@ -4,7 +4,7 @@ | Name | Speaker | Occasion | Language | Extra | | ------------------------------------------------------------------------- | --------------- | ---------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | -| commitizen-tools: What can we gain from crafting a git message convention | Wei Lee | Taipey.py 2020 June Meetup, Remote Python Pizza 2020 | English | [slides](https://speakerdeck.com/leew/commitizen-tools-what-can-we-gain-from-crafting-a-git-message-convention-at-taipey-dot-py) | +| commitizen-tools: What can we gain from crafting a git message convention | Wei Lee | Taipei.py 2020 June Meetup, Remote Python Pizza 2020 | English | [slides](https://speakerdeck.com/leew/commitizen-tools-what-can-we-gain-from-crafting-a-git-message-convention-at-taipey-dot-py) | | Automating release cycles | Santiago Fraire | PyAmsterdam June 24, 2020, Online | English | [slides](https://woile.github.io/commitizen-presentation/) | | [Automatizando Releases con Commitizen y Github Actions][automatizando] | Santiago Fraire | PyConAr 2020, Remote | Español | [slides](https://woile.github.io/automating-releases-github-actions-presentation/#/) | From 739abd50a12f996144fc73a5f5dc0fa668b252dc Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Wed, 28 May 2025 17:52:14 +0800 Subject: [PATCH 155/159] docs(init): rewrite commands init page --- docs/commands/init.md | 67 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/docs/commands/init.md b/docs/commands/init.md index a799c44810..4d92112d34 100644 --- a/docs/commands/init.md +++ b/docs/commands/init.md @@ -1,27 +1,66 @@ +The `cz init` command helps you set up Commitizen in your project by creating a configuration file with your preferred settings. + ## Usage ![cz init --help](../images/cli_help/cz_init___help.svg) -## Example - -To start using Commitizen, the recommended approach is to run +## Command ```sh cz init ``` +## Interactive Configuration + +When you run `cz init`, Commitizen will guide you through an interactive setup process: + ![init](../images/init.gif) -This command will ask you for information about the project and will -configure the selected file type (`pyproject.toml`, `.cz.toml`, etc.). +## Configuration File + +The initialization process will create a configuration file in your project root. + +Choose the configuration file format based on your project type: + +- Use `pyproject.toml` for Python projects +- Use `.cz.toml`, `.cz.yaml`, `.cz.json`, etc. for other projects. + +## Configuration Options + +During the initialization process, you'll be prompted to configure the following settings: + +1. **Convention Rules**: Select the commit message convention to follow (e.g., conventional commits) +2. **Version Provider**: Choose how to manage versioning in your project. Commitizen supports multiple version management systems: + - `commitizen`: Uses Commitizen's built-in version management system + - `npm`: Manages version in `package.json` for Node.js projects + - `cargo`: Manages version in `Cargo.toml` for Rust projects + - `composer`: Manages version in `composer.json` for PHP projects + - `pep621`: Uses `pyproject.toml` with PEP 621 standard + - `poetry`: Uses `pyproject.toml` with Poetry configuration + - `uv`: Uses `pyproject.toml` and `uv.lock` for Python projects + - `scm`: Reads version directly from git tags without modifying files +3. **Project Version**: The current version of your project will be detected automatically +4. **Tag Format**: The format used for version tags in your repository +5. **Version Type**: Choose between: + - `semver` or `semver2`: Semantic Versioning (MAJOR.MINOR.PATCH) + - `pep440`: Python Package Versioning +6. **Changelog Generation**: Configure whether to automatically generate changelog during version bumps +7. **Alpha Versioning**: Option to keep major version at 0 for alpha/beta software +8. **Pre-commit Hooks**: Set up Git pre-commit hooks for automated commit message validation + +## Example + +```sh +# Start the initialization process +cz init + +# Follow the interactive prompts to configure your project +``` + +## Next Steps -The `init` will help you with +After initialization, you can: -1. Choose a convention rules (`name`) -2. Choosing a version provider (`commitizen` or for example `Cargo.toml`) -3. Detecting your project's version -4. Detecting the tag format used -5. Choosing a version type (`semver` or `pep440`) -6. Whether to create the changelog automatically or not during bump -7. Whether you want to keep the major as zero while building alpha software. -8. Whether to setup pre-commit hooks. +1. Start using `cz commit` to create conventional commits +2. Use `cz bump` to manage versioning +3. Configure additional settings in your project's configuration file From ceb2b7afef13b48a1fe978de3e4cbba472fb6609 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Wed, 28 May 2025 18:25:30 +0800 Subject: [PATCH 156/159] docs: correct case GitHub --- docs/commands/bump.md | 2 +- docs/tutorials/github_actions.md | 2 +- mkdocs.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/commands/bump.md b/docs/commands/bump.md index d399ec9eb8..8219cc3461 100644 --- a/docs/commands/bump.md +++ b/docs/commands/bump.md @@ -219,7 +219,7 @@ understand that the user wants to create a changelog. It is recommended to be explicit and use `--changelog` (or the setting `update_changelog_on_bump`). This command is useful to "transport" the newly created changelog. -It can be sent to an auditing system, or to create a Github Release. +It can be sent to an auditing system, or to create a GitHub Release. Example: diff --git a/docs/tutorials/github_actions.md b/docs/tutorials/github_actions.md index bf08eb3bc5..2cb58cfee6 100644 --- a/docs/tutorials/github_actions.md +++ b/docs/tutorials/github_actions.md @@ -1,4 +1,4 @@ -## Create a new release with Github Actions +## Create a new release with GitHub Actions ### Automatic bumping of version diff --git a/mkdocs.yml b/mkdocs.yml index a8a2fe2d44..7b1e0feb30 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -50,7 +50,7 @@ nav: - Auto check commits: "tutorials/auto_check.md" - Auto prepare commit message: "tutorials/auto_prepare_commit_message.md" - GitLab CI: "tutorials/gitlab_ci.md" - - Github Actions: "tutorials/github_actions.md" + - GitHub Actions: "tutorials/github_actions.md" - Jenkins pipeline: "tutorials/jenkins_pipeline.md" - Developmental releases: "tutorials/dev_releases.md" - Monorepo support: "tutorials/monorepo_guidance.md" From 4b6b3fb4f9782ed0d55db5518b1e1523e0779eea Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Wed, 28 May 2025 18:16:16 +0800 Subject: [PATCH 157/159] docs(commit): rewrite command commit page --- docs/commands/commit.md | 75 ++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/docs/commands/commit.md b/docs/commands/commit.md index febaee3cf2..5a073a2644 100644 --- a/docs/commands/commit.md +++ b/docs/commands/commit.md @@ -1,52 +1,65 @@ +## Usage + +![cz commit --help](../images/cli_help/cz_commit___help.svg) + +## Overview + ![Using Commitizen cli](../images/demo.gif) -## About +The `commit` command provides an interactive way to create structured commits. Use either: -In your terminal run `cz commit` or the shortcut `cz c` to generate a guided git commit. +- `cz commit` +- `cz c` (shortcut) -You can run `cz commit --write-message-to-file COMMIT_MSG_FILE` to additionally save the -generated message to a file. This can be combined with the `--dry-run` flag to only -write the message to a file and not modify files and create a commit. A possible use -case for this is to [automatically prepare a commit message](../tutorials/auto_prepare_commit_message.md). +By default, Commitizen uses conventional commits, but you can customize the commit rules to match your project's needs. See the [customization guide](../customization.md) for details. +## Basic Usage -!!! note - To maintain platform compatibility, the `commit` command disable ANSI escaping in its output. - In particular pre-commit hooks coloring will be deactivated as discussed in [commitizen-tools/commitizen#417](https://github.com/commitizen-tools/commitizen/issues/417). +### Interactive Commit Creation -## Usage +Simply run `cz commit` in your terminal to start the interactive commit creation process. The command will guide you through creating a properly formatted commit message according to your configured rules. -![cz commit --help](../images/cli_help/cz_commit___help.svg) +### Writing Messages to File -### git options +You can save the generated commit message to a file using: +```sh +cz commit --write-message-to-file COMMIT_MSG_FILE +``` -`git` command options that are not implemented by Commitizen can be use via the `--` syntax for the `commit` command. -The syntax separates Commitizen arguments from `git commit` arguments by a double dash. This is the resulting syntax: +This can be combined with `--dry-run` to only write the message without creating a commit. This is particularly useful for [automatically preparing commit messages](../tutorials/auto_prepare_commit_message.md). + +## Advanced Features + +### Git Command Options + +You can pass any git commit options using the `--` syntax: ```sh cz commit <commitizen-args> -- <git-cli-args> -# e.g., cz commit --dry-run -- -a -S +# Examples: +cz c --dry-run -- -a -S # Stage all changes and sign the commit +cz c -a -- -n # Stage all changes and skip the pre-commit and commit-msg hooks ``` -For example, using the `-S` option on `git commit` to sign a commit is now Commitizen compatible: `cz c -- -S` -!!! note - Deprecation warning: A commit can be signed off using `cz commit --signoff` or the shortcut `cz commit -s`. - This syntax is now deprecated in favor of the new `cz commit -- -s` syntax. +!!! warning + The `--signoff` option (or `-s`) is now recommended being used with the new syntax: `cz commit -- -s`. The old syntax `cz commit --signoff` is deprecated. ### Retry -You can use `cz commit --retry` to reuse the last commit message when the previous commit attempt failed. -To automatically retry when running `cz commit`, you can set the `retry_after_failure` -configuration option to `true`. Running `cz commit --no-retry` makes Commitizen ignore `retry_after_failure`, forcing -a new commit message to be prompted. +- Use `cz commit --retry` to reuse the last commit message after a failed commit attempt +- Set `retry_after_failure: true` in your configuration to automatically retry +- Use `cz commit --no-retry` to force a new commit message prompt + +### Message Length Control -### Commit message length limit +Control the length of your commit messages using the `-l` or `--message-length-limit` option: +```sh +cz commit -l 72 # Limits message length to 72 characters +``` + +!!! note + The length limit only applies to the first line of the commit message. For conventional commits, this means the limit applies from the type of change through the subject. The body and footer are not counted. -The argument `-l` (or `--message-length-limit`) followed by a positive number can limit the length of commit messages. -An exception would be raised when the message length exceeds the limit. -For example, `cz commit -l 72` will limit the length of commit messages to 72 characters. -By default, the limit is set to 0, which means no limit on the length. +## Technical Notes -**Note that the limit applies only to the first line of the message.** -Specifically, for `ConventionalCommitsCz` the length only counts from the type of change to the subject, -while the body and the footer are not counted. +For platform compatibility, the `commit` command disables ANSI escaping in its output. This means pre-commit hooks coloring will be deactivated as discussed in [commitizen-tools/commitizen#417](https://github.com/commitizen-tools/commitizen/issues/417). From 13e4aaacbde5bcfc4bd2aea1a1c060508b86dcec Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 1 Jun 2025 14:03:53 +0800 Subject: [PATCH 158/159] docs(contributing): improve documentation for first-time contributors --- docs/contributing.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index e9e162d2df..8389e9370d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,10 +1,14 @@ -## Contributing to commitizen +## Contributing to Commitizen -First, thank you for taking the time to contribute! 🎉 +First, thank you for taking the time to contribute! 🎉 Your contributions help make Commitizen better for everyone. -When contributing to [commitizen](https://github.com/commitizen-tools/commitizen), please first create an [issue](https://github.com/commitizen-tools/commitizen/issues) to discuss the change you wish to make before making a change. +When contributing to Commitizen, we encourage you to: -If you're a first-time contributor, you can check the issues with the [good first issue](https://github.com/commitizen-tools/commitizen/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag. +1. First, check out the [issues](https://github.com/commitizen-tools/commitizen/issues) and [Features we won't add](faq.md#features-we-wont-add) to see if there's already a discussion about the change you wish to make. +2. If there's no discussion, [create an issue](https://github.com/commitizen-tools/commitizen/issues/new) to discuss your proposed changes. +3. Follow our [development workflow](#development-workflow) and guidelines below. + +If you're a first-time contributor, please check out issues labeled [good first issue](https://github.com/commitizen-tools/commitizen/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - these are specifically chosen to be beginner-friendly. ## Prerequisites & Setup From 47beadc563d8272b64f88ddbf3e9a37351b8f535 Mon Sep 17 00:00:00 2001 From: Yu-Ting Hsiung <bear890707@gmail.com> Date: Sun, 1 Jun 2025 14:15:29 +0800 Subject: [PATCH 159/159] docs(pull_request_template): add task to fix broken external links in the docs --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 5686474709..e37148c0a1 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -25,7 +25,7 @@ Please fill in the following content to let us know better about this change. ### Documentation Changes - [ ] Run `poetry doc` locally to ensure the documentation pages renders correctly - - [ ] Check if there are any broken links in the documentation +- [ ] Check and fix any broken links (internal or external) in the documentation > When running `poetry doc`, any broken internal documentation links will be reported in the console output like this: >