content: [project]
  name = "opennem"
  description = "OpenElectricity (OpenNEM) Australian Energy Data Platform"
  license = {file = "LICENSE"}
  keywords = ["openelectricity", "opennem", "analysis", "australia", "energy"]
  classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Environment :: Console",
    "Programming Language :: Python :: 3.12",
  ]
  authors = [
      {name = "Dylan McConnell", email = "dylan.mcconnell@unimelb.edu.au"},
      {name = "Nik Cubrilovic", email = "git@nikcub.me"},
  ]
  requires-python = "<4.0,>=3.11"
  version = "4.4.0.dev4"
  
  dependencies = [
      "requests<3.0.0,>=2.23.0",
      "sentry-sdk[asyncpg,fastapi,httpx,sqlalchemy]",
      "pydantic[email]<3.0.0,>=2.6.4",
      "alembic<2.0.0,>=1.6.2",
      "geojson<4.0.0,>=3.1.0",
      "fastapi<1.0.0,>=0.110.0",
      "shapely<3.0.0,>=2.0.2",
      "validators<1.0.0,>=0.18.1",
      "python-magic<1.0.0,>=0.4.18",
      "cachetools<6.0.0,>=5.0.0",
      "xlrd<3.0.0,>=2.0.1",
      "datetime-truncate<2.0.0,>=1.1.1",
      "datedelta<2.0,>=1.3",
      "pandas<3.0.0,>=2.2.0",
      "osm2geojson<1.0.0,>=0.2.0",
      "Mako<2.0.0,>=1.1.4",
      "SQLAlchemy[asyncio]<3.0.0,>=2.0.32",
      "rich<14.0.0,>=13.7.0",
      "GeoAlchemy2<1.0.0,>=0.14.4",
      "boto3<2.0.0,>=1.23.7",
      "seaborn<1.0.0,>=0.13.2",
      "fastapi-cache2[redis]<1.0.0,>=0.2.1",
      "httpx[http2,socks]>=0.27.0,<1.0.0",
      "uvicorn<1.0.0,>=0.30.4",
      "gunicorn<23.0.0,>=22.0.0",
      "unkey-py>=0.7.1,<0.8.0",
      "authlib<2.0.0,>=1.2.1",
      "pydantic-geojson<1.0.0,>=0.1.1",
      "pydantic-settings<3.0.0,>=2.1.0",
      "python-multipart<1.0.0,>=0.0.6",
      "fastapi-versionizer<5.0.0,>=4.0.1",
      "datetype<2025.0.0,>=2024.2.8",
      "asyncpg<1.0.0,>=0.29.0",
      "deprecation<3.0.0,>=2.1.0",
      "asgiref<4.0.0,>=3.8.1",
      "chardet<6.0.0,>=5.2.0",
      "tqdm<5.0.0,>=4.66.5",
      "logfire[asyncpg,fastapi,httpx,redis,requests,sqlalchemy,system-metrics]",
      "aioboto3==13.3.0",
      "arq>=0.26.1,<1.0.0",
      "asyncclick<9.0.0.0,>=8.1.7.2",
      "openai<2.0.0,>=1.43.1",
      "instructor<2.0.0,>=1.4.0",
      "sanity @ git+https://github.com/OmniPro-Group/sanity-python.git",
      "portabletext-html<2.0.0,>=1.1.3",
      "tenacity>=9.0.0",
      "psycopg[binary]>=3.2.3",
      "polars>=1.14.0",
      "typer>=0.15.1",
      "humanize>=4.11.0",
      "clerk-backend-api>=1.5.0",
      "pyarrow>=18.1.0",
      "curl-cffi>=0.7.4",
      "hypercorn>=0.17.3",
      "clickhouse-driver>=0.2.7",
      "clickhouse-sqlalchemy>=0.3.0",
      "opentelemetry-sdk<1.30.0",
      "orjson>=3.10.16",
      "tweepy[async]>=4.15.0",
      "atproto>=0.0.59",
      "rnet==3.0.0rc8",
  ]
  
  [dependency-groups]
  dev = [
      "python-dotenv<2.0.0,>=1.0.0",
      "rope<2.0.0,>=1.0.0",
      "pytest<9.0.0,>=8.0.0",
      "pytest-watch<5.0.0,>=4.2.0",
      "mdutils<2.0.0,>=1.2.2",
      "pytest-benchmark<5.0.0,>=4.0.0",
      "pdbpp<1.0.0,>=0.10.2",
      "pytest-sugar<2.0.0,>=1.0.0",
      "tox<5.0.0,>=4.2.6",
      "types-requests<3.0.0,>=2.25.2",
      "betamax>=0.9.0,<1.0.0",
      "coverage<8.0.0,>=7.1.0",
      "pytest-cov<6.0.0,>=5.0.0",
      "types-cachetools<6.0.0,>=5.0.0",
      "freezegun<2.0.0,>=1.2.2",
      "pyright<2.0.0,>=1.1.299",
      "ruff>=0.6.5,<1.0.0",
      "pytest-asyncio<1.0.0,>=0.24.0",
      "types-redis<5.0.0.0,>=4.6.0.11",
      "requests-cache<2.0.0,>=1.1.1",
      "hypothesis<7.0.0,>=6.108.5",
      "psycopg2-binary>=2.9.10",
      "duckdb>=1.1.3",
      "python-levenshtein>=0.27.1",
      "fuzzywuzzy>=0.18.0",
      "openai>=1.61.0",
      "ty>=0.0.1a21",
  ]
  
  [tool.uv]
  package = true
  
  [project.scripts]
  openelectricity = "opennem.cli:main"
  opennem = "opennem.cli:main"
  api = "bin.run_hypercorn:serve"
  dev = "bin.run_server:run_server"
  worker = "opennem.tasks.app:main"
  
  [tool.ruff]
  target-version = "py312"
  line-length = 130
  exclude = [
    "var",
    "opennem/db/migrations",
    "build",
    "notebooks",
    ".ipython",
    ".jupyter",
  ]
  
  [tool.ruff.lint]
  select = [
    "F",   # flake8
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "F",   # pyflakes
    "I",   # isort
    "C",   # flake8-comprehensions
    "B",   # flake8-bugbear
    "UP",  # pyupgrade
    "T",   # mypy
  #  "FAST", # fastapi
  #  "PERF", # perflint
  #  "FURB", # refurb
  ]
  ignore = [
      "B008",  # do not perform function calls in argument defaults
      "T201",  # ignore print
      "T203",  # ignore pprint
      "C901",  # ignore function too complex
      "E721",  # igmpre unsafe type comparison
  ]
  
  [tool.ruff.format]
  quote-style = "double"
  docstring-code-format = true
  docstring-code-line-length = 100
  
  [tool.pyright]
  include = ["opennem/**/*.py"]
  exclude = ["opennem/db/migrations/env.py"]
  reportMissingImports = "error"
  reportMissingTypeStubs = false
  
  [tool.pytest.ini_options]
  log_cli = true
  log_level = "DEBUG"
  log_format = "%(asctime)s %(levelname)s %(message)s"
  log_date_format = "%Y-%m-%d %H:%M:%S"
  minversion = "6.0"
  addopts = "-ra -q"
  testpaths = [
      "tests",
  ]
  
  [tool.hatch.version]
  path = "opennem/__init__.py"
  
  [tool.setuptools]
  include-package-data = true
  packages = ["opennem", "bin"]
  