Aniworld/pyproject.toml

254 lines
5.5 KiB
TOML

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "aniworld"
version = "1.0.0"
description = "AniWorld Anime Downloader and Manager"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
{name = "AniWorld Team", email = "contact@aniworld.dev"},
]
keywords = ["anime", "downloader", "flask", "web", "streaming"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Multimedia :: Video",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
dependencies = [
"flask>=2.3.0",
"flask-cors>=4.0.0",
"flask-login>=0.6.0",
"flask-session>=0.5.0",
"flask-wtf>=1.1.0",
"flask-migrate>=4.0.0",
"sqlalchemy>=2.0.0",
"alembic>=1.11.0",
"requests>=2.31.0",
"beautifulsoup4>=4.12.0",
"lxml>=4.9.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"python-dotenv>=1.0.0",
"celery>=5.3.0",
"redis>=4.6.0",
"cryptography>=41.0.0",
"bcrypt>=4.0.0",
"click>=8.1.0",
"rich>=13.4.0",
"psutil>=5.9.0",
"aiofiles>=23.1.0",
"httpx>=0.24.0",
"websockets>=11.0.0",
"jinja2>=3.1.0",
"markupsafe>=2.1.0",
"wtforms>=3.0.0",
"email-validator>=2.0.0",
"python-dateutil>=2.8.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.21.0",
"pytest-flask>=1.2.0",
"pytest-mock>=3.11.0",
"black>=23.7.0",
"isort>=5.12.0",
"flake8>=6.0.0",
"mypy>=1.5.0",
"pre-commit>=3.3.0",
"coverage>=7.3.0",
"bandit>=1.7.5",
"safety>=2.3.0",
"ruff>=0.0.284",
]
test = [
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.21.0",
"pytest-flask>=1.2.0",
"pytest-mock>=3.11.0",
"factory-boy>=3.3.0",
"faker>=19.3.0",
]
docs = [
"sphinx>=7.1.0",
"sphinx-rtd-theme>=1.3.0",
"sphinx-autodoc-typehints>=1.24.0",
"myst-parser>=2.0.0",
]
production = [
"gunicorn>=21.2.0",
"gevent>=23.7.0",
"supervisor>=4.2.0",
]
[project.urls]
Homepage = "https://github.com/yourusername/aniworld"
Repository = "https://github.com/yourusername/aniworld.git"
Documentation = "https://aniworld.readthedocs.io/"
"Bug Tracker" = "https://github.com/yourusername/aniworld/issues"
[project.scripts]
aniworld = "src.main:main"
aniworld-server = "src.server.app:cli"
[tool.setuptools.packages.find]
where = ["src"]
include = ["*"]
exclude = ["tests*"]
[tool.black]
line-length = 88
target-version = ['py38', 'py39', 'py310', 'py311']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| venv
| aniworld
| build
| dist
)/
'''
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
[tool.flake8]
max-line-length = 88
extend-ignore = ["E203", "W503", "E501"]
exclude = [
".git",
"__pycache__",
"build",
"dist",
".venv",
"venv",
"aniworld",
]
[tool.mypy]
python_version = "3.8"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"bs4.*",
"lxml.*",
"celery.*",
"redis.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q --strict-markers --strict-config"
testpaths = [
"tests",
]
python_files = [
"test_*.py",
"*_test.py",
]
python_classes = [
"Test*",
]
python_functions = [
"test_*",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"e2e: marks tests as end-to-end tests",
"unit: marks tests as unit tests",
"api: marks tests as API tests",
"web: marks tests as web interface tests",
]
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/venv/*",
"*/__pycache__/*",
"*/migrations/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.ruff]
target-version = "py38"
line-length = 88
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**/*" = ["F401", "F811"]
[tool.bandit]
exclude_dirs = ["tests", "venv", "aniworld"]
skips = ["B101", "B601"]