[project] name = "pyblackbird_cc" version = "0.1.0" dependencies = [ "python-slugify==8.0.4", # https://github.com/un33k/python-slugify "pillow==10.3.0", # https://github.com/python-pillow/Pillow "argon2-cffi==23.1.0", # https://github.com/hynek/argon2_cffi "whitenoise==6.6.0", # https://github.com/evansd/whitenoise "redis==5.0.4", # https://github.com/redis/redis-py "hiredis==2.3.2", # https://github.com/redis/hiredis-py "celery==5.4.0", # pyup: < 6.0 # https://github.com/celery/celery "django-celery-beat==2.6.0", # https://github.com/celery/django-celery-beat "flower==2.0.1", # https://github.com/mher/flower "botocore~=1.34.93", # Django # ------------------------------------------------------------------------------ "django-storages==1.14.3", "Django==5.0.4", # pyup: < 5.0 # https://www.djangoproject.com/ "django-environ==0.11.2", # https://github.com/joke2k/django-environ "django-model-utils==4.5.1", # https://github.com/jazzband/django-model-utils "django-allauth[mfa]==0.62.1", # https://github.com/pennersr/django-allauth "django-crispy-forms==2.1", # https://github.com/django-crispy-forms/django-crispy-forms "crispy-bootstrap5==2024.2", # https://github.com/django-crispy-forms/crispy-bootstrap5 "django-redis==5.4.0", # https://github.com/jazzband/django-redis # migrated stuff from pyblackbird "pdf2image==1.17.0", "pypdf2==3.0.1", "python-magic==0.4.27", "python-dotenv==1.0.1", "boto3==1.34.89", "sqlparse==0.5.0", "markdown==3.6.0", "Werkzeug[watchdog]==3.0.2", # https://github.com/pallets/werkzeug "psycopg[c]==3.1.19", # https://github.com/psycopg/psycopg "watchfiles==0.21.0", # https://github.com/samuelcolvin/watchfiles "stripe==10.10.0" ] [tool.uv] # https://docs.astral.sh/uv/concepts/dependencies/#development-dependencies dev-dependencies = [ "factory-boy==3.3.0", # https://github.com/FactoryBoy/factory_boy "django-coverage-plugin==3.1.0", # https://github.com/nedbat/django_coverage_plugin "pytest-django==4.8.0", # https://github.com/pytest-dev/pytest-django "ruff==0.4.4", # https://github.com/astral-sh/ruff "coverage==7.5.1", # https://github.com/nedbat/coveragepy "pytest==8.2.0", # https://github.com/pytest-dev/pytest "pytest-sugar==1.0.0", # https://github.com/Frozenball/pytest-sugar "pdbpp==0.10.3" ] # ==== pytest ==== [tool.pytest.ini_options] minversion = "6.0" #addopts = "--disable-pytest-warnings -q -rP --ds=config.settings.local --reuse-db --import-mode=importlib" addopts = "--disable-pytest-warnings -q --tb=short -s --ds=config.settings.local --reuse-db --import-mode=importlib" python_files = [ "tests.py", "test_*.py", ] DJANGO_SETTINGS_MODULE = "config.settings.local" # ==== Coverage ==== [tool.coverage.run] include = ["pyblackbird_cc/**"] omit = ["*/migrations/*", "*/tests/*"] plugins = ["django_coverage_plugin"] # ==== mypy ==== [tool.mypy] python_version = "3.12" check_untyped_defs = true ignore_missing_imports = true warn_unused_ignores = true warn_redundant_casts = true warn_unused_configs = true plugins = [ "mypy_django_plugin.main", ] [[tool.mypy.overrides]] # Django migrations should not produce any errors: module = "*.migrations.*" ignore_errors = true [tool.django-stubs] django_settings_module = "config.settings.local" [tool.ruff] # Exclude a variety of commonly ignored directories. exclude = [ ".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv", "bootstrap", "static/bootstrap/css", "static/bootstrap/js", "*/migrations/*.py", "staticfiles/*" ] # Same as Django: https://github.com/cookiecutter/cookiecutter-django/issues/4792. line-length = 100 indent-width = 4 target-version = "py312" [tool.ruff.lint] select = [ "F", "E", "W", "C90", "I", "N", "UP", "YTT", # "ANN", # flake8-annotations: we should support this in the future but 100+ errors atm "ASYNC", "S", "BLE", "FBT", "B", "A", "COM", "C4", "DTZ", "T10", "DJ", "EM", "EXE", "FA", 'ISC', "ICN", "G", 'INP', 'PIE', "T20", 'PYI', 'PT', "Q", "RSE", "RET", "SLF", "SLOT", "SIM", "TID", "TCH", "INT", # "ARG", # Unused function argument "PTH", "ERA", "PD", "PGH", "PL", "TRY", "FLY", # "NPY", # "AIR", "PERF", # "FURB", # "LOG", "RUF" ] ignore = [ "TRY003", "RUF001", "COM812", "ISC001", "EM101", "S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/ "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` "SIM102", # sometimes it's better to nest "UP038" # Checks for uses of isinstance/issubclass that take a tuple # of types for comparison. # Deactivated because it can make the code slow: # https://github.com/astral-sh/ruff/issues/7871 ] # Allow fix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] unfixable = [] # The fixes in extend-unsafe-fixes will require # provide the `--unsafe-fixes` flag when fixing. extend-unsafe-fixes = [ "UP038" ] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.ruff.format] quote-style = "double" indent-style = "space" skip-magic-trailing-comma = false line-ending = "auto" [tool.ruff.lint.isort] force-single-line = true