Skip to content

Commit

Permalink
feat(build): enable poetry-dyanic-versioning and cz changelog
Browse files Browse the repository at this point in the history
This set of changes allows poetry to automatically set the version during build. They also provide a commitizen configuration that allows for automatic changelog generation.

Closes #333
  • Loading branch information
kenibrewer committed Oct 28, 2023
1 parent 871b633 commit 8483796
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
1 change: 1 addition & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /usr/bin/env bash
python -m pip install poetry-dynamic-versioning
poetry config virtualenvs.in-project true --local
poetry install --with cell_locations,collate,dev
poetry run pre-commit install --install-hooks
Empty file added CHANGELOG.md
Empty file.
3 changes: 2 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ authors:
given-names: Gregory P.
orcid: https://orcid.org/0000-0002-0503-9348
title: "Reproducible processing of image-based profiling representations with Pycytominer"
version: "0.3.0"
# This version is updated using `cz bump` command
version: "0.2.0"
license: BSD 3-Clause License
repository-code: "https://github.com/cytomining/pycytominer"
4 changes: 3 additions & 1 deletion pycytominer/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
__project__ = "pycytominer"
__version__ = "0.2.0"
# These version placeholders are updated during build by poetry-dynamic-versioning
__version__ = "0.0.0"
__version_tuple__ = (0, 0, 0)
__license__ = "BSD 3-Clause License"
__author__ = "Pycytominer Contributors"
29 changes: 25 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tool.poetry]
name = "pycytominer"
version = "0.3.0"
# This version is a placeholder updated during build by poetry-dynamic-versioning
version = "0.0.0"
description = "Python package for processing image-based profiling data"
authors = [
"Erik Serrano",
Expand Down Expand Up @@ -80,13 +81,33 @@ furo = "^2023.9.10"
mock = "^5.1.0"
autodoc = "^0.5.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry-dynamic-versioning]
enable = true
style = "pep440"
vcs = "git"

[tool.poetry-dynamic-versioning.substitution]
files = ["pycytominer/__about__.py"]

[tool.commitizen]
# This version is used for changelog tracking and is updated using `cz bump`
version = "0.2.0"
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "pep440"
version_provider = "commitizen"
update_changelog_on_bump = true
version_files = [
"CITATION.cff"
]

[tool.black]
line-length = 88
target-version = ['py39']

[tool.pytest.ini_options]
testpaths = "tests"

[build-system]
requires = ["poetry-core>=1.7.0", "poetry-dynamic-versioning>=1.1.0"]
build-backend = "poetry_dynamic_versioning.backend"

0 comments on commit 8483796

Please sign in to comment.