9ecef4c25f
This PR does too many things :( 1. Major refactoring of the dev/scripts and dev/code-generation folders. Primarily this was removing duplicate code and cleaning up some poorly written code snippets as well as making them more idempotent so then can be re-run over and over again but still maintain the same results. This is working on my machine, but I've been having problems in CI and comparing diffs so running generators in CI will have to wait. 2. Re-Implement using the generated api routes for testing This was a _huge_ refactor that touched damn near every test file but now we have auto-generated typed routes with inline hints and it's used for nearly every test excluding a few that use classes for better parameterization. This should greatly reduce errors when writing new tests. 3. Minor Perf improvements for the All Recipes endpoint A. Removed redundant loops B. Uses orjson to do the encoding directly and returns a byte response instead of relying on the default jsonable_encoder. 4. Fix some TS type errors that cropped up for seemingly no reason half way through the PR. See this issue https://github.com/phillipdupuis/pydantic-to-typescript/issues/28 Basically, the generated TS type is not-correct since Pydantic will automatically fill in null fields. The resulting TS type is generated with a ? to indicate it can be null even though we _know_ that i can't be.
109 lines
2.3 KiB
TOML
109 lines
2.3 KiB
TOML
[tool.poetry]
|
|
name = "mealie"
|
|
version = "1.0.0b"
|
|
description = "A Recipe Manager"
|
|
authors = ["Hayden <hay-kot@pm.me>"]
|
|
license = "AGPL"
|
|
|
|
[tool.poetry.scripts]
|
|
start = "mealie.app:main"
|
|
|
|
[tool.poetry.dependencies]
|
|
python = "^3.10"
|
|
aiofiles = "0.5.0"
|
|
aniso8601 = "7.0.0"
|
|
appdirs = "1.4.4"
|
|
fastapi = "^0.85.0"
|
|
uvicorn = {extras = ["standard"], version = "^0.13.0"}
|
|
SQLAlchemy = "^1.4.29"
|
|
alembic = "^1.7.5"
|
|
Jinja2 = "^3.1.2"
|
|
python-dotenv = "^0.15.0"
|
|
python-slugify = "^6.1.2"
|
|
requests = "^2.25.1"
|
|
PyYAML = "^5.3.1"
|
|
extruct = "^0.13.0"
|
|
python-multipart = "^0.0.5"
|
|
bcrypt = "^3.2.0"
|
|
python-jose = "^3.3.0"
|
|
passlib = "^1.7.4"
|
|
lxml = "^4.7.1"
|
|
Pillow = "^9.2.0"
|
|
apprise = "^0.9.6"
|
|
recipe-scrapers = "^14.14.1"
|
|
psycopg2-binary = {version = "^2.9.1", optional = true}
|
|
gunicorn = "^20.1.0"
|
|
emails = "^0.6"
|
|
python-ldap = "^3.3.1"
|
|
pydantic = "^1.9.1"
|
|
tzdata = "^2021.5"
|
|
pyhumps = "^3.5.3"
|
|
pytesseract = "^0.3.9"
|
|
orjson = "^3.8.0"
|
|
|
|
[tool.poetry.dev-dependencies]
|
|
pylint = "^2.6.0"
|
|
pytest = "^6.2.1"
|
|
pytest-cov = "^2.11.0"
|
|
mkdocs-material = "^8.2.3"
|
|
flake8 = "^4.0.1"
|
|
coverage = "^5.5"
|
|
pydantic-to-typescript = "^1.0.7"
|
|
rich = "^10.7.0"
|
|
isort = "^5.9.3"
|
|
flake8-print = "^4.0.0"
|
|
black = "^21.12b0"
|
|
coveragepy-lcov = "^0.1.1"
|
|
mypy = "^0.960"
|
|
types-python-slugify = "^5.0.3"
|
|
types-PyYAML = "^6.0.4"
|
|
types-requests = "^2.27.12"
|
|
types-urllib3 = "^1.26.11"
|
|
pre-commit = "^2.17.0"
|
|
types-python-dateutil = "^2.8.18"
|
|
openapi-spec-validator = "^0.4.0"
|
|
|
|
|
|
[build-system]
|
|
requires = ["poetry-core>=1.0.0"]
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
[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.isort]
|
|
profile = "black"
|
|
line_length = 120
|
|
multi_line_output = 3
|
|
|
|
[tool.pytest.ini_options]
|
|
minversion = "6.0"
|
|
addopts = "-ra -q --cov=mealie"
|
|
python_files = 'test_*'
|
|
python_classes = '*Tests'
|
|
python_functions = 'test_*'
|
|
testpaths = [
|
|
"tests",
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
skip_empty = true
|
|
|
|
[tool.poetry.extras]
|
|
pgsql = ["psycopg2-binary"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.10"
|
|
ignore_missing_imports = true
|
|
follow_imports = "skip"
|
|
strict_optional = false # TODO: Fix none type checks - temporary stop-gap to implement mypy
|
|
plugins = "pydantic.mypy"
|