content: [build-system]
  build-backend = "hatchling.build"
  requires = ["hatchling", "hatch-vcs"]
  # requires = ["setuptools>=42", "wheel"]
  # build-backend = "setuptools.build_meta"
  
  [project]
  name = "dmg"
  description = "Generic Differentiable Modeling Framework on PyTorch"
  readme = "README.md"
  license = { file = "LICENSE" }
  authors = [
      { name = "Leo Lonzarich", email = "lglonzaric@gmail.com" },
      { name = "Tadd Bindas", email = "taddbindas@gmail.com" },
      { name = "Farshid Rahmani", email = "farshid368@gmail.com" },
      { name = "Yalan Song", email = "songyalan1@gmail.com" },
  ]
  maintainers = [
      { name = "Leo Lonzarich", email = "lglonzaric@gmail.com" },
  ]
  requires-python = ">=3.12.0"
  dynamic = ["version"]
  dependencies = [
      "cartopy>=0.25.0",
      "geopandas>=1.1.1",
      "hydra-core>=1.3.2",
      "ipykernel>=6.30.1",
      "matplotlib>=3.10.7",
      "numpy>=2.3.3",
      "omegaconf>=2.3.0",
      "pandas>=2.3.3",
      "pre-commit>=4.3.0",
      "pydantic>=2.12.0",
      "ray[tune]>=2.50.0",
      "scikit-learn>=1.7.2",
      "scipy>=1.16.2",
      "torch>=2.8.0",
      "tqdm>=4.67.1",
      "uv>=0.9.2",
      "zarr>=3.1.3",
  ]
  classifiers = [
      "Programming Language :: Python :: 3",
      "License :: Free for non-commercial use",
      "Operating System :: OS Independent",
  ]
  
  [project.optional-dependencies]
  dev = [
      "ipywidgets>=8.1.7",
      "pytest>=8.4.2",
      "ruff>=0.14.0",
  ]
  hydrodl2 = [
      "hydrodl2 @ git+https://github.com/mhpi/hydrodl2.git@master"
  ]
  tensorboard = [
      "tensorboard>=2.20.0",
  ]
  wandb = [
      "wandb>=0.22.2",
  ]
  
  [project.urls]
  Homepage = "https://mhpi.github.io/codes/frameworks/"
  Repository = "https://github.com/mhpi/generic_deltamodel"
  
  [tool.hatch]
  version.source = "vcs"
  build.hooks.vcs.version-file = "src/dmg/_version.py"
  
  [tool.hatch.build.targets.wheel]
  packages = ["src/dmg", "tests"]
  
  [tool.hatch.metadata]
  allow-direct-references = true
  
  [tool.pytest.ini_options]
  testpaths = ["tests"]
  xfail_strict = true
  addopts = [
      "--import-mode=importlib",  # allow using test files with same name
  ]
  
  [tool.ruff]
  src = ["src"]
  line-length = 88
  lint.select = [
      "F",  # Errors detected by Pyflakes
      "E",  # Error detected by Pycodestyle
      "W",  # Warning detected by Pycodestyle
      "I",  # isort
      "D",  # pydocstyle
      "B",  # flake8-bugbear
      "TID",  # flake8-tidy-imports
      "C4",  # flake8-comprehensions
      "BLE",  # flake8-blind-except
      "UP",  # pyupgrade
      "RUF100",  # Report unused noqa directives
      # "COM812",  # Missing trailing comma
  ]
  exclude = [
      ".git",
      ".vscode",
      "archive",
      "dev",
  ]
  lint.ignore = [
      # Do not perform function call in argument defaults
      "B008",
      # Line too long
      "E501",
      # Do not assign a lambda expression, use a def
      "E731",
      # Missing docstring in public module
      "D100",
      # Missing docstring in public package
      "D104",
      # Missing docstring in magic method
      "D105",
      # Missing docstring in __init__
      "D107",
      # Blank lines before class docstring
      "D203",
      # 1 blank line required after class docstring
      "D204",
      # 1 blank line required between summary line and description
      "D205",
      # First line of docstring should be in imperative mood
      "D401",
      # Import block is un-sorted or un-formatted; Conflicts with isort
      "I001",
      # Blank line contains whitespace
      "W293",
      # Disable checks on | operator notation in type hints
      "UP007",
      # Use `X | None` for type annotations
      "UP045"
  ]
  
  [tool.ruff.lint.pydocstyle]
  convention = "numpy"
  
  [tool.ruff.lint.per-file-ignores]
  "docs/*" = ["I"]
  "tests/*" = ["D"]
  "*/__init__.py" = ["F401"]
  "*.ipynb" = ["E402", "E501", "F401", "F811", "F841", "T201"]
  
  [tool.ruff.format]
  quote-style = "preserve"
  docstring-code-format = true
  