version bump management

This commit is contained in:
Florian Förster 2024-12-20 14:32:42 +01:00
parent ef5743bc85
commit 0183b628bd
5 changed files with 195 additions and 32 deletions

2
bump_prerelease_num.ps1 Normal file
View File

@ -0,0 +1,2 @@
pdm run bump-my-version bump pre_n
pdm run bump-my-version show current_version

2
bump_release_type.ps1 Normal file
View File

@ -0,0 +1,2 @@
pdm run bump-my-version bump pre_l
pdm run bump-my-version show current_version

140
pdm.lock generated
View File

@ -2,10 +2,10 @@
# It is not intended for manual editing.
[metadata]
groups = ["default", "cytoscape", "dash", "dev", "notebooks", "plot", "spacy-lg", "spacy-md", "spacy-sm", "trials"]
groups = ["default", "cytoscape", "dash", "dev", "notebooks", "plot", "spacy-lg", "spacy-md", "spacy-sm", "test", "trials"]
strategy = ["inherit_metadata"]
lock_version = "4.5.0"
content_hash = "sha256:bd78b1a41d8bc73b5112c999a6fc6cfcb512e7b9ef6f6bf437a9363df9296961"
content_hash = "sha256:75c3ec94235c3b4d2881ef48edd1013efdbac1ccbab7cba3d4a8094097437088"
[[metadata.targets]]
requires_python = ">=3.11"
@ -104,7 +104,7 @@ name = "annotated-types"
version = "0.7.0"
requires_python = ">=3.8"
summary = "Reusable constraint types to use with typing.Annotated"
groups = ["default"]
groups = ["default", "dev"]
dependencies = [
"typing-extensions>=4.0.0; python_version < \"3.9\"",
]
@ -327,6 +327,38 @@ files = [
{file = "blis-1.0.1.tar.gz", hash = "sha256:91739cd850ca8100dcddbd8ad66942cab20c9473cdea9a35b165b11d7b8d91e4"},
]
[[package]]
name = "bracex"
version = "2.5.post1"
requires_python = ">=3.8"
summary = "Bash style brace expander."
groups = ["dev"]
files = [
{file = "bracex-2.5.post1-py3-none-any.whl", hash = "sha256:13e5732fec27828d6af308628285ad358047cec36801598368cb28bc631dbaf6"},
{file = "bracex-2.5.post1.tar.gz", hash = "sha256:12c50952415bfa773d2d9ccb8e79651b8cdb1f31a42f6091b804f6ba2b4a66b6"},
]
[[package]]
name = "bump-my-version"
version = "0.29.0"
requires_python = ">=3.8"
summary = "Version bump your Python project"
groups = ["dev"]
dependencies = [
"click",
"pydantic-settings",
"pydantic>=2.0.0",
"questionary",
"rich",
"rich-click",
"tomlkit",
"wcmatch>=8.5.1",
]
files = [
{file = "bump_my_version-0.29.0-py3-none-any.whl", hash = "sha256:6566ab25bd3eeeec109f4ac7e4464227a3ac1fd57f847d259a24800423cd9037"},
{file = "bump_my_version-0.29.0.tar.gz", hash = "sha256:e4149ed63b4772f5868b3fcabb8fa5e1191b8abae6d35effd0be980d4b0f55e3"},
]
[[package]]
name = "catalogue"
version = "2.0.10"
@ -472,7 +504,7 @@ name = "click"
version = "8.1.7"
requires_python = ">=3.7"
summary = "Composable command line interface toolkit"
groups = ["default", "dash"]
groups = ["default", "dash", "dev"]
dependencies = [
"colorama; platform_system == \"Windows\"",
"importlib-metadata; python_version < \"3.8\"",
@ -1912,7 +1944,7 @@ name = "markdown-it-py"
version = "3.0.0"
requires_python = ">=3.8"
summary = "Python port of markdown-it. Markdown parsing, done right!"
groups = ["default"]
groups = ["default", "dev"]
dependencies = [
"mdurl~=0.1",
]
@ -2035,7 +2067,7 @@ name = "mdurl"
version = "0.1.2"
requires_python = ">=3.7"
summary = "Markdown URL utilities"
groups = ["default"]
groups = ["default", "dev"]
files = [
{file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"},
{file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"},
@ -2809,7 +2841,7 @@ name = "prompt-toolkit"
version = "3.0.48"
requires_python = ">=3.7.0"
summary = "Library for building powerful interactive command lines in Python"
groups = ["notebooks"]
groups = ["dev", "notebooks"]
dependencies = [
"wcwidth",
]
@ -3006,7 +3038,7 @@ name = "pydantic"
version = "2.9.2"
requires_python = ">=3.8"
summary = "Data validation using Python type hints"
groups = ["default"]
groups = ["default", "dev"]
dependencies = [
"annotated-types>=0.6.0",
"pydantic-core==2.23.4",
@ -3023,7 +3055,7 @@ name = "pydantic-core"
version = "2.23.4"
requires_python = ">=3.8"
summary = "Core functionality for Pydantic validation and serialization"
groups = ["default"]
groups = ["default", "dev"]
dependencies = [
"typing-extensions!=4.7.0,>=4.6.0",
]
@ -3067,12 +3099,27 @@ files = [
{file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"},
]
[[package]]
name = "pydantic-settings"
version = "2.7.0"
requires_python = ">=3.8"
summary = "Settings management using Pydantic"
groups = ["dev"]
dependencies = [
"pydantic>=2.7.0",
"python-dotenv>=0.21.0",
]
files = [
{file = "pydantic_settings-2.7.0-py3-none-any.whl", hash = "sha256:e00c05d5fa6cbbb227c84bd7487c5c1065084119b750df7c8c1a554aed236eb5"},
{file = "pydantic_settings-2.7.0.tar.gz", hash = "sha256:ac4bfd4a36831a48dbf8b2d9325425b549a0a6f18cea118436d728eb4f1c4d66"},
]
[[package]]
name = "pygments"
version = "2.18.0"
requires_python = ">=3.8"
summary = "Pygments is a syntax highlighting package written in Python."
groups = ["default", "notebooks"]
groups = ["default", "dev", "notebooks"]
files = [
{file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"},
{file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"},
@ -3164,6 +3211,17 @@ files = [
{file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"},
]
[[package]]
name = "python-dotenv"
version = "1.0.1"
requires_python = ">=3.8"
summary = "Read key-value pairs from a .env file and set them as environment variables"
groups = ["dev"]
files = [
{file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"},
{file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"},
]
[[package]]
name = "python-json-logger"
version = "2.0.7"
@ -3312,6 +3370,20 @@ files = [
{file = "pyzmq-26.2.0.tar.gz", hash = "sha256:070672c258581c8e4f640b5159297580a9974b026043bd4ab0470be9ed324f1f"},
]
[[package]]
name = "questionary"
version = "1.10.0"
requires_python = ">=3.6,<4.0"
summary = "Python library to build pretty command line user prompts ⭐️"
groups = ["dev"]
dependencies = [
"prompt-toolkit<4.0,>=2.0",
]
files = [
{file = "questionary-1.10.0-py3-none-any.whl", hash = "sha256:fecfcc8cca110fda9d561cb83f1e97ecbb93c613ff857f655818839dac74ce90"},
{file = "questionary-1.10.0.tar.gz", hash = "sha256:600d3aefecce26d48d97eee936fdb66e4bc27f934c3ab6dd1e292c4f43946d90"},
]
[[package]]
name = "referencing"
version = "0.35.1"
@ -3442,7 +3514,7 @@ name = "rich"
version = "13.9.4"
requires_python = ">=3.8.0"
summary = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
groups = ["default"]
groups = ["default", "dev"]
dependencies = [
"markdown-it-py>=2.2.0",
"pygments<3.0.0,>=2.13.0",
@ -3453,6 +3525,23 @@ files = [
{file = "rich-13.9.4.tar.gz", hash = "sha256:439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"},
]
[[package]]
name = "rich-click"
version = "1.8.5"
requires_python = ">=3.7"
summary = "Format click help output nicely with rich"
groups = ["dev"]
dependencies = [
"click>=7",
"importlib-metadata; python_version < \"3.8\"",
"rich>=10.7",
"typing-extensions>=4",
]
files = [
{file = "rich_click-1.8.5-py3-none-any.whl", hash = "sha256:0fab7bb5b66c15da17c210b4104277cd45f3653a7322e0098820a169880baee0"},
{file = "rich_click-1.8.5.tar.gz", hash = "sha256:a3eebe81da1c9da3c32f3810017c79bd687ff1b3fa35bfc9d8a3338797f1d1a1"},
]
[[package]]
name = "rpds-py"
version = "0.21.0"
@ -4011,6 +4100,17 @@ files = [
{file = "tokenizers-0.20.3.tar.gz", hash = "sha256:2278b34c5d0dd78e087e1ca7f9b1dcbf129d80211afa645f214bd6e051037539"},
]
[[package]]
name = "tomlkit"
version = "0.13.2"
requires_python = ">=3.8"
summary = "Style preserving TOML library"
groups = ["dev"]
files = [
{file = "tomlkit-0.13.2-py3-none-any.whl", hash = "sha256:7a974427f6e119197f670fbbbeae7bef749a6c14e793db934baefc1b5f03efde"},
{file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"},
]
[[package]]
name = "torch"
version = "2.5.1"
@ -4167,7 +4267,7 @@ name = "typing-extensions"
version = "4.12.2"
requires_python = ">=3.8"
summary = "Backported and Experimental Type Hints for Python 3.8+"
groups = ["default", "dash", "notebooks"]
groups = ["default", "dash", "dev", "notebooks"]
files = [
{file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"},
{file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"},
@ -4221,11 +4321,25 @@ files = [
{file = "wasabi-1.1.3.tar.gz", hash = "sha256:4bb3008f003809db0c3e28b4daf20906ea871a2bb43f9914197d540f4f2e0878"},
]
[[package]]
name = "wcmatch"
version = "10.0"
requires_python = ">=3.8"
summary = "Wildcard/glob file name matcher."
groups = ["dev"]
dependencies = [
"bracex>=2.1.1",
]
files = [
{file = "wcmatch-10.0-py3-none-any.whl", hash = "sha256:0dd927072d03c0a6527a20d2e6ad5ba8d0380e60870c383bc533b71744df7b7a"},
{file = "wcmatch-10.0.tar.gz", hash = "sha256:e72f0de09bba6a04e0de70937b0cf06e55f36f37b3deb422dfaf854b867b840a"},
]
[[package]]
name = "wcwidth"
version = "0.2.13"
summary = "Measures the displayed width of unicode strings in a terminal"
groups = ["notebooks"]
groups = ["dev", "notebooks"]
dependencies = [
"backports-functools-lru-cache>=1.2.1; python_version < \"3.2\"",
]

View File

@ -1,6 +1,6 @@
[project]
name = "lang-main"
version = "0.1.0a7"
version = "0.1.0a9"
description = "Several tools to analyse TOM's data with strong focus on language processing"
authors = [
{name = "d-opt GmbH, resp. Florian Förster", email = "f.foerster@d-opt.com"},
@ -70,16 +70,31 @@ name = "pypi"
url = "https://pypi.org/simple"
exclude_packages = ["lang-main*", "tom-plugin*"]
[tool.pdm.dev-dependencies]
notebooks = [
"jupyterlab>=4.2.0",
"ipywidgets>=8.1.2",
]
# [tool.pdm.dev-dependencies]
# notebooks = [
# "jupyterlab>=4.2.0",
# "ipywidgets>=8.1.2",
# ]
# Alph relies on Pygraphviz which again relies on Graphviz, to sucessfully build
# Pygraphviz the MSVC toolchain should be installed on the target system if it is Windows
# (Linux not tested yet). The compiler needs additional information about the location of Graphviz
# files. This information is provided by extra options.
# --config-setting="--global-option=build_ext" --config-setting="--global-option=-IC:\Program Files\Graphviz\include" --config-setting="--global-option=-LC:\Program Files\Graphviz\lib"
[dependency-groups]
dev = [
"cython>=3.0.10",
"openpyxl>=3.1.5",
"seaborn>=0.13.2",
"pytest>=8.3.3",
"pytest-cov>=6.0.0",
"pytest-xdist>=3.6.1",
"bump-my-version>=0.29.0",
]
notebooks = [
"jupyterlab>=4.2.0",
"ipywidgets>=8.1.2",
]
trials = [
]
@ -137,16 +152,45 @@ exclude_also = [
[tool.coverage.html]
directory = "reports/coverage"
[dependency-groups]
dev = [
"cython>=3.0.10",
"openpyxl>=3.1.5",
"seaborn>=0.13.2",
"pytest>=8.3.3",
"pytest-cov>=6.0.0",
"pytest-xdist>=3.6.1",
]
notebooks = [
"jupyterlab>=4.2.0",
"ipywidgets>=8.1.2",
[tool.bumpversion]
current_version = "0.1.0a9"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.
(?P<patch>0|[1-9]\\d*)
(?:
# separator for pre-release section
(?P<pre_l>[a-zA-Z-]+) # pre-release label
(?P<pre_n>0|[1-9]\\d*) # pre-release version number
)? # pre-release section is optional
"""
serialize = [
"{major}.{minor}.{patch}{pre_l}{pre_n}",
"{major}.{minor}.{patch}",
]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = true
commit = false
message = "Bump version: {current_version} → {new_version}"
commit_args = ""
setup_hooks = []
pre_commit_hooks = []
post_commit_hooks = []
[tool.bumpversion.parts.pre_l]
values = ["dev", "a", "b", "rc", "final"]
optional_value = "final"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""

View File

@ -1,7 +1,8 @@
Remove-Item "./logs" -Force -Recurse
pdm run pytest --cov -n 4
# run docker desktop
. "C:\Program Files\Docker\Docker\Docker Desktop.exe"
docker desktop start
# . "C:\Program Files\Docker\Docker\Docker Desktop.exe"
docker start cyrest
# run Cytoscape tests in single process
pdm run coverage run -a -m pytest -m "cyto"