content: [build-system]
  requires = ["hatchling>=1.26", "hatch-vcs"]
  build-backend = "hatchling.build"
  
  [project]
  name = "polartoolkit"
  authors = [
      {name = "Matt Tankersley", email = "matt.d.tankersley@gmail.com"},
  ]
  description = "Helpful tools for polar researchers"
  keywords = ["cryosphere", "antarctica", "arctic", "greenland", "maps", "plotting", "pygmt", "cross-section"]
  readme = "README.md"
  license = {file = "LICENSE"}
  requires-python = ">=3.11"
  classifiers = [
      "Development Status :: 3 - Alpha",
      "Intended Audience :: Science/Research",
      "Intended Audience :: Developers",
      "Intended Audience :: Education",
      "License :: OSI Approved :: MIT License",
      "Natural Language :: English",
      "Operating System :: OS Independent",
      "Topic :: Scientific/Engineering",
      "Programming Language :: Python",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3 :: Only",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Programming Language :: Python :: 3.13",
      "Typing :: Typed",
  ]
  dynamic = ["version"]
  dependencies = [
      "numpy>=1.25.0",
      "pandas>=2.0.0",
      "xarray[io]>=2023.4.0", # includes netCDF4, h5netcdf, pydap, scipy, zarr, fsspec, cftime, cfgrib, pooch
      "scipy>=1.11.0",
      "verde",
      "pooch",
      "rioxarray",
      "tqdm",
      "pygmt>=0.10.0", # need parameter "log" for colorbar
      "harmonica>=0.6.0", # need load_oasis_montaj_grid function
      "deprecation",
      "openpyxl", # needed for fetch.ghf to read an excel file into pandas
      "pyproj",
      "geopandas>=1.0", # for issue with pyogrio
      "pyogrio",
      "zarr>=3.0", # issue with fetch and consolidated metadata
      "python-dotenv",
      "requests",
      "earthaccess",
      "xrft",
  ]
  
  [dependency-groups]
  interactive = [
      "geoviews",
      "cartopy",
      "ipyleaflet",
      "ipython>=8.13.0",
  ]
  test = [
    {include-group = "interactive"},
    "pytest >=6",
    "pytest-cov >=3",
    "deepdiff",
  ]
  dev = [
      {include-group = "test"},
      "jupyterlab",
  ]
  docs = [
    "sphinx>=7.0",
    "myst_parser>=0.13",
    "sphinx_copybutton",
    "sphinx_autodoc_typehints",
    "sphinx-book-theme>=0.3",
    "nbsphinx",
    "ipykernel",
    "nbconvert",
    "sphinxcontrib-bibtex",
    "sphinx_design",
  ]
  
  all = [
    {include-group = "interactive"},
    {include-group = "test"},
    {include-group = "dev"},
    {include-group = "docs"},
  ]
  
  [project.urls]
  Homepage = "https://github.com/mdtanker/polartoolkit"
  Documentation = "https://polartoolkit.readthedocs.io/"
  "Bug Tracker" = "https://github.com/mdtanker/polartoolkit/issues"
  Discussions = "https://github.com/mdtanker/polartoolkit/discussions"
  Changelog = "https://polartoolkit.readthedocs.io/en/latest/changelog.html"
  
  
  [tool.hatch]
  version.source = "vcs"
  build.hooks.vcs.version-file = "src/polartoolkit/_version.py"
  
  [tool.hatch.envs.default]
  # duplicate for now since hatch doesn't support groups yet
  dependencies = []
  scripts.test = "pytest {args}"
  
  [tool.hatch.build.targets.sdist]
  only-include = ["src"]
  
  [tool.hatch.build.targets.wheel]
  packages = ["src/polartoolkit", "src/antarctic_plots"]
  
  [tool.check-wheel-contents]
  toplevel = ["polartoolkit", "antarctic_plots"]
  
  [tool.pytest.ini_options]
  minversion = "6.0"
  addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
  xfail_strict = true
  filterwarnings = [
    "error",
    "ignore:.*numpy.ndarray size changed, may indicate binary incompatibility. Expected 16 from C header, got 96 from PyObject.*:RuntimeWarning",
  ]
  log_cli_level = "INFO"
  testpaths = [
    "tests",
  ]
  markers = [
      "slow: marks tests as slow (deselect with '-m \"not slow\"')",
      "earthdata: marks tests as requiring earthdata login info (deselect with '-m \"not earthdata\"')",
      "issue: mark tests with current issues (deselect with '-m \"not issues\"')",
      "fetch: marks tests which fetch data",
  ]
  
  
  [tool.coverage]
  run.source = ["polartoolkit"]
  report.exclude_also = [
    '\.\.\.',
    'if typing.TYPE_CHECKING:',
  ]
  
  [tool.mypy]
  files = ["src", "tests"]
  python_version = "3.11"
  warn_unused_configs = true
  strict = true
  enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
  warn_unreachable = true
  disallow_untyped_defs = false
  disallow_incomplete_defs = false
  ignore_missing_imports = true
  disallow_untyped_decorators = false
  
  [[tool.mypy.overrides]]
  module = "polartoolkit.*"
  disallow_untyped_defs = true
  disallow_incomplete_defs = true
  
  
  [tool.ruff]
  
  [tool.ruff.lint]
  extend-select = [
    "ARG",      # flake8-unused-arguments
    "B",        # flake8-bugbear
    "C4",       # flake8-comprehensions
    "EM",       # flake8-errmsg
    "EXE",      # flake8-executable
    "G",        # flake8-logging-format
    "I",        # isort
    "ICN",      # flake8-import-conventions
    "NPY",      # NumPy specific rules
    "PD",       # pandas-vet
    "PGH",      # pygrep-hooks
    "PIE",      # flake8-pie
    "PL",       # pylint
    "PT",       # flake8-pytest-style
    "PTH",      # flake8-use-pathlib
    "RET",      # flake8-return
    "RUF",      # Ruff-specific
    "SIM",      # flake8-simplify
    "T20",      # flake8-print
    "UP",       # pyupgrade
    "YTT",      # flake8-2020
  ]
  ignore = [
    "PLR09",    # Too many <...>
    "PLR2004",  # Magic value used in comparison
    "PD901",    # Bad variable name warning
    "UP038",    # slows down code
  ]
  # Uncomment if using a _compat.typing backport
  # typing-modules = ["polartoolkit._compat.typing"]
  
  
  [tool.ruff.lint.per-file-ignores]
  "tests/**" = ["T20"]
  "noxfile.py" = ["T20"]
  "*.ipynb" = ["T201"]
  
  
  [tool.pylint]
  py-version = "3.11"
  ignore-paths = ["CHANGELOG.md", ".*\\_version.py"]
  reports.output-format = "colorized"
  similarities.ignore-imports = "yes"
  similarities.min-similarity-lines = 5
  messages_control.disable = [
    "design",
    "fixme",
    "line-too-long",
    "missing-module-docstring",
    "wrong-import-position",
    "cyclic-import",
  ]
  
  [tool.codespell]
  ignore-words-list = ["word_to_ignore"]
  