standardize packaging, tooling, docs, CI, and licensing
This commit is contained in:
108
pyproject.toml
108
pyproject.toml
@@ -37,17 +37,18 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Topic :: Communications :: Email",
|
||||
"Topic :: Software Development :: Libraries",
|
||||
"Typing :: Typed",
|
||||
]
|
||||
|
||||
|
||||
dependencies = [
|
||||
# Gmail API stack
|
||||
"google-api-python-client>=2.120.0",
|
||||
"google-auth>=2.28.0",
|
||||
"google-auth-oauthlib>=1.2.0",
|
||||
|
||||
# Parsing
|
||||
"beautifulsoup4>=4.12.0",
|
||||
"lxml>=5.1.0",
|
||||
]
|
||||
@@ -56,15 +57,26 @@ dependencies = [
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest>=8.0.0",
|
||||
"pytest-asyncio>=0.21.0",
|
||||
"pytest-cov>=4.1.0",
|
||||
"black>=23.0.0",
|
||||
"ruff>=0.3.0",
|
||||
"mypy>=1.8.0",
|
||||
"build>=1.0.0",
|
||||
"twine>=4.0.0",
|
||||
"pre-commit>=3.4.0",
|
||||
"types-beautifulsoup4",
|
||||
"doc-forge[mcp,mkdocs]>=0.0.6",
|
||||
]
|
||||
|
||||
docs = [
|
||||
"mkdocs>=1.5.0",
|
||||
"mkdocs-material>=9.5.0",
|
||||
"mkdocstrings[python]>=0.24.0",
|
||||
]
|
||||
|
||||
all = [
|
||||
"mail-intake[dev,docs]",
|
||||
]
|
||||
|
||||
|
||||
@@ -79,12 +91,102 @@ Versions = "https://git.aetoskia.com/aetos/mail-intake/tags"
|
||||
[tool.setuptools]
|
||||
packages = { find = { include = ["mail_intake*"] } }
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
mail_intake = ["py.typed"]
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
asyncio_mode = "auto"
|
||||
python_files = ["test_*.py"]
|
||||
python_classes = ["Test*"]
|
||||
python_functions = ["test_*"]
|
||||
addopts = [
|
||||
"--strict-markers",
|
||||
"--strict-config",
|
||||
"--cov=mail_intake",
|
||||
"--cov-report=term-missing",
|
||||
"--cov-report=html",
|
||||
"--cov-report=xml",
|
||||
]
|
||||
|
||||
|
||||
[tool.black]
|
||||
line-length = 88
|
||||
target-version = ["py310", "py311", "py312", "py313"]
|
||||
include = '\.pyi?$'
|
||||
extend-exclude = '''
|
||||
fetch_emails\.py$ | /(
|
||||
\.eggs
|
||||
| \.git
|
||||
| \.hg
|
||||
| \.mypy_cache
|
||||
| \.tox
|
||||
| \.venv
|
||||
| build
|
||||
| dist
|
||||
)/
|
||||
'''
|
||||
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
line-length = 88
|
||||
target-version = "py310"
|
||||
exclude = ["fetch_emails.py"]
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E",
|
||||
"W",
|
||||
"F",
|
||||
"I",
|
||||
"B",
|
||||
"C4",
|
||||
"UP",
|
||||
]
|
||||
ignore = [
|
||||
"E501",
|
||||
"B008",
|
||||
"C901",
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["F401", "I001"]
|
||||
"tests/*" = ["B008"]
|
||||
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
strict = true
|
||||
exclude = [
|
||||
"tests/",
|
||||
]
|
||||
files = ["mail_intake"]
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"google.*",
|
||||
"googleapiclient.*",
|
||||
"bs4.*",
|
||||
"lxml.*",
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["mail_intake"]
|
||||
omit = [
|
||||
"*/tests/*",
|
||||
"*/test_*.py",
|
||||
]
|
||||
|
||||
[tool.coverage.report]
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"def __repr__",
|
||||
"if __name__ == .__main__.:",
|
||||
"raise AssertionError",
|
||||
"raise NotImplementedError",
|
||||
"if TYPE_CHECKING:",
|
||||
"@abstractmethod",
|
||||
]
|
||||
Reference in New Issue
Block a user