82dc586bac
* switch to ruff * add ruff * run ruff --fix * update ruff * resolve ruff errors * drop isort from CI * fix decorator order
155 lines
3 KiB
TOML
155 lines
3 KiB
TOML
[tool.poetry]
|
|
authors = ["Hayden <hay-kot@pm.me>"]
|
|
description = "A Recipe Manager"
|
|
license = "AGPL"
|
|
name = "mealie"
|
|
version = "1.0.0b"
|
|
|
|
[tool.poetry.scripts]
|
|
start = "mealie.app:main"
|
|
|
|
[tool.poetry.dependencies]
|
|
Jinja2 = "^3.1.2"
|
|
Pillow = "^9.2.0"
|
|
PyYAML = "^5.3.1"
|
|
SQLAlchemy = "^1.4.29"
|
|
aiofiles = "0.5.0"
|
|
alembic = "^1.7.5"
|
|
aniso8601 = "7.0.0"
|
|
appdirs = "1.4.4"
|
|
apprise = "^1.2.0"
|
|
bcrypt = "^4.0.1"
|
|
extruct = "^0.13.0"
|
|
fastapi = "^0.85.1"
|
|
gunicorn = "^20.1.0"
|
|
lxml = "^4.7.1"
|
|
orjson = "^3.8.0"
|
|
passlib = "^1.7.4"
|
|
psycopg2-binary = {version = "^2.9.1", optional = true}
|
|
pydantic = "^1.10.2"
|
|
pyhumps = "^3.5.3"
|
|
pytesseract = "^0.3.9"
|
|
python = "^3.10"
|
|
python-dateutil = "^2.8.2"
|
|
python-dotenv = "^0.15.0"
|
|
python-jose = "^3.3.0"
|
|
python-ldap = "^3.3.1"
|
|
python-multipart = "^0.0.5"
|
|
python-slugify = "^6.1.2"
|
|
recipe-scrapers = "^14.24.0"
|
|
requests = "^2.25.1"
|
|
tzdata = "^2021.5"
|
|
uvicorn = {extras = ["standard"], version = "^0.13.0"}
|
|
pre-commit = "^2.20.0"
|
|
|
|
[tool.poetry.dev-dependencies]
|
|
black = "^21.12b0"
|
|
coverage = "^5.5"
|
|
coveragepy-lcov = "^0.1.1"
|
|
mkdocs-material = "^8.2.3"
|
|
mypy = "^0.960"
|
|
openapi-spec-validator = "^0.4.0"
|
|
pre-commit = "^2.20.0"
|
|
pydantic-to-typescript = "^1.0.7"
|
|
pylint = "^2.6.0"
|
|
pytest = "^7.2.0"
|
|
rich = "^10.7.0"
|
|
ruff = "^0.0.149"
|
|
types-PyYAML = "^6.0.4"
|
|
types-python-dateutil = "^2.8.18"
|
|
types-python-slugify = "^5.0.3"
|
|
types-requests = "^2.27.12"
|
|
types-urllib3 = "^1.26.11"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
|
|
[build-system]
|
|
build-backend = "poetry.core.masonry.api"
|
|
requires = ["poetry-core>=1.0.0"]
|
|
|
|
[tool.black]
|
|
line-length = 120
|
|
target-version = ["py310"]
|
|
|
|
[tool.vulture]
|
|
exclude = ["**/models/**/*.py", "dir/"]
|
|
ignore_decorators = ["@*router.*", "@app.on_event", "@validator", "@controller"]
|
|
make_whitelist = true
|
|
min_confidence = 60
|
|
paths = ["mealie"]
|
|
sort_by_size = true
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "-ra -q"
|
|
minversion = "6.0"
|
|
python_classes = '*Tests'
|
|
python_files = 'test_*'
|
|
python_functions = 'test_*'
|
|
testpaths = [
|
|
"tests",
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
skip_empty = true
|
|
|
|
[tool.poetry.extras]
|
|
pgsql = ["psycopg2-binary"]
|
|
|
|
[tool.mypy]
|
|
follow_imports = "skip"
|
|
ignore_missing_imports = true
|
|
plugins = "pydantic.mypy"
|
|
python_version = "3.10"
|
|
strict_optional = true
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
format = "text"
|
|
|
|
# Enable Pyflakes `E` and `F` codes by default.
|
|
ignore = ["F403", "I252","B008"]
|
|
select = [
|
|
"E", # pycodestyles
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"T", # flake8-print
|
|
"U", # pyupgrade
|
|
"B", # flake8-bugbear
|
|
# "ANN", # flake8-annotations
|
|
# "C", # McCabe complexity
|
|
# "RUF", # Ruff specific
|
|
# "BLE", # blind-except
|
|
]
|
|
|
|
# Exclude a variety of commonly ignored directories.
|
|
exclude = [
|
|
".bzr",
|
|
".direnv",
|
|
".eggs",
|
|
".git",
|
|
".hg",
|
|
".mypy_cache",
|
|
".nox",
|
|
".pants.d",
|
|
".ruff_cache",
|
|
".svn",
|
|
".tox",
|
|
".venv",
|
|
"__pypackages__",
|
|
"_build",
|
|
"buck-out",
|
|
"build",
|
|
"dist",
|
|
"node_modules",
|
|
"venv",
|
|
]
|
|
|
|
# Assume Python 3.10.
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
"__init__.py" = ["E402","E501"]
|
|
|
|
[tool.ruff.mccabe]
|
|
# Unlike Flake8, default to a complexity level of 10.
|
|
max-complexity = 10
|