aerich/pyproject.toml
Waket Zheng 0364ae3f83
feat: add project section (#424)
* refactor: apply future style type hints

* chore: use project section

* ci: upgrade to poetry v2

* ci: explicit declare python version for poetry

* fix error for generate index name

* fix _generate_fk_name

* ci: verify aiomysql support

* tests: poetry add

* Add patch to fix tortoise 0.24.1

* docs: update changelog
2025-02-26 14:24:02 +08:00

109 lines
2.8 KiB
TOML

[project]
name = "aerich"
version = "0.8.1"
description = "A database migrations tool for Tortoise ORM."
authors = [{name="long2ice", email="long2ice@gmail.com>"}]
license = { text = "Apache-2.0" }
readme = "README.md"
keywords = ["migrate", "Tortoise-ORM", "mysql"]
packages = [{ include = "aerich" }]
include = ["CHANGELOG.md", "LICENSE", "README.md"]
requires-python = ">=3.8"
dependencies = [
"tortoise-orm (>=0.21.0,<1.0.0); python_version < '4.0'",
"pydantic (>=2.0.2,!=2.1.0,!=2.7.0,<3.0.0)",
"dictdiffer (>=0.9.0,<1.0.0)",
"asyncclick (>=8.1.7,<9.0.0)",
"eval-type-backport (>=0.2.2,<1.0.0); python_version < '3.10'",
]
[project.optional-dependencies]
toml = [
"tomli-w (>=1.1.0,<2.0.0); python_version >= '3.11'",
"tomlkit (>=0.11.4,<1.0.0); python_version < '3.11'",
]
asyncpg = ["asyncpg"]
# Need asyncmy or aiomysql for MySQL
asyncmy = ["asyncmy>=0.2.9; python_version < '4.0'"]
mysql = ["aiomysql>=0.2.0"]
[project.urls]
homepage = "https://github.com/tortoise/aerich"
repository = "https://github.com/tortoise/aerich.git"
documentation = "https://github.com/tortoise/aerich"
[project.scripts]
aerich = "aerich.cli:main"
[tool.poetry]
requires-poetry = ">=2.0"
[tool.poetry.group.dev.dependencies]
ruff = "^0.9.0"
bandit = "^1.7.0"
mypy = "^1.10.0"
[tool.poetry.group.test.dependencies]
pytest = "^8.3.0"
pytest-mock = "^3.14.0"
pytest-xdist = "^3.6.0"
# Breaking change in 0.23.*
# https://github.com/pytest-dev/pytest-asyncio/issues/706
pytest-asyncio = "^0.21.2"
# required for sha256_password by asyncmy
cryptography = {version="^44.0.1", python="!=3.9.0,!=3.9.1"}
[tool.aerich]
tortoise_orm = "conftest.tortoise_orm"
location = "./migrations"
src_folder = "./."
[build-system]
requires = ["poetry-core>=2.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
asyncio_mode = 'auto'
[tool.coverage.run]
branch = true
source = ["aerich"]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:"
]
[tool.mypy]
pretty = true
python_version = "3.8"
exclude = [
"tests/assets",
]
[[tool.mypy.overrides]]
module = [
'dictdiffer.*',
'tomlkit',
'tomli_w',
'tomli',
]
ignore_missing_imports = true
[tool.ruff]
line-length = 100
[tool.ruff.lint]
extend-select = [
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"FA", # https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"RUF100", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
]
ignore = ["UP031"] # https://docs.astral.sh/ruff/rules/printf-string-formatting/
[tool.ruff.lint.per-file-ignores]
# TODO: Remove this line when dropping support for Python3.8
"aerich/inspectdb/__init__.py" = ["UP006", "UP035"]