No project description provided
Project description
Conventional With Data
A branch of conventionalish with an added data
prefix.
Patch Commitizen's Conventional Commits implementation with additional prefixes.
QUESTIONS = [
("fix", "A bug fix", "x", PATCH),
("feat", "A new feature", "f", MINOR),
("data", "Changes to non-code input (data, blog content, models, etc.)", "a", PATCH),
("docs", "Documentation only changes", "d", None),
("style", "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)", "s", None),
("refactor", "A code change that neither fixes a bug nor adds a feature", "r", PATCH),
("perf", "A code change that improves performance", "p", PATCH),
("test", "Adding missing or correcting existing tests", "t", None),
("build", "Changes that affect the build system or external dependencies (example scopes: pip, docker, npm)", "b", None),
("ci", "Changes to our CI configuration files and scripts (example scopes: GitLabCI)", "c", None)
]
By default, Commitizen will use its Conventional Commits implementation, so when you run cz commit
, you will get a choice of
fix:
feat:
docs:
style:
refactor:
perf:
test:
build:
ci:
Commitizen has a robust system for building your own commit patterns, and it's great if you want to start from scratch. But if you want to make a small change to the defaults and keep the nice prompts, commit-message linting, and changelog-building provided by Commitizen, you will have to create or update six patterns or regexps. This script inherits from ConventionalCommitsCz and patches in new choices and associated properties. FWIW, despite the ish in the name conventionalish, these changes will still meet the Conventional Commits standard (at least as much as Commitizen does) as long as the feat:
and fix:
prefixes remain.
Should you want to accomplish this by hand:
- inherit from ConventionalCommitsCz
- overload
.questions()
# for commit prompts - overload
.schema_pattern()
# for commit-message linting
Will your addition affect versioning?
- overload
.bump_pattern
# for commitizen bump - overload
.bump_map
# for commitizen bump - overload
.commit_parser
# for commitizen changelog - overload
.change_type_map
# for commitizen changelog - overload
.changelog_pattern
# for commitizen changelog
Usage
To make these changes using a script:
- clone this project into your project root
- edit the
QUESTIONS
value at the top ofquestions.py
. The default value will give near-identical behavior to the Commitizen default. - install conventionalish in your project venv (
poetry add .\conventionalish
;pip install .\conventionalish
; ...) or upload to PyPi with a new name. - run with
cz -n cz_conventionalish
or add the following topyproject.toml
[tool.commitizen]
name = "cz_conventionalish"
Troubleshooting, Q&A
I updated the file, but Commitizen doesn't recognize the changes.
This is an installed package, depending how you installed it, you may need to:
- delete any
commitizenish/build
orcommitizenish/egg-info
directories - uninstall
- reinstall
How can I change the project name (conventionalish
)?
- change the name of this folder after you clone it
- update the line
name="conventionalish"
inconventionalish/pyproject.toml
toname="new_folder_name"
How can I change the commit-rule name (cz_conventionalish
)?
- change the filename
conventionalish/cz_conventionalish.py
toconventionalish/cz_new_name.py
- change the line
{ include = "cz_conventionalish.py" }
inconventionalish/pyproject.toml
to{ include = "cz_new_name.py" }
Author
Shay Hill (shay_public@hotmail.com)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file conventional_with_data-0.1.1.tar.gz
.
File metadata
- Download URL: conventional_with_data-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d67e28a980d1cda98ebc46ec86571e146e1f212e0be0f45fa0f54a88b672289b |
|
MD5 | 6602b41f36b7848f9ce0858b0d7503df |
|
BLAKE2b-256 | 4ee3d7977b29ba78a993ded941b9d297fe0c81de0beb2035ef0703600709e633 |
File details
Details for the file conventional_with_data-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: conventional_with_data-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 927488f05e9ecd554370124d56d006a2b1c97419fd0ba7bb6cd7697deb152c4d |
|
MD5 | 07f1b3438d2aced23c6849d52c474691 |
|
BLAKE2b-256 | f799c35397a77479d4ddbe83c9a10ad436e7f6f7414a47b3063300c3fc07b466 |