123 lines
2.6 KiB
TOML
123 lines
2.6 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "staticshield"
|
|
version = "20250319a"
|
|
authors = [
|
|
{name = "Michiel Scholten", email = "michiel@diginaut.net"},
|
|
]
|
|
description= "Shield a static website by requiring a login flow through a third site/web application"
|
|
readme = "README.md"
|
|
requires-python = ">=3.8"
|
|
keywords = ["security", "api", "automation", "authentication"]
|
|
license = {text = "MIT"}
|
|
classifiers = [
|
|
"Framework :: Flask",
|
|
"Programming Language :: Python :: 3",
|
|
"License :: OSI Approved :: MIT License"
|
|
]
|
|
dependencies = [
|
|
"flask",
|
|
"flask-session"
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
{include-group = "lint"},
|
|
{include-group = "pub"},
|
|
{include-group = "test"}
|
|
]
|
|
test = [
|
|
"pytest>=7.0.0",
|
|
"pytest-cov>=4.0.0",
|
|
]
|
|
lint = [
|
|
"ruff>=0.1.0",
|
|
"mypy>=1.0.0",
|
|
"bandit>=1.7.10",
|
|
]
|
|
# Publishing on PyPI
|
|
pub = [
|
|
"build",
|
|
"twine"
|
|
]
|
|
server = [
|
|
"gunicorn>=23.0.0",
|
|
]
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
markers = [
|
|
"network: mark a test that needs internet access",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
branch = true
|
|
|
|
[tool.coverage.report]
|
|
precision = 2
|
|
|
|
[tool.ruff]
|
|
exclude = [
|
|
".git",
|
|
"__pycache__",
|
|
"flask_session",
|
|
"build",
|
|
"dist"
|
|
]
|
|
line-length = 120
|
|
|
|
[tool.ruff.format]
|
|
# Use single quotes for non-triple-quoted strings.
|
|
quote-style = "single"
|
|
|
|
[tool.ruff.lint]
|
|
ignore = [
|
|
"D203", "D213", "E501",
|
|
# Docstring section rules we do not want to use:
|
|
"D407", "D413", "D405", "D406",
|
|
# more structured docstring formatting comment out to see what we can do better:
|
|
"D400", "D401", "D403", "D415", "D200", "D202", "D205", "D209", "D210", "D212",
|
|
"D100", "D101", "D102", "D103", "D104", "D105", "D106",
|
|
]
|
|
select = [
|
|
"C9",
|
|
"D",
|
|
"E",
|
|
"F",
|
|
"W",
|
|
"T10", # find breakpoints in the code
|
|
"ARG", # unused arguments
|
|
"TID", # relative imports, banned imports
|
|
"PT", # pytest style
|
|
"I", # isort
|
|
"G", # logging format
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"__init__.py" = ["F401"]
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
max-complexity = 12
|
|
|
|
[tool.ruff.lint.pycodestyle]
|
|
max-doc-length = 180
|
|
ignore-overlong-task-comments = true
|
|
|
|
[tool.ruff.lint.flake8-pytest-style]
|
|
fixture-parentheses = true
|
|
mark-parentheses = true
|
|
|
|
[tool.ruff.lint.flake8-unused-arguments]
|
|
ignore-variadic-names = true
|
|
|
|
[tool.ruff.lint.isort]
|
|
section-order = ["future", "standard-library","third-party", "first-party", "testing", "local-folder"]
|
|
[tool.ruff.lint.isort.sections]
|
|
testing = ["tests"]
|
|
|
|
[tool.uv.pip]
|
|
no-emit-package = ["some-package", "pip", "setuptools", "distribute"] # packages that should not be pinned
|