Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add commitizen cli and commit standards #340

Merged
merged 3 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added CHANGELOG.md
Empty file.
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,15 @@ Please follow all style guides to the best of your abilities.

### Git commit messages

For all commit messages, please use a short phrase that describes the specific change.
For example, “Add feature to check normalization method string” is much preferred to “change code”.
When appropriate, reference issues (via `#` plus number) .
Pycytominer uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard for commit messages to aid in automatic changelog generation.
We prepare commit messages that follow this standard using [commitizen](https://commitizen-tools.github.io/commitizen/), which comes with the poetry dev dependencies.

### Python style guide

For python code style, we use [black](https://github.com/psf/black).
Please use black before committing any code.
We will not accept code contributions that do not use black.
If you have set up your development environment using one of the dev container options specified above, the containers will install all required formatting tools, which will run automatically on any modified files before commits (using a tool called [pre-commit](https://pre-commit.com/)).
Configuring your [dev environment](#dev-environments) as described above will ensure your code is formatted correctly automatically (using a tool called [pre-commit](https://pre-commit.com/)).

kenibrewer marked this conversation as resolved.
Show resolved Hide resolved
### Documentation style guide

Expand Down
84 changes: 79 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pytest = ">=5.0.1"
codecov = ">=2.1.12"
pytest-cov = "^4.1.0"
pre-commit = ">=3.3.2"
commitizen = "^3.12.0"

[tool.poetry.group.docs]
optional = true
Expand All @@ -66,6 +67,14 @@ furo = "^2023.9.10"
mock = "^5.1.0"
autodoc = "^0.5.0"


[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "pep440"
version_provider = "poetry"
update_changelog_on_bump = true

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down
Loading