187 lines
5 KiB
TOML
187 lines
5 KiB
TOML
[build-system]
|
|
requires = [
|
|
"hatchling",
|
|
"hatch-vcs",
|
|
]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "trr379-rdmtools"
|
|
dynamic = ["version"]
|
|
description = 'a collection of tools for working with the TRR379 RDM system'
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
license = "MIT"
|
|
keywords = [
|
|
"datalad",
|
|
"git",
|
|
"git-annex",
|
|
]
|
|
authors = [
|
|
{ name = "Michael Hanke", email = "mih@ngln.eu" },
|
|
]
|
|
maintainers = [
|
|
{ name = "Michael Hanke", email = "mih@ngln.eu" },
|
|
]
|
|
classifiers = [
|
|
"License :: OSI Approved :: MIT License",
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: End Users/Desktop",
|
|
"Natural Language :: English",
|
|
"Operating System :: OS Independent",
|
|
"Topic :: Software Development",
|
|
"Topic :: Software Development :: Version Control",
|
|
"Topic :: Software Development :: Version Control :: Git",
|
|
"Programming Language :: Python",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: 3.14",
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
]
|
|
dependencies = [
|
|
"git-annex",
|
|
"rich",
|
|
"rich-click",
|
|
]
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true
|
|
|
|
[project.scripts]
|
|
cobic-frankfurt = "trr379_rdmtools.cobic_frankfurt:cli"
|
|
mk-studyvisit-archive = "trr379_rdmtools.mk_studyvisit_archive:cli"
|
|
trr379-update-jtrack-study-dataset = "trr379_rdmtools.update_jtrack_study_dataset:update_jtrack_study_dataset"
|
|
|
|
[project.urls]
|
|
Homepage = "https://hub.trr379.de/q02/rdmtools"
|
|
Documentation = "https://hub.trr379.de/q02/rdmtools#readme"
|
|
Issues = "https://hub.trr379.de/q02/rdmtools/issues"
|
|
Source = "https://hub.trr379.de/q02/rdmtools"
|
|
|
|
[tool.hatch.version]
|
|
source = "vcs"
|
|
|
|
[tool.hatch.build.hooks.vcs]
|
|
version-file = "trr379_rdmtools/_version.py"
|
|
|
|
[tool.hatch.envs.hatch-test]
|
|
default-args = ["trr379_rdmtools"]
|
|
extra-dependencies = [
|
|
"pytest",
|
|
# if you come here, because coverage combination crashed for you
|
|
# run `hatch test --cover` and/or see
|
|
# https://github.com/pypa/hatch/issues/1565#issuecomment-2163773123
|
|
"pytest-cov",
|
|
]
|
|
|
|
[[tool.hatch.envs.hatch-test.matrix]]
|
|
python = ["3.12", "3.13", "3.14"]
|
|
|
|
[tool.hatch.envs.types]
|
|
description = "type checking with MyPy"
|
|
extra-dependencies = [
|
|
"mypy>=1.0.0",
|
|
"pytest",
|
|
]
|
|
[tool.hatch.envs.types.scripts]
|
|
check = [
|
|
"mypy --install-types --non-interactive --python-version 3.11 --pretty --show-error-context {args:trr379_rdmtools}",
|
|
]
|
|
|
|
[tool.hatch.envs.cz]
|
|
description = "commit compliance, changelog, and release generation"
|
|
detached = true
|
|
extra-dependencies = [
|
|
"commitizen",
|
|
]
|
|
[tool.hatch.envs.cz.scripts]
|
|
check-commits = [
|
|
# check all commit messages since the (before) beginning
|
|
"cz check --rev-range 93ddd5577f1b326d1a01bf52727c818597a36256..HEAD",
|
|
]
|
|
show-changelog = [
|
|
# show the would-be changelog on stdout
|
|
"cz changelog --dry-run",
|
|
]
|
|
bump-version = [
|
|
# bump version (also tags) and update changelog
|
|
"cz bump --changelog",
|
|
]
|
|
|
|
[tool.hatch.envs.codespell]
|
|
description = "spell checking"
|
|
detached = true
|
|
extra-dependencies = [
|
|
"codespell",
|
|
]
|
|
[tool.hatch.envs.codespell.scripts]
|
|
check = "codespell"
|
|
fix = "codespell --write-changes"
|
|
|
|
[tool.codespell]
|
|
skip = ".git,build,.*cache,dist,*/_build"
|
|
|
|
[tool.coverage.run]
|
|
source_pkgs = ["trr379_rdmtools", "tests"]
|
|
branch = true
|
|
parallel = true
|
|
omit = [
|
|
# "src/trr379_rdmtools/__about__.py",
|
|
]
|
|
data_file = "${COVERAGE_ROOT-.}/.coverage"
|
|
|
|
[tool.coverage.paths]
|
|
trr379_rdmtools = ["src/trr379_rdmtools", "*/trr379_rdmtools/src/trr379_rdmtools"]
|
|
tests = ["tests", "*/trr379_rdmtools/tests"]
|
|
|
|
[tool.coverage.report]
|
|
show_missing = true
|
|
exclude_lines = [
|
|
"no cov",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
"raise NotImplementedError",
|
|
]
|
|
|
|
[tool.ruff]
|
|
exclude = []
|
|
line-length = 88
|
|
indent-width = 4
|
|
target-version = "py311"
|
|
[tool.ruff.format]
|
|
# Prefer single quotes over double quotes.
|
|
quote-style = "single"
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"**/test_*" = [
|
|
# permit assert statements in tests
|
|
"S101",
|
|
# permit relative import in tests
|
|
"TID252",
|
|
# permit versatile function names in tests
|
|
"N802",
|
|
]
|
|
|
|
[tool.commitizen]
|
|
name = "cz_customize"
|
|
tag_format = "v$version"
|
|
version_scheme = "pep440"
|
|
version_provider = "scm"
|
|
changelog_incremental = true
|
|
template = ".changelog.md.j2"
|
|
gpg_sign = true
|
|
|
|
[tool.commitizen.customize]
|
|
commit_parser = "^((?P<change_type>feat|fix|rf|perf|test|doc|BREAKING CHANGE)(?:\\((?P<scope>[^()\r\n]*)\\)|\\()?(?P<breaking>!)?|\\w+!):\\s(?P<message>.*)?(?P<body>.*)?"
|
|
change_type_order = ["BREAKING CHANGE", "feat", "fix", "rf", "perf", "doc", "test"]
|
|
changelog_pattern = "^((BREAKING[\\-\\ ]CHANGE|\\w+)(\\(.+\\))?!?):"
|
|
bump_pattern = "^((BREAKING[\\-\\ ]CHANGE|\\w+)(\\(.+\\))?!?):"
|
|
schema_pattern = "(?s)(ci|doc|feat|fix|perf|rf|style|test|chore|revert|bump)(\\(\\S+\\))?!?:( [^\\n\\r]+)((\\n\\n.*)|(\\s*))?$"
|
|
|
|
[tool.commitizen.customize.bump_map]
|
|
"^\\w+!" = "MAJOR"
|
|
"^BREAKING" = "MAJOR"
|
|
"^feat" = "MINOR"
|
|
"^fix" = "PATCH"
|