Skip to content

Commit 5ef67bd

Browse files
committed
feat: Add commitizen as a dev dependency, setup commitizen for version bump and maintain changelog
1 parent acf4f04 commit 5ef67bd

File tree

3 files changed

+171
-40
lines changed

3 files changed

+171
-40
lines changed

.pre-commit-config.yaml

+46-35
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,47 @@
11
repos:
2-
- repo: https://github.com/pycqa/isort
3-
rev: 5.12.0
4-
hooks:
5-
- id: isort
6-
name: isort (python)
7-
args: ["--profile", "black", "--filter-files"]
8-
- repo: https://github.com/ambv/black
9-
rev: 22.12.0
10-
hooks:
11-
- id: black
12-
13-
- repo: local
14-
hooks:
15-
- id: pylint
16-
name: pylint
17-
entry: pylint
18-
language: system
19-
types: [python]
20-
files: ^src/
21-
pass_filenames: true
22-
exclude: ^src/examples/
23-
args:
24-
- "-rn"
25-
- "-sn"
26-
- id: mypy
27-
name: mypy
28-
entry: mypy
29-
language: system
30-
types: [python]
31-
files: ^src/
32-
exclude: ^src/examples/
33-
args:
34-
- "--config-file"
35-
- "pyproject.toml"
36-
- "--ignore-missing-imports"
2+
- hooks:
3+
- args:
4+
- --profile
5+
- black
6+
- --filter-files
7+
id: isort
8+
name: isort (python)
9+
repo: https://github.com/pycqa/isort
10+
rev: 5.12.0
11+
- hooks:
12+
- id: black
13+
repo: https://github.com/ambv/black
14+
rev: 22.12.0
15+
- hooks:
16+
- args:
17+
- -rn
18+
- -sn
19+
entry: pylint
20+
exclude: ^src/examples/
21+
files: ^src/
22+
id: pylint
23+
language: system
24+
name: pylint
25+
pass_filenames: true
26+
types:
27+
- python
28+
- args:
29+
- --config-file
30+
- pyproject.toml
31+
- --ignore-missing-imports
32+
entry: mypy
33+
exclude: ^src/examples/
34+
files: ^src/
35+
id: mypy
36+
language: system
37+
name: mypy
38+
types:
39+
- python
40+
repo: local
41+
- hooks:
42+
- id: commitizen
43+
- id: commitizen-branch
44+
stages:
45+
- push
46+
repo: https://github.com/commitizen-tools/commitizen
47+
rev: v3.12.0

poetry.lock

+116-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+9
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ myst-parser = "^2.0.0" # MIT
3838
nbsphinx = "^0.9.3"
3939
sphinx-copybutton = "^0.5.2"
4040
recommonmark = "^0.7.1"
41+
commitizen = "^3.12.0"
4142

43+
44+
[tool.commitizen]
45+
name = "cz_conventional_commits"
46+
tag_format = "v$version"
47+
version_scheme = "semver"
48+
version_provider = "poetry"
49+
update_changelog_on_bump = true
50+
major_version_zero = true
4251
[build-system]
4352
requires = [ "setuptools", "wheel"]
4453
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)