# ServiceManagerWeb Backend - PyProject Configuration [build-system] requires = ["setuptools>=68.0", "wheel"] build-backend = "setuptools.build_meta" [project] name = "servicemanager-backend" version = "1.5.1" description = "ServiceManagerWeb Backend - Mesa de Ayuda B2B" authors = [ {name = "Aduanasoft", email = "dev@aduanasoft.com"} ] readme = "README.md" requires-python = ">=3.11" license = {text = "Proprietary"} dependencies = [ "fastapi==0.104.1", "uvicorn[standard]==0.24.0", "pydantic==2.5.0", "pydantic-settings==2.1.0", "sqlalchemy==2.0.23", "alembic==1.13.0", "asyncpg==0.29.0", "psycopg2-binary==2.9.9", "python-jose[cryptography]==3.3.0", "python-multipart==0.0.6", "passlib[argon2]==1.7.4", "argon2-cffi==23.1.0", "pyotp==2.9.0", "celery==5.3.4", "redis==5.0.1", "email-validator==2.1.0", "jinja2==3.1.2", "python-magic==0.4.27", "pillow==10.1.0", "httpx==0.25.2", "aiofiles==23.2.1", "python-dateutil==2.8.2", "pytz==2023.3", "slugify==0.0.1", "structlog==23.2.0", "prometheus-client==0.19.0" ] [project.optional-dependencies] dev = [ "pytest==7.4.3", "pytest-asyncio==0.21.1", "pytest-cov==4.1.0", "faker==20.1.0", "ruff==0.1.7", "black==23.11.0", "mypy==1.7.1", "pre-commit==3.6.0" ] production = [ "gunicorn==21.2.0" ] [tool.setuptools.packages.find] where = ["."] include = ["app*"] # =================================== # RUFF CONFIGURATION # =================================== [tool.ruff] line-length = 100 target-version = "py311" select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "B", # flake8-bugbear "C4", # flake8-comprehensions "UP", # pyupgrade "N", # pep8-naming ] 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/**/*" = ["N802", "N803", "N806"] [tool.ruff.isort] known-first-party = ["app"] # =================================== # BLACK CONFIGURATION # =================================== [tool.black] line-length = 100 target-version = ['py311'] include = '\.pyi?$' extend-exclude = ''' /( # directories \.eggs | \.git | \.hg | \.mypy_cache | \.tox | \.venv | build | dist )/ ''' # =================================== # MYPY CONFIGURATION # =================================== [tool.mypy] python_version = "3.11" check_untyped_defs = true disallow_any_generics = true disallow_incomplete_defs = true disallow_untyped_defs = true no_implicit_optional = true warn_redundant_casts = true warn_unused_ignores = true warn_return_any = true strict_equality = true show_error_codes = true [[tool.mypy.overrides]] module = [ "passlib.*", "pyotp.*", "magic.*", ] ignore_missing_imports = true # =================================== # PYTEST CONFIGURATION # =================================== [tool.pytest.ini_options] minversion = "7.0" addopts = "-ra -q --strict-markers --strict-config" testpaths = ["tests"] asyncio_mode = "auto" 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", "unit: marks tests as unit tests", ] # =================================== # COVERAGE CONFIGURATION # =================================== [tool.coverage.run] source = ["app"] omit = [ "*/tests/*", "*/venv/*", "*/__pycache__/*", ] [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", ]