flow/pyproject.toml

210 lines
4.9 KiB
TOML

[build-system]
requires = [
"hatchling",
"hatch-vcs",
]
build-backend = "hatchling.build"
[project]
name = "orinoco-flow"
dynamic = ["version"]
description = 'Focused, linked outcome webmap (FLOW): toolkit to render project-related metadata as a website'
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
keywords = [
"things",
"metadata",
"graph",
]
authors = [
{ name = "Michael Hanke", email = "mih@ngln.eu" },
]
maintainers = [
{ name = "Michael Hanke", email = "mih@ngln.eu" },
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"Operating System :: OS Independent",
]
dependencies = [
"click",
]
[project.scripts]
flow-things2navgraph = "orinoco_flow.things2navgraph:cli"
[project.urls]
#Homepage = "https://"
#Documentation = "https://#readme"
#Issues = "https:///issues"
#Source = "https://"
#Changelog = "https:///blob/main/CHANGELOG.md"
#[project.optional-dependencies]
#docs = [
# "sphinx",
# "sphinx_rtd_theme",
#]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "orinoco_flow/_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
".github",
".forgejo",
"tools",
"docs/build",
]
[tool.hatch.envs.hatch-test]
default-args = ["orinoco_flow"]
extra-args = ["--doctest-modules"]
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.10", "3.11", "3.12", "3.13"]
[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.10 --pretty --show-error-context {args:orinoco_flow}",
]
#[tool.hatch.envs.docs]
#description = "build Sphinx-based docs"
#extra-dependencies = [
# "sphinx",
# "sphinx_rtd_theme",
#]
#[tool.hatch.envs.docs.scripts]
#build = [
# "make -C docs html",
#]
#clean = [
# "rm -rf docs/generated",
# "make -C docs clean",
#]
[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 we switched to conventional commits
# only (no merge commits also)
"cz check --rev-range 3b6ae59ab106b50d7e9a7389e9eacd4a25dd349e..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,./docs/_build/*"
#exclude-file = ".codespell-exclude"
[tool.coverage.run]
source_pkgs = ["orinoco_flow", "tests"]
branch = true
parallel = true
omit = [
# "src/orinoco_flow/__about__.py",
]
data_file = "${COVERAGE_ROOT-.}/.coverage"
[tool.coverage.paths]
orinoco_flow = ["src/orinoco_flow", "*/orinoco_flow/src/orinoco_flow"]
tests = ["tests", "*/orinoco_flow/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 = "py310"
[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
"orinoco_flow/*/__init__.py" = ["TID252"]
[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"