febus982/cloudevents-pydantic

View on GitHub
pyproject.toml

Summary

Maintainability
Test Coverage
[tool.poetry]
name = "cloudevents-pydantic"
version = "0.0.0"
description = "An implementation of the CloudEvents spec using Pydantic V2"
license = "MIT"
authors = ["Federico Busetti <729029+febus982@users.noreply.github.com>"]
repository = "https://github.com/febus982/cloudevents-pydantic"
homepage = "https://febus982.github.io/cloudevents-pydantic"
readme = "README.md"
packages = [{include = "cloudevents_pydantic"}]
#keywords = ["add", "keywords", "here"]
classifiers = [
    "Development Status :: 2 - Pre-Alpha",
    "Framework :: Pydantic",
    "Framework :: Pydantic :: 2",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Natural Language :: English",
    "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Typing :: Typed"
]

[tool.poetry-dynamic-versioning]
enable = true

[build-system]
requires = ["poetry-core", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"

############################
### Package requirements ###
############################

[tool.poetry.dependencies]
cloudevents = "^1.11.0"
python = ">=3.9,<3.13"
pydantic = "^2.9.1"
python-ulid = "^3.0.0"

[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
coverage = ">=6.5.0"
jsonschema = "^4.23.0"
mkdocs = ">=1.4.3"
mkdocstrings = { version = ">=0.24.0", extras = ["python"] }
mkdocs-awesome-pages-plugin = "*"
mkdocs-macros-adr-summary = "*"
mkdocs-gen-files = ">=0.5.0"
mkdocs-material = ">=9.1.16"
mike = ">=2.0.0"
mypy = ">=0.990"
pymdown-extensions = ">=10.0.1"
pytest = "^8.0.0"
pytest-cov = ">=4.0.0"
pytest-factoryboy = ">=2.5.0"
pytest-xdist = ">=3.0.2"
ruff = ">=0.0.263"
tox = ">=4.12.1"

############################
### Tools configuration  ###
############################

[tool.coverage.run]
branch = true
source = ["cloudevents_pydantic"]
# It's not necessary to configure concurrency here
# because pytest-cov takes care of that

[tool.coverage.report]
fail_under = 100
exclude_also = [
    "pragma: no cover",
    "pass",
    "\\.\\.\\.",
    ]

[tool.mypy]
files = "cloudevents_pydantic"
python_version = "3.9"
plugins = "pydantic.mypy"

[tool.pytest.ini_options]
asyncio_mode = "auto"
minversion = "6.0"
addopts = "-n auto --cov-report=term-missing"
testpaths = [
    "tests",
]

[tool.ruff]
extend-exclude = ["docs", ".tox"]
target-version = "py39"

[tool.ruff.lint]
select = [
    "E",  # pycodestyle
    "W",  # pycodestyle
    "F",  # pyflakes
    "I",  # isort
    "N",  # pep8-naming
    "S",  # flake8-bandit
    "RUF",  # ruff-specific-rules
]
# Ignoring rules problematic with formatter
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
ignore = [
    "W191",
    "E111",
    "E114",
    "E117",
    "D206",
    "D300",
    "Q000",
    "Q001",
    "Q002",
    "Q003",
    "COM812",
    "COM819",
    "ISC001",
    "ISC002",
]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]  # Ignore unused imports on init files
"tests/**/*.py" = ["S101"]  # Allow assert usage on tests