dump-things-service/pyproject.toml
2026-07-29 12:22:04 +02:00

204 lines
5.3 KiB
TOML

[build-system]
requires = [
"hatchling",
"hatch-vcs",
]
build-backend = "hatchling.build"
[project]
name = "dump-things-service"
dynamic = ["version"]
description = 'A simple service to store and retrieve schema-conform data records'
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
keywords = []
authors = [
{ name = "Christian Mönch", email = "christian.moench@web.de" },
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"aiohttp",
"click",
"datalad-core",
"fastapi[standard]>=0.138.0",
"fastapi-pagination>=0.15.15",
"fsspec",
"linkml>=1.10.0",
"pydantic",
"PyYAML",
"rdflib",
"requests",
"sqlalchemy",
"uvicorn",
]
[project.urls]
Documentation = "https://dump-things-service.readthedocs.io/"
Issues = "https://codeberg.org/datalink/dump-things-server/issues"
Source = "https://hub.psychoinformatics.de/orinoco/dump-things-server"
Changelog = "https://hub.psychoinformatics.de/orinoco/dump-things-server/src/branch/master/CHANGELOG.md"
[project.optional-dependencies]
# this is what readthedocs consumes to decide what needs to be installed
# for compiling the docs
docs = [
"pytest",
"sphinx",
"sphinx_rtd_theme",
"sphinx_autodoc_typehints",
"myst-parser",
]
[project.scripts]
dump-things-service = "dump_things_service.main:main"
dump-things-rebuild-index = "dump_things_service.commands.rebuild_index:main"
dump-things-copy-store = "dump_things_service.commands.copy_store:main"
dump-things-pid-check = "dump_things_service.commands.check_pids:main"
dump-things-create-merged-schema = "dump_things_service.commands.create_merged_schema:main"
dump-things-download-config = "dump_things_service.commands.download_config:main"
dump-things-gitaudit-report = "dump_things_service.commands.gitaudit_report:main"
dump-things-gitaudit-rebuild-index = "dump_things_service.commands.gitaudit_rebuild_index:main"
dump-things-upload-config = "dump_things_service.commands.upload_config:main"
dump-things-hash-token = "dump_things_service.commands.hash_token:main"
[tool.hatch.build.targets.wheel]
exclude = [
"dump_things_service/tests",
]
only-include = [
"dump_things_service",
]
[tool.hatch.build.targets.sdist]
exclude = [
"dump_things_service/tests",
]
only-include = [
"dump_things_service",
]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "dump_things_service/_version.py"
[tool.hatch.envs.types]
extra-dependencies = [
"mypy>=1.0.0",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive --python-version 3.11 --follow-imports skip --pretty --show-error-context {args:dump_things_service}"
[tool.hatch.envs.docs]
description = "build Sphinx-based docs"
# also see project.optional-dependencies.docs!
# this is not considered by readthedocs
extra-dependencies = [
"pytest",
"sphinx",
"sphinx_rtd_theme",
"sphinx-autodoc-typehints",
"myst-parser",
]
[tool.hatch.envs.docs.scripts]
build = [
"make -C docs html",
]
clean = [
"rm -rf docs/generated",
"make -C docs clean",
]
[tool.coverage.run]
source_pkgs = ["dump_things_service"]
branch = true
parallel = true
omit = ["dump_things_service/__about__.py"]
[tool.coverage.paths]
src = ["dump_things_service"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.hatch.envs.fastapi]
description = "fastapi dev environment"
[tool.hatch.envs.fastapi.scripts]
run = "python -m dump_things_service.main {args}"
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.11", "3.12"]
[tool.hatch.envs.hatch-test]
default-args = ["dump_things_service"]
extra-dependencies = [
"freezegun",
"httpx2",
"pytest",
"pytest-cov",
"pytest-httpserver",
]
[tool.ruff]
extend-exclude = [
# sphinx
"docs",
# patches
"dump_things_service/patches/*",
]
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 hard-coded passwords in tests
"S105", "S106",
# permit insecure hash in tests
"S324",
# permit standard random number generators in tests
"S311",
# permit magic values in tests
"PLR2004",
# permit relative import in tests
"TID252",
# permit versatile function names in tests
"N802",
# permit access to private members in tests
"SLF001",
]
# permit hard-coded passwords, assert, insecure hash and magic values in fixtures
"dump_things_service/tests/fixtures.py" = ["S101", "S105", "S106", "S324", "PLR2004"]
# permit relative import in subpackage root
"dump_things_service/*/__init__.py" = ["TID252"]
[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*'
check-hidden = true
# ignore-regex = ''
# ignore-words-list = ''
[tool.mypy]
disable_error_code = ["import-untyped"]