content: [build-system]
  requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
  build-backend = "setuptools.build_meta"
  
  [project]
  name = "parcels"
  description = "Framework for Lagrangian tracking of virtual ocean particles in the petascale age."
  readme = "README.md"
  dynamic = ["version"]
  authors = [{ name = "Parcels team" }]
  requires-python = ">=3.11,<3.13"
  license = { file = "LICENSE.md" }
  classifiers = [
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Operating System :: OS Independent",
    "Topic :: Scientific/Engineering",
    "Intended Audience :: Science/Research",
  ]
  dependencies = [
    "cftime >=1.6.3",
    "numpy >=2.1.0",
    "dask >=2024.5.1",
    "netCDF4 >=1.7.2",
    "zarr >=2.15.0,!=2.18.0,<3",
    "tqdm >=4.50.0",
    "pytest",
    "xarray >=2024.5.0",
    "uxarray >=2025.3.0",
    "pooch >=1.8.0",
    "xgcm >=0.9.0",
    "cf_xarray >=0.8.6",
  ]
  
  [project.urls]
  homepage = "https://parcels-code.org/"
  repository = "https://github.com/Parcels-code/parcels"
  Tracker = "https://github.com/Parcels-code/parcels/issues"
  
  
  [tool.setuptools]
  package-dir = { "" = "src" }
  packages = ["parcels"]
  
  [tool.setuptools_scm]
  write_to = "src/parcels/_version_setup.py"
  local_scheme = "no-local-version"
  
  [tool.pytest.ini_options]
  addopts = ["--strict-config", "--strict-markers"]
  xfail_strict = true
  # testpaths = ["tests", "docs/examples"] # TODO v4: Re-enable once examples are back/fixed
  testpaths = ["tests"]
  python_files = ["test_*.py", "example_*.py", "*tutorial*"]
  minversion = "7"
  markers = [ # can be skipped by doing `pytest -m "not slow"` etc.
    "flaky: flaky tests",
    "slow: slow tests",
    "v4alpha: failing tests that should work for v4alpha",
    "v4future: failing tests that should work for a future release of v4",
    "v4remove: failing tests that should probably be removed later",
  ]
  
  filterwarnings = [
    "error:.*removed in a future release of Parcels.*:DeprecationWarning", # Have Parcels DeprecationWarnings fail CI (prevents deprecated items being used in internal code)
  ]
  
  [tool.ruff]
  line-length = 120
  
  [tool.ruff.lint]
  select = [
    "D", # pydocstyle
    "E", # Error
    "F", # pyflakes
    "I", # isort
    "B", # Bugbear
    "UP", # pyupgrade
    "LOG", # logging
    "ICN", # import conventions
    "G", # logging-format
    "RUF", # ruff
    "ISC001", # single-line-implicit-string-concatenation
    "TID", # flake8-tidy-imports
    "T100", # Checks for the presence of debugger calls and imports
  ]
  
  ignore = [
    # line too long (82 > 79 characters)
    "E501",
    # ‘from module import *’ used; unable to detect undefined names
    "F403",
    # Mutable class attributes should be annotated with `typing.ClassVar`
    "RUF012",
    # Consider `(slice(2), *block)` instead of concatenation
    "RUF005",
    # Prefer `next(iter(variable.items()))` over single element slice
    "RUF015",
    # Use `X | Y` in `isinstance` (see https://github.com/home-assistant/core/issues/123850)
    "UP038",
    "RUF046", # Value being cast to `int` is already an integer
  
    # TODO: ignore for now (requires more work). Remove ignore once fixed
    # Missing docstring in public module
    "D100",
    # Missing docstring in public class
    "D101",
    # Missing docstring in public method
    "D102",
    # Missing docstring in public function
    "D103",
    # Missing docstring in public package
    "D104",
    # Missing docstring in magic method
    "D105",
    # Missing docstring in __init__
    "D400",
    # First line should be in imperative mood (requires writing of summaries)
    "D401",
    # First word of the docstring should not be `This`
    "D404",
    # 1 blank line required between summary line and description (requires writing of summaries)
    "D205",
    "F811",
  ]
  
  [tool.ruff.lint.pydocstyle]
  convention = "numpy"
  
  [tool.ruff.lint.isort]
  known-first-party = ["parcels"]
  
  [tool.mypy]
  files = [
    "parcels/_typing.py",
    "parcels/tools/*.py",
    "parcels/grid.py",
    "parcels/field.py",
    "parcels/fieldset.py",
  ]
  
  [[tool.mypy.overrides]]
  module = [
    "parcels._version_setup",
    "mpi4py",
    "scipy.spatial",
    "sklearn.cluster",
    "zarr",
    "cftime",
    "pykdtree.kdtree",
    "netCDF4",
    "pooch",
  ]
  ignore_missing_imports = true
  