2023-03-09 12:14:37 +01:00
|
|
|
#####################
|
|
|
|
# Python packaging: #
|
|
|
|
|
|
|
|
[build-system]
|
|
|
|
requires = ["setuptools", "setuptools-scm"]
|
|
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
|
|
|
|
[project]
|
|
|
|
name = "marshmallow-generic"
|
|
|
|
description = "Generic schema with full typing support and minimal boilerplate"
|
|
|
|
authors = [
|
|
|
|
{ name = "Daniil Fajnberg", email = "mail@daniil.fajnberg.de" },
|
|
|
|
]
|
|
|
|
maintainers = [
|
|
|
|
{ name = "Daniil Fajnberg", email = "mail@daniil.fajnberg.de" },
|
|
|
|
]
|
|
|
|
requires-python = ">=3.9, <4.0"
|
|
|
|
keywords = [
|
|
|
|
|
|
|
|
]
|
|
|
|
license = { text = "Apache Software License Version 2.0" }
|
|
|
|
classifiers = [
|
2023-03-13 20:27:09 +01:00
|
|
|
"Development Status :: 5 - Production/Stable",
|
2023-03-09 12:14:37 +01:00
|
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
|
|
"Programming Language :: Python :: 3.9",
|
|
|
|
"Programming Language :: Python :: 3.10",
|
|
|
|
"Programming Language :: Python :: 3.11",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"License :: OSI Approved :: Apache Software License",
|
|
|
|
"Intended Audience :: Developers",
|
2023-03-10 13:05:06 +01:00
|
|
|
"Typing :: Typed",
|
2023-03-09 12:14:37 +01:00
|
|
|
]
|
|
|
|
dynamic = [
|
|
|
|
"dependencies",
|
|
|
|
"readme",
|
|
|
|
"version",
|
|
|
|
]
|
|
|
|
|
|
|
|
[project.optional-dependencies]
|
|
|
|
full = [
|
|
|
|
|
|
|
|
]
|
|
|
|
dev = [
|
|
|
|
"black",
|
|
|
|
"build",
|
|
|
|
"coverage[toml]",
|
2023-03-10 16:57:26 +01:00
|
|
|
"isort",
|
2023-03-09 12:14:37 +01:00
|
|
|
"mkdocs-material",
|
|
|
|
"mkdocstrings[python]",
|
|
|
|
"mypy",
|
2023-03-10 16:57:26 +01:00
|
|
|
"ruff",
|
2023-03-09 12:14:37 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
[project.urls]
|
|
|
|
repository = "https://github.com/daniil-berg/marshmallow-generic"
|
|
|
|
bug_tracker = "https://github.com/daniil-berg/marshmallow-generic/issues"
|
|
|
|
documentation = "http://daniil-berg.github.io/marshmallow-generic"
|
|
|
|
|
|
|
|
[tool.setuptools.dynamic]
|
|
|
|
dependencies = { file = "requirements/common.txt" }
|
|
|
|
readme = { file = ["README.md"] }
|
|
|
|
version = {attr = "marshmallow_generic.__version__"}
|
|
|
|
|
2023-03-10 16:57:26 +01:00
|
|
|
#########################
|
|
|
|
# Static type checking: #
|
2023-03-09 12:14:37 +01:00
|
|
|
|
|
|
|
[tool.mypy]
|
2023-03-13 18:35:14 +01:00
|
|
|
cache_dir = ".cache/mypy"
|
2023-03-09 12:14:37 +01:00
|
|
|
files = [
|
|
|
|
"src/",
|
|
|
|
"tests/",
|
|
|
|
]
|
|
|
|
warn_unused_configs = true
|
|
|
|
strict = true
|
|
|
|
show_error_codes = true
|
|
|
|
plugins = [
|
|
|
|
|
|
|
|
]
|
|
|
|
|
2023-03-10 16:57:26 +01:00
|
|
|
#######################
|
|
|
|
# Unit test coverage: #
|
2023-03-09 12:14:37 +01:00
|
|
|
|
|
|
|
[tool.coverage.run]
|
2023-03-13 18:35:14 +01:00
|
|
|
data_file = ".cache/coverage"
|
2023-03-09 12:14:37 +01:00
|
|
|
source = [
|
|
|
|
"src/",
|
|
|
|
]
|
|
|
|
branch = true
|
|
|
|
command_line = "-m tests"
|
|
|
|
omit = [
|
|
|
|
".venv*/*",
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.coverage.report]
|
|
|
|
show_missing = true
|
|
|
|
skip_covered = false
|
|
|
|
exclude_lines = [
|
|
|
|
"if TYPE_CHECKING:",
|
|
|
|
'''if __name__ == ['"]__main__['"]:''',
|
|
|
|
"@overload",
|
|
|
|
]
|
|
|
|
omit = [
|
|
|
|
"tests/*",
|
|
|
|
]
|
2023-03-10 16:57:26 +01:00
|
|
|
|
|
|
|
###############################
|
|
|
|
# Linting and style checking: #
|
|
|
|
|
|
|
|
[tool.ruff]
|
2023-03-13 18:35:14 +01:00
|
|
|
cache-dir = ".cache/ruff"
|
2023-03-10 16:57:26 +01:00
|
|
|
select = [
|
|
|
|
"E", # pycodestyle errors
|
|
|
|
"W", # pycodestyle warnings
|
|
|
|
"F", # pyflakes
|
|
|
|
"D", # pydocstyle
|
|
|
|
"C", # flake8-comprehensions
|
|
|
|
"B", # flake8-bugbear
|
|
|
|
"PL", # pylint
|
|
|
|
"RUF", # ruff-specific
|
|
|
|
]
|
|
|
|
ignore = [
|
|
|
|
"E501", # Line too long -> handled by black
|
|
|
|
"D203", # 1 blank line required before class docstring -> D211 is better
|
|
|
|
"D212", # Multi-line docstring summary should start at the first line -> ugly, D212 is better
|
2023-03-10 17:41:08 +01:00
|
|
|
"D401", # First line of docstring should be in imperative mood -> no, it shouldn't
|
2023-03-11 16:17:12 +01:00
|
|
|
"D407", # Missing dashed underline after section -> different docstring style
|
2023-03-10 16:57:26 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
[tool.ruff.per-file-ignores]
|
2023-03-10 17:41:08 +01:00
|
|
|
"src/**/__init__.py" = [
|
|
|
|
"D104", # Missing docstring in public package
|
|
|
|
"F401", # {...} imported but unused
|
|
|
|
]
|
2023-03-10 16:57:26 +01:00
|
|
|
"tests/*.py" = [
|
|
|
|
"D100", # Missing docstring in public module
|
|
|
|
"D101", # Missing docstring in public class
|
|
|
|
"D102", # Missing docstring in public method
|
|
|
|
"D104", # Missing docstring in public package
|
|
|
|
]
|
|
|
|
|
|
|
|
###################
|
|
|
|
# Import sorting: #
|
|
|
|
|
|
|
|
[tool.isort]
|
|
|
|
profile = "black"
|
|
|
|
extra_standard_library = ["typing_extensions"]
|