Files
posthog/pyproject.toml
2025-07-02 09:06:08 +00:00

332 lines
9.0 KiB
TOML

[project]
name = "posthog"
version = "0.0.0"
requires-python = "==3.11.*" # Same as in Dockerfile
dependencies = [
"aioboto3==12.0.0",
"aiohttp==3.11.10",
"aiokafka>=0.8",
"anthropic==0.49.0",
"antlr4-python3-runtime==4.13.1",
"asyncstdlib==3.13.1",
"beautifulsoup4==4.12.3",
"boto3==1.28.16",
"brotli==1.1.0",
"celery==5.3.4",
"celery-redbeat==2.1.1",
"clickhouse-connect==0.8.17",
"clickhouse-driver==0.2.9",
"clickhouse-pool==0.5.3",
"conditional-cache==1.2",
"cryptography==39.0.2",
"dagster==1.10.18",
"dagster-cloud==1.10.18",
"dagster-aws==0.26.18",
"dagster-celery==0.26.18",
"dagster-postgres==0.26.18",
"dagster-slack==0.26.18",
"dagster-webserver==1.10.18",
"deltalake==0.25.2",
"dj-database-url==0.5.0",
"django~=4.2.17",
"django-axes==5.9.0",
"django-cors-headers==3.5.0",
"django-deprecate-fields==0.1.1",
"django-extensions==3.1.2",
"django-filter==2.4.0",
"django-loginas==0.3.11",
"django-picklefield==3.0.1",
"django-prometheus==2.2.0",
"django-redis==5.2.0",
"django-statsd==2.5.2",
"django-structlog==2.1.3",
"django-two-factor-auth==1.14.0",
"djangorestframework==3.15.1",
"djangorestframework-csv==2.1.1",
"djangorestframework-dataclasses==1.2.0",
"dlt==1.3.0",
"dnspython==2.2.1",
"drf-exceptions-hog==0.4.0",
"drf-extensions==0.7.0",
"drf-spectacular==0.27.2",
"geoip2==4.6.0",
"google-ads==26.1.0",
"google-cloud-bigquery==3.26",
"google-genai==1.10.0",
"gspread==6.2.1",
"gunicorn==20.1.0",
"hogql-parser==1.1.1",
"infi-clickhouse-orm",
"jsonref==1.1.0",
"kafka-python==2.0.2",
"kombu==5.3.2",
"langchain==0.3.25",
"langchain-community==0.3.23",
"langchain-openai==0.3.16",
"langgraph==0.4.1",
"lxml==5.2.1",
"lzstring==1.0.4",
"markdown-it-py~=3.0.0",
"mimesis==5.2.1",
"mistralai==1.6.0",
"more-itertools==9.0.0",
"nanoid==2.0.0",
"natsort==8.4.0",
"nh3==0.2.14",
"numpy==1.26.4",
"openai==1.77.0",
"openpyxl==3.1.2",
"orjson==3.10.15",
"pandas==2.2.0",
"paramiko==3.4.0",
"pdpyras==5.2.0",
"phonenumberslite==8.13.6",
"pillow==10.2.0",
"posthoganalytics>=5.1.0",
"psutil==6.0.0",
"psycopg2-binary==2.9.7",
"psycopg[binary]==3.2.4",
"pyarrow==18.1.0",
"pydantic==2.10.3",
"pyjwt==2.4.0",
"pympler==1.1",
"pymssql==2.3.1",
"pymysql==1.1.1",
"pymongo==4.13.2",
"pyodbc==5.1.0",
"python-dateutil>=2.8.2",
"python-snappy~=0.7.3",
"python3-saml==1.16.0",
"pytz==2023.3",
"redis==4.5.4",
"requests~=2.32.3",
"retry==0.9.2",
"s3fs==2023.10.0",
"scikit-learn==1.5.0",
"selenium==4.28.1",
"semantic-version==2.8.5",
"simple-salesforce>=1.12.6",
"slack-sdk==3.17.1",
"snowflake-connector-python==3.15.0",
"snowflake-sqlalchemy==1.7.3",
"social-auth-app-django==5.0.0",
"social-auth-core==4.3.0",
"sqlalchemy==2.0.38",
"sqlalchemy-bigquery[bqstorage]==1.12.1",
"sqlparse==0.4.4",
"sshtunnel==0.4.0",
"statshog==1.0.6",
"stripe==12.2.0",
"structlog==23.2.0",
"temporalio==1.8.0",
"tiktoken==0.9.*",
"token-bucket==0.3.0",
"toronado==0.1.0",
"tree-sitter==0.24.0",
"tree-sitter-bash==0.23.3",
"tree-sitter-go==0.23.4",
"tree-sitter-javascript==0.23.1",
"tree-sitter-python==0.23.6",
"tree-sitter-rust==0.23.2",
"tree-sitter-typescript==0.23.2",
"types-cachetools==5.5.0.20240820",
"tzlocal~=5.1",
"webdriver-manager==4.0.2",
"whitenoise==6.5.0",
"xmlsec==1.3.14",
"zstd==1.5.5.1",
"zxcvbn==4.4.28",
"pyyaml==6.0.1",
"tenacity>=8.4.2",
"chdb>=3.1.2",
"elevenlabs>=1.58.1",
"django-oauth-toolkit>=3.0.1",
"langchain-perplexity>=0.1.1",
"azure-ai-projects>=1.0.0b11",
"azure-ai-inference>=1.0.0b9",
"opentelemetry-sdk==1.33.1",
"opentelemetry-instrumentation-django==0.54b1",
"opentelemetry-instrumentation-asgi==0.54b1",
"opentelemetry-instrumentation-redis==0.54b1",
"opentelemetry-instrumentation-psycopg==0.54b1",
"opentelemetry-instrumentation-aiokafka==0.54b1",
"opentelemetry-instrumentation-kafka-python==0.54b1",
"opentelemetry-exporter-otlp-proto-grpc==1.33.1",
]
[dependency-groups]
dev = [
"aioresponses==0.7.6",
"autoevals==0.0.129",
"black~=23.9.1",
"boto3-stubs[s3]>=1.34.84",
"braintrust==0.1.1",
"braintrust-langchain==0.0.2",
"datamodel-code-generator==0.28.5",
"django-linear-migrations==2.16.*",
"django-stubs==5.0.4",
"djangorestframework-stubs~=3.14.5",
"faker==17.5.0",
"fakeredis[lua]==2.23.3",
"flaky==3.7.0",
"freezegun==1.2.2",
"inline-snapshot==0.19.*",
"ipython>=9.3.0",
"mypy~=1.11.1",
"mypy-baseline~=0.7.2",
"mypy-extensions==1.0.0",
# openapi-spec-validator needed for prance as a validation backend
"openapi-spec-validator==0.7.1",
"orjson==3.10.15",
"packaging==24.1",
"parameterized==0.9.0",
"prance==23.6.21.0",
"pyarrow==18.1.0",
"pyarrow-stubs==17.16",
"pytest==8.0.2",
"pytest-asyncio==0.21.1",
"pytest-cov==4.1.0",
"pytest-django==4.5.2",
"pytest-env==0.8.2",
"pytest-icdiff==0.6",
"pytest-mock==3.11.1",
"pytest-split==0.9.0",
"pytest-watch==4.2.0",
"pytest-xdist==3.6.1",
"python-dateutil>=2.8.2",
"requests-mock>=1.12.1",
"responses==0.23.1",
"ruff~=0.8.1",
"sqlalchemy==2.0.38",
"stpyv8==13.1.201.22",
"syrupy~=4.6.0",
"tach~=0.20.0",
"types-aioboto3[s3]>=14.3.0",
"types-boto3[essential]==1.37.6",
"types-freezegun==1.1.10",
"types-markdown==3.3.9",
"types-paramiko==3.4.0.20240423",
"types-pymysql==1.1.0.20240524",
"types-python-dateutil>=2.8.3",
"types-pytz==2023.3",
"types-pyyaml==6.0.1",
"types-redis==4.3.20",
# >= 2.31.0.7 versions of types-requests require urllib>=2, which is incompatible with our dependencies
"types-requests==2.31.0.6",
"types-retry==0.9.9.4",
"types-tzlocal~=5.1.0.1",
"watchdog==5.0.3",
]
[tool.uv]
required-version = ">=0.7.0"
[tool.uv.sources]
infi-clickhouse-orm = { git = "https://github.com/PostHog/infi.clickhouse_orm", rev = "9578c79f29635ee2c1d01b7979e89adab8383de2" }
[tool.black]
line-length = 120
target-version = ['py311']
[tool.isort]
profile = "black"
[tool.ruff]
line-length = 120
exclude = [
".git",
"./plugin-server/node_modules/",
"./plugins/node_modules/",
"./env",
"./posthog/hogql/grammar",
]
[tool.ruff.lint]
ignore = [
"B017",
"B019",
"B904",
"B905",
"C901",
"E501",
"E722",
"E731",
"F403",
"F541",
"F601",
"UP007",
"UP032",
]
select = [
"B",
"C4",
"C9",
"DJ012",
"E",
"F",
"RUF005",
"RUF013",
"RUF015",
"RUF019",
"T100",
"T2",
"TRY201",
"TRY400",
"UP",
"W",
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"./posthog/queries/column_optimizer/column_optimizer.py" = ["F401"]
"./posthog/migrations/0027_move_elements_to_group.py" = ["T201"]
"./posthog/queries/cohort_query.py" = ["F401"]
"./posthog/client.py" = ["T201"]
"./posthog/async_migrations/test/test_migrations_not_required.py" = ["T201"]
"__init__.py" = ["F401"]
"./posthog/api/capture.py" = ["T201"]
"./ee/clickhouse/generate_local.py" = ["T201"]
"./posthog/management/commands/merge_distinct_emails.py" = ["T201"]
"./posthog/demo/matrix/matrix.py" = ["T201"]
"./posthog/migrations/0038_migrate_actions_to_precalculate_events.py" = ["T201"]
"./posthog/settings/overrides.py" = ["T201"]
"./bin/hobby-ci.py" = ["T201"]
"./posthog/management/commands/migrate_elementgroup.py" = ["T201"]
"./posthog/models/plugin.py" = ["T201"]
"./docker-compose-config.py" = ["T201"]
"./posthog/management/commands/backfill_persons_and_groups_on_events.py" = [
"T201",
]
"./posthog/management/commands/generate_demo_data.py" = ["T201"]
"./posthog/apps.py" = ["T201"]
"./posthog/management/commands/partition.py" = ["T201"]
"./posthog/management/commands/migrate_clickhouse.py" = ["T201"]
"./posthog/email.py" = ["T201"]
"./posthog/hogql/grammar/HogQLParser.py" = ["F401", "F841", "E711"]
"./posthog/celery.py" = ["T201"]
"./posthog/hogql/grammar/HogQLLexer.py" = ["F401"]
"./posthog/utils.py" = ["T201"]
"./posthog/management/commands/sync_feature_flags.py" = ["T201"]
"./cypress/wait.py" = ["T201"]
"./posthog/management/commands/notify_helm_install.py" = ["T201", "T203"]
"./gunicorn.config.py" = ["T201"]
"./posthog/management/commands/run_async_migrations.py" = ["T201"]
"./posthog/management/commands/test_migrations_are_safe.py" = ["T201"]
"./posthog/management/commands/api_keys.py" = ["T201"]
"./posthog/demo/matrix/manager.py" = ["T201"]
[tool.dagster]
python_version = "3.11"
module_name = "dags.definitions"
code_location_name = "dags"
home = "/tmp/posthog-dagster/"
[tool.mypy-baseline]
sort_baseline = true
ignore_categories = ["note"]