From 44151a8bf0ef94da19346185fdb7013dc7a9265e Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 9 Jul 2025 08:39:03 +0200 Subject: [PATCH 1/4] docs: provide pipx injection as system-wide solution --- README.md | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 9468bc5..9056f8c 100644 --- a/README.md +++ b/README.md @@ -51,22 +51,22 @@ All of this with minimal config and setup, so your `pyproject.toml` file stays c
-- [Commitizen plugin czEspressif](#commitizen-plugin-czespressif) +- [Commitizen Plugin `czEspressif`](#commitizen-plugin-czespressif) - [Features](#features) - [Compatibility](#compatibility) - [Install](#install) - [Usage](#usage) - - [Create Changelog file](#create-changelog-file) - - [Bump Release version](#bump-release-version) + - [Create Changelog File](#create-changelog-file) + - [Bump Release Version](#bump-release-version) - [GitHub Action for Automated Release Creation](#github-action-for-automated-release-creation) - - [Create commit messages](#create-commit-messages) - - [Examples of good commit messages](#examples-of-good-commit-messages) + - [Create Commit Messages](#create-commit-messages) + - [Examples of Good Commit Messages](#examples-of-good-commit-messages) - [Configuration](#configuration) - - [Minimal setup](#minimal-setup) - - [Optimal setup](#optimal-setup) - - [Additional configurable parameters](#additional-configurable-parameters) + - [Minimal Setup](#minimal-setup) + - [Optimal Setup](#optimal-setup) + - [Additional Configurable Parameters](#additional-configurable-parameters) - [Solving Troubles](#solving-troubles) - - [Pre-commit hook (beta)](#pre-commit-hook-beta) + - [Pre-Commit Hook (Beta)](#pre-commit-hook-beta) - [Contributing](#contributing) - [License](#license) - [Credits](#credits) @@ -120,9 +120,14 @@ cz example > > commitizen itself is in the plugin's dependencies, so pip will take care of everything. -> \[!WARNING\] -> Don't try to install it system-wide with `pipx`; it likely won't work as expected. -> (This option will be explored in the future, and once a solution is found, we will update this recommendation.) +To use the plugin system-wide, you can install it with `pipx`: + +```sh +pipx install commitizen +pipx inject commitizen czespressif +``` + +This will install `czespressif` as a plugin for the global `commitizen` installation, allowing you to use it in any project without needing to install it separately for each one. --- From 3e9808dc795e2a44bb0f1d028f46da8acc488240 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 9 Jul 2025 08:40:38 +0200 Subject: [PATCH 2/4] ci: pre-commit migrate config --- .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 ed89c1f..f9ad3cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- minimum_pre_commit_version: 3.3.0 default_install_hook_types: [pre-commit, commit-msg] -default_stages: [commit] +default_stages: [pre-commit] exclude: '^tests/__snapshots__/' From 93def3c962e7158ba6a4802819c72348d07c9c82 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 9 Jul 2025 09:01:48 +0200 Subject: [PATCH 3/4] change: fix deprecated html `align="center"` --- czespressif/defaults.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/czespressif/defaults.py b/czespressif/defaults.py index 3d5b8eb..b1b1249 100644 --- a/czespressif/defaults.py +++ b/czespressif/defaults.py @@ -100,7 +100,7 @@ > All notable changes to this project are documented in this file. > This list is not exhaustive - only important changes, fixes, and new features in the code are reflected here. -
+
Static Badge @@ -115,7 +115,7 @@ """ CHANGELOG_FOOTER: str = f""" -
+
Commitizen Espressif plugin From 5c132841daf2c8e7909ec0966595f42573583097 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 9 Jul 2025 08:57:21 +0200 Subject: [PATCH 4/4] feat: support `perf` by default in changelog --- README.md | 4 +++- czespressif/defaults.py | 8 ++++++++ .../test_changelog_cz_default_full.md | 10 ++++------ .../test_changelog_czespressif_full.md | 16 ++++++---------- .../test_changelog_czespressif_full_no_emoji.md | 16 ++++++---------- .../test_czespressif/test_example.md | 1 + 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 9056f8c..de09aab 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,7 @@ Config is accepted in `pyproject.toml` (priority, following example), `.cz.toml` '🚨 Breaking Changes', '✨ New Features', '🐛 Bug Fixes', + '⚡ Performance Improvements', '📖 Documentation', '🔧 Code Refactoring', '🗑️ Removals', @@ -310,6 +311,7 @@ Config is accepted in `pyproject.toml` (priority, following example), `.cz.toml` 'Breaking Changes', 'New Features', 'Bug Fixes', + 'Performance Improvements', 'Documentation', 'Code Refactoring', 'Removals', @@ -322,7 +324,7 @@ Config is accepted in `pyproject.toml` (priority, following example), `.cz.toml` # - Redefine which types are shown in the changelog - # Note: You need to list here ALL types that you want to have in the changelog - included default ones # Note: The order in this list doesn't matter — if you want to change the sections' order too, use with "change_type_order." - types_in_changelog = ["feat", "fix", "refactor", "style", "ci"] + types_in_changelog = ["feat", "fix", "refactor", "style", "ci", "perf"] # - Custom text that you can append to release notes output - diff --git a/czespressif/defaults.py b/czespressif/defaults.py index b1b1249..179694b 100644 --- a/czespressif/defaults.py +++ b/czespressif/defaults.py @@ -30,6 +30,14 @@ 'bump': 'PATCH', 'changelog': True, }, + { + 'type': 'perf', + 'description': 'A code change that improves performance', + 'heading': 'Performance Improvements', + 'emoji': '⚡', + 'bump': 'PATCH', + 'changelog': True, + }, { 'type': 'docs', 'description': 'Documentation only change', diff --git a/tests/__snapshots__/test_changelog/test_changelog_cz_default_full.md b/tests/__snapshots__/test_changelog/test_changelog_cz_default_full.md index 64fc918..74db50a 100644 --- a/tests/__snapshots__/test_changelog/test_changelog_cz_default_full.md +++ b/tests/__snapshots__/test_changelog/test_changelog_cz_default_full.md @@ -12,16 +12,14 @@ ## v1.2.0 (2024-07-15) -### Refactor - -- optimize database queries for user data retrieval - -## v1.2.0.rc0 (2024-06-10) - ### Fix - **frontend**: correct layout issues in user profile page +### Refactor + +- optimize database queries for user data retrieval + ## v1.1.0 (2024-05-23) ### Fix diff --git a/tests/__snapshots__/test_changelog/test_changelog_czespressif_full.md b/tests/__snapshots__/test_changelog/test_changelog_czespressif_full.md index 897f052..92e128f 100644 --- a/tests/__snapshots__/test_changelog/test_changelog_czespressif_full.md +++ b/tests/__snapshots__/test_changelog/test_changelog_czespressif_full.md @@ -7,7 +7,7 @@ > All notable changes to this project are documented in this file. > This list is not exhaustive - only important changes, fixes, and new features in the code are reflected here. -
+
Static Badge @@ -36,14 +36,6 @@ ## v1.2.0 (2024-07-15) -### 🔧 Code Refactoring - -- optimize database queries for user data retrieval *(Charlie Green - e7c1d8b)* - ---- - -## v1.2.0.rc0 (2024-06-10) - ### 🐛 Bug Fixes - **frontend**: correct layout issues in user profile page *(Bob Smith - c3e7b3b)* @@ -52,6 +44,10 @@ - update API documentation for user endpoint *(Eve Martin - f8d7e1c)* +### 🔧 Code Refactoring + +- optimize database queries for user data retrieval *(Charlie Green - e7c1d8b)* + --- ## v1.1.0 (2024-05-23) @@ -102,7 +98,7 @@ --- -
+
Commitizen Espressif plugin diff --git a/tests/__snapshots__/test_changelog/test_changelog_czespressif_full_no_emoji.md b/tests/__snapshots__/test_changelog/test_changelog_czespressif_full_no_emoji.md index 7bee7a5..26efa2c 100644 --- a/tests/__snapshots__/test_changelog/test_changelog_czespressif_full_no_emoji.md +++ b/tests/__snapshots__/test_changelog/test_changelog_czespressif_full_no_emoji.md @@ -7,7 +7,7 @@ > All notable changes to this project are documented in this file. > This list is not exhaustive - only important changes, fixes, and new features in the code are reflected here. -
+
Static Badge @@ -36,14 +36,6 @@ ## v1.2.0 (2024-07-15) -### Code Refactoring - -- optimize database queries for user data retrieval *(Charlie Green - e7c1d8b)* - ---- - -## v1.2.0.rc0 (2024-06-10) - ### Bug Fixes - **frontend**: correct layout issues in user profile page *(Bob Smith - c3e7b3b)* @@ -52,6 +44,10 @@ - update API documentation for user endpoint *(Eve Martin - f8d7e1c)* +### Code Refactoring + +- optimize database queries for user data retrieval *(Charlie Green - e7c1d8b)* + --- ## v1.1.0 (2024-05-23) @@ -102,7 +98,7 @@ --- -
+
Commitizen Espressif plugin diff --git a/tests/__snapshots__/test_czespressif/test_example.md b/tests/__snapshots__/test_czespressif/test_example.md index 7e92651..7c3fd4d 100644 --- a/tests/__snapshots__/test_czespressif/test_example.md +++ b/tests/__snapshots__/test_czespressif/test_example.md @@ -16,6 +16,7 @@ Commit types in this project: feat: A new feature fix: A bug fix + perf: A code change that improves performance docs: Documentation only change refactor: A changeset neither fixing a bug nor adding a feature remove: Removing code or files