Revision ba7f2d5dc8a6f77c91a3bb9e54b5ca39abcdb939 authored by Kai Mühlbauer on 26 September 2023, 08:12:44 UTC, committed by GitHub on 26 September 2023, 08:12:44 UTC
1 parent da647b0
Raw File
pyproject.toml
[project]
authors = [
  {name = "xarray Developers", email = "xarray@googlegroups.com"},
]
classifiers = [
  "Development Status :: 5 - Production/Stable",
  "License :: OSI Approved :: Apache Software License",
  "Operating System :: OS Independent",
  "Intended Audience :: Science/Research",
  "Programming Language :: Python",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3.9",
  "Programming Language :: Python :: 3.10",
  "Programming Language :: Python :: 3.11",
  "Topic :: Scientific/Engineering",
]
description = "N-D labeled arrays and datasets in Python"
dynamic = ["version"]
license = {text = "Apache-2.0"}
name = "xarray"
readme = "README.md"
requires-python = ">=3.9"

dependencies = [
  "numpy>=1.21",
  "packaging>=21.3",
  "pandas>=1.4",
]

[project.urls]
Documentation = "https://docs.xarray.dev"
SciPy2015-talk = "https://www.youtube.com/watch?v=X0pAhJgySxk"
homepage = "https://xarray.dev/"
issue-tracker = "https://github.com/pydata/xarray/issues"
source-code = "https://github.com/pydata/xarray"

[project.entry-points."xarray.chunkmanagers"]
dask = "xarray.core.daskmanager:DaskManager"

[project.optional-dependencies]
accel = ["scipy", "bottleneck", "numbagg", "flox"]
complete = ["xarray[accel,io,parallel,viz]"]
io = ["netCDF4", "h5netcdf", "scipy", 'pydap; python_version<"3.10"', "zarr", "fsspec", "cftime", "pooch"]
parallel = ["dask[complete]"]
viz = ["matplotlib", "seaborn", "nc-time-axis"]

[build-system]
build-backend = "setuptools.build_meta"
requires = [
  "setuptools>=42",
  "setuptools-scm>=7",
]

[tool.setuptools]
packages = ["xarray"]

[tool.setuptools_scm]
fallback_version = "9999"

[tool.coverage.run]
omit = [
  "*/xarray/tests/*",
  "*/xarray/core/dask_array_compat.py",
  "*/xarray/core/npcompat.py",
  "*/xarray/core/pdcompat.py",
  "*/xarray/core/pycompat.py",
  "*/xarray/core/types.py",
]
source = ["xarray"]

[tool.coverage.report]
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING"]

[tool.mypy]
enable_error_code = "redundant-self"
exclude = 'xarray/util/generate_.*\.py'
files = "xarray"
show_error_codes = true
show_error_context = true
warn_redundant_casts = true
warn_unused_ignores = true

# Much of the numerical computing stack doesn't have type annotations yet.
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
  "affine.*",
  "bottleneck.*",
  "cartopy.*",
  "cdms2.*",
  "cf_units.*",
  "cfgrib.*",
  "cftime.*",
  "cubed.*",
  "cupy.*",
  "fsspec.*",
  "h5netcdf.*",
  "h5py.*",
  "iris.*",
  "matplotlib.*",
  "mpl_toolkits.*",
  "Nio.*",
  "nc_time_axis.*",
  "numbagg.*",
  "netCDF4.*",
  "netcdftime.*",
  "pandas.*",
  "pooch.*",
  "PseudoNetCDF.*",
  "pydap.*",
  "pytest.*",
  "scipy.*",
  "seaborn.*",
  "setuptools",
  "sparse.*",
  "toolz.*",
  "zarr.*",
  "numpy.exceptions.*", # remove once support for `numpy<2.0` has been dropped
]

# Gradually we want to add more modules to this list, ratcheting up our total
# coverage. Once a module is here, functions require annotations in order to
# pass mypy. It would be especially useful to have tests here, because without
# annotating test functions, we don't have a great way of testing our type
# annotations — even with just `-> None` is sufficient for mypy to check them.
[[tool.mypy.overrides]]
disallow_untyped_defs = true
module = ["xarray.core.rolling_exp"]

[tool.ruff]
builtins = ["ellipsis"]
exclude = [
  ".eggs",
  "doc",
  "_typed_ops.pyi",
]
target-version = "py39"
# E402: module level import not at top of file
# E501: line too long - let black worry about that
# E731: do not assign a lambda expression, use a def
ignore = [
  "E402",
  "E501",
  "E731",
]
select = [
  "F", # Pyflakes
  "E", # Pycodestyle
  "W",
  "I", # isort
  "UP", # Pyupgrade
]

[tool.ruff.isort]
known-first-party = ["xarray"]

[tool.pytest.ini_options]
addopts = '--strict-markers'
filterwarnings = [
  "ignore:Using a non-tuple sequence for multidimensional indexing is deprecated:FutureWarning",
]
markers = [
  "flaky: flaky tests",
  "network: tests requiring a network connection",
  "slow: slow tests",
]
python_files = "test_*.py"
testpaths = ["xarray/tests", "properties"]

[tool.aliases]
test = "pytest"
back to top