[project] requires-python = ">=3.11" name = "alphabetlearning" 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 "botocore~=1.34.93", # Django # ------------------------------------------------------------------------------ "django-storages==1.14.3", "gunicorn==22.0.0", "Django==5.1.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/psycopg/psycopg "watchfiles==0.21.0", # https://github.com/samuelcolvin/watchfiles "stripe==11.1.0", "django-stubs[compatible-mypy]>=5.0.4", # "django-ratelimit==4.1.0", "django-recaptcha==4.0.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.6.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", "isort>=5.13.2", ] # ==== 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 = ["alphabetlearning/**"] 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 = ["E", "F", "B", "SIM", "I"] ignore = [ "E501", # line length! "I001", # imports - we are going to let isort do it "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] line-length = 150 quote-style = "double" indent-style = "space" skip-magic-trailing-comma = false line-ending = "auto" [tool.ruff.lint.isort] force-single-line = true