Some checks failed
Codespell / Check for spelling errors (push) Successful in 41s
Codespell / Check for spelling errors (pull_request) Successful in 43s
Ruff / Code linting (pull_request) Failing after 51s
Ruff / Code linting (push) Failing after 51s
Type annotation (PR) / check (pull_request) Successful in 1m20s
Test execution / Test-all (push) Successful in 1m31s
Right now, it makes no sense to type-check the entire project due to the large number of issues. This is an alternative approach that should help improve the situation over time.
189 lines
4.8 KiB
TOML
189 lines
4.8 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://hub.psychoinformatics.de/orinoco/dump-things-server"
|
|
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",
|
|
]
|
|
|
|
[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",
|
|
]
|
|
[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 relative import in tests
|
|
"TID252",
|
|
# permit versatile function names in tests
|
|
"N802",
|
|
]
|
|
# 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"]
|