177 lines
4.3 KiB
TOML
177 lines
4.3 KiB
TOML
[build-system]
|
|
requires = [
|
|
"hatchling",
|
|
"hatch-vcs",
|
|
]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "datasalad"
|
|
dynamic = ["version"]
|
|
description = 'utilities for working with data in the vicinity of Git and git-annex'
|
|
readme = "README.md"
|
|
requires-python = ">=3.8"
|
|
license = "MIT"
|
|
keywords = [
|
|
"datalad",
|
|
"git",
|
|
"git-annex",
|
|
"iterator",
|
|
"subprocess",
|
|
]
|
|
authors = [
|
|
{ name = "Michael Hanke", email = "michael.hanke@gmail.com" },
|
|
]
|
|
maintainers = [
|
|
{ name = "Michael Hanke", email = "michael.hanke@gmail.com" },
|
|
]
|
|
classifiers = [
|
|
"License :: OSI Approved :: MIT License",
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"Programming Language :: Python",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
]
|
|
dependencies = []
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/datalad/datasalad"
|
|
Documentation = "https://github.com/datalad/datasalad#readme"
|
|
Issues = "https://github.com/datalad/datasalad/issues"
|
|
Source = "https://github.com/datalad/datasalad"
|
|
Changelog = "https://github.com/datalad/datasalad/blob/main/CHANGELOG.md"
|
|
|
|
[tool.hatch.version]
|
|
source = "vcs"
|
|
|
|
[tool.hatch.envs.hatch-test]
|
|
default-args = ["datasalad"]
|
|
extra-dependencies = [
|
|
"more_itertools",
|
|
"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.types]
|
|
extra-dependencies = [
|
|
"mypy>=1.0.0",
|
|
"pytest",
|
|
"argcomplete",
|
|
# for test type-checking
|
|
"more_itertools",
|
|
]
|
|
[tool.hatch.envs.types.scripts]
|
|
check = [
|
|
"mypy --install-types --non-interactive --python-version 3.8 --pretty --show-error-context datasalad",
|
|
]
|
|
|
|
[tool.hatch.envs.docs]
|
|
extra-dependencies = [
|
|
"sphinx",
|
|
]
|
|
[tool.hatch.envs.docs.scripts]
|
|
build = [
|
|
"make -C docs html",
|
|
]
|
|
clean = [
|
|
"rm -rf docs/generated",
|
|
"make -C docs clean",
|
|
]
|
|
|
|
|
|
[tool.coverage.run]
|
|
source_pkgs = ["datasalad", "tests"]
|
|
branch = true
|
|
parallel = true
|
|
omit = [
|
|
# "src/datasalad/__about__.py",
|
|
]
|
|
data_file = "${COVERAGE_ROOT-.}/.coverage"
|
|
|
|
[tool.coverage.paths]
|
|
datasalad = ["src/datasalad", "*/datasalad/src/datasalad"]
|
|
tests = ["tests", "*/datasalad/tests"]
|
|
|
|
[tool.coverage.report]
|
|
show_missing = true
|
|
exclude_lines = [
|
|
"no cov",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
"raise NotImplementedError",
|
|
]
|
|
|
|
[tool.ruff]
|
|
exclude = [
|
|
# sphinx
|
|
"docs",
|
|
]
|
|
line-length = 88
|
|
indent-width = 4
|
|
target-version = "py38"
|
|
[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",
|
|
]
|
|
# permit relative import in subpackage root
|
|
"datasalad/*/__init__.py" = ["TID252"]
|
|
# maintain iterable_subprocess tests largely "verbatim" for now
|
|
"datasalad/iterable_subprocess/test_iterable_subprocess.py" = [
|
|
"ARG001",
|
|
"B007",
|
|
"EM101",
|
|
"F841",
|
|
"PLR2004",
|
|
"PT012",
|
|
"SIM117",
|
|
"TRY002",
|
|
"TRY003",
|
|
]
|
|
|
|
[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"
|
|
|
|
[tool.commitizen.customize.change_type_map]
|
|
"BREAKING CHANGE" = "Breaking changes"
|
|
doc = "Documentation"
|
|
feat = "New features"
|
|
fix = "Bug Fixes"
|
|
test = "Tests"
|
|
rf = "Refactorings"
|
|
perf = "Performance improvements"
|