content: # --- PROJECT CONFIGURATION --- #
  
  [build-system]
  requires = ["setuptools>=67", "wheel", "setuptools-git-versioning>=2.0,<3"]
  build-backend = "setuptools.build_meta"
  
  # Metadata (see https://peps.python.org/pep-0621/)
  [project]
  name = "ocf-data-sampler"
  dynamic = ["version"] # Set automtically using git: https://setuptools-git-versioning.readthedocs.io/en/stable/
  readme = { file = "README.md", content-type = "text/markdown" }
  requires-python = ">=3.11"
  license = { file = "LICENSE" }
  authors = [
      { name = "Open Climate Fix team", email = "info@openclimatefix.org" },
      { name = "James Fulton" },
      { name = "Peter Dudfield" },
  ]
  classifiers = [
      "Programming Language :: Python :: 3",
      "License :: OSI Approved :: MIT License",
  ]
  dependencies = [
      "torch",
      "numpy",
      "pandas",
      "xarray",
      "zarr",
      "numcodecs",
      "dask",
      "matplotlib",
      "pvlib",
      "pydantic",
      "pyproj",
      "pyaml_env",
      "pyresample",
      "h5netcdf",
      "xarray-tensorstore==0.1.5",
      "zarr>=3",
  ]
  
  [dependency-groups]
  dev = [
      # Testing
      "pytest",
      "ruff >= 0.9.2",
      # LSP Support
      "python-lsp-server",
      "python-lsp-ruff",
  ]
  
  [project.urls]
  repository = "https://github.com/openclimatefix/ocf-data-sampler"
  
  [tool.setuptools]
  license-files = []
  
  [tool.setuptools.packages.find]
  where = ["."]
  exclude = ["test*"]
  
  [tool.setuptools.package-data]
  "*" = ["*.csv"]
  
  [tool.setuptools-git-versioning]
  enabled = true
  
  
  # --- LINTING AND TYPING CONFIGURATION --- #
  
  # MyPy configuration
  # * See https://mypy.readthedocs.io/en/stable/index.html
  [tool.mypy]
  python_version = "3.12"
  strict = true
  warn_unreachable = true
  warn_return_any = true
  disallow_untyped_defs = true
  plugins = [
      "numpy.typing.mypy_plugin",
  ]
  
  [[tool.mypy.overrides]]
  # Ignore missing imports for libraries that don't have them.
  # If they are ever made, remove from here!
  module = [
      "fsspec",
      "s3fs",
      "zarr",
  ]
  ignore_missing_imports = true
  
  # Ruff configuration
  # * See https://beta.ruff.rs/docs/
  [tool.ruff]
  line-length = 100
  indent-width = 4
  exclude = ["__init__.py"]
  
  [tool.ruff.lint]
  select = [
      "F",   # pyflakes
      "E",   # pycodestyle
      "W",   # whitespace and newlines
      "I",   # isort
      "UP",  # modernize
      "ANN", # flake8 type annotations
      "S",   # flake8 bandit
      "B",   # flake8 bugbear
      "C4",  # flake8 comprehensions
      "COM", # flake8 commas
      "T20", # flake8 print
      "SIM", # flake8 simplify
      "ARG", # flake8 unused arguments
      "DTZ", # flake8 datetimes
      "Q",   # flake8 quotes
      "TCH", # flake8 typecheck
      "D",   # pydocstyle
      "RUF", # ruff-specific rules
  ]
  fixable = ["ALL"]
  ignore = [
      "D203", "D213", "D215", "D400", "D401", "D404", "D406",
      "D407", "D408", "D409", "D413",
  ]
  
  [tool.ruff.lint.per-file-ignores]
  "test*" = ["D", "ANN", "S101"]
  
  [tool.ruff.lint.pydocstyle]
  convention = "google"
  
  [tool.ruff.format]
  quote-style = "double"
  indent-style = "space"
  line-ending = "auto"
  docstring-code-format = true
  docstring-code-line-length = 100
  
  