diff --git a/pyproject.toml b/pyproject.toml index 8e63cb033a0..b075382985e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,52 @@ +[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.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"] + +[tool.setuptools] +packages = ["xarray"] + +[project.entry-points."xarray.chunkmanagers"] +dask = "xarray.core.daskmanager:DaskManager" + +[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" + [build-system] build-backend = "setuptools.build_meta" requires = [ @@ -97,3 +146,18 @@ select = [ [tool.ruff.isort] known-first-party = ["xarray"] + +[tool.pytest.ini-options] +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" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 85ac8e259e5..00000000000 --- a/setup.cfg +++ /dev/null @@ -1,154 +0,0 @@ -[metadata] -name = xarray -author = xarray Developers -author_email = xarray@googlegroups.com -license = Apache-2.0 -description = N-D labeled arrays and datasets in Python -long_description_content_type=text/x-rst -long_description = - **xarray** (formerly **xray**) is an open source project and Python package - that makes working with labelled multi-dimensional arrays simple, - efficient, and fun! - - xarray introduces labels in the form of dimensions, coordinates and - attributes on top of raw NumPy_-like arrays, which allows for a more - intuitive, more concise, and less error-prone developer experience. - The package includes a large and growing library of domain-agnostic functions - for advanced analytics and visualization with these data structures. - - xarray was inspired by and borrows heavily from pandas_, the popular data - analysis package focused on labelled tabular data. - It is particularly tailored to working with netCDF_ files, which were the - source of xarray's data model, and integrates tightly with dask_ for parallel - computing. - - .. _NumPy: https://www.numpy.org - .. _pandas: https://pandas.pydata.org - .. _dask: https://dask.org - .. _netCDF: https://www.unidata.ucar.edu/software/netcdf - - Why xarray? - ----------- - Multi-dimensional (a.k.a. N-dimensional, ND) arrays (sometimes called - "tensors") are an essential part of computational science. - They are encountered in a wide range of fields, including physics, astronomy, - geoscience, bioinformatics, engineering, finance, and deep learning. - In Python, NumPy_ provides the fundamental data structure and API for - working with raw ND arrays. - However, real-world datasets are usually more than just raw numbers; - they have labels which encode information about how the array values map - to locations in space, time, etc. - - xarray doesn't just keep track of labels on arrays -- it uses them to provide a - powerful and concise interface. For example: - - - Apply operations over dimensions by name: ``x.sum('time')``. - - Select values by label instead of integer location: ``x.loc['2014-01-01']`` or ``x.sel(time='2014-01-01')``. - - Mathematical operations (e.g., ``x - y``) vectorize across multiple dimensions (array broadcasting) based on dimension names, not shape. - - Flexible split-apply-combine operations with groupby: ``x.groupby('time.dayofyear').mean()``. - - Database like alignment based on coordinate labels that smoothly handles missing values: ``x, y = xr.align(x, y, join='outer')``. - - Keep track of arbitrary metadata in the form of a Python dictionary: ``x.attrs``. - - Learn more - ---------- - - Documentation: ``_ - - Issue tracker: ``_ - - Source code: ``_ - - SciPy2015 talk: ``_ - -url = https://github.com/pydata/xarray -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 - -[options] -packages = find: -zip_safe = False # https://mypy.readthedocs.io/en/latest/installed_packages.html -include_package_data = True -python_requires = >=3.9 -install_requires = - numpy >= 1.21 # recommended to use >= 1.22 for full quantile method support - pandas >= 1.4 - packaging >= 21.3 - -[options.extras_require] -io = - netCDF4 - h5netcdf - scipy - pydap; python_version<"3.10" # see https://github.com/pydap/pydap/issues/268 - zarr - fsspec - cftime - pooch - ## Scitools packages & dependencies (e.g: cartopy, cf-units) can be hard to install - # scitools-iris - -accel = - scipy - bottleneck - numbagg - flox - -parallel = - dask[complete] - -viz = - matplotlib - seaborn - nc-time-axis - ## Cartopy requires 3rd party libraries and only provides source distributions - ## See: https://github.com/SciTools/cartopy/issues/805 - # cartopy - -complete = - %(io)s - %(accel)s - %(parallel)s - %(viz)s - -docs = - %(complete)s - sphinx-autosummary-accessors - sphinx_rtd_theme - ipython - ipykernel - jupyter-client - nbsphinx - scanpydoc - -[options.package_data] -xarray = - py.typed - tests/data/* - static/css/* - static/html/* - -[options.entry_points] -xarray.chunkmanagers = - dask = xarray.core.daskmanager:DaskManager - -[tool:pytest] -python_files = test_*.py -testpaths = xarray/tests properties -# Fixed upstream in https://github.com/pydata/bottleneck/pull/199 -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 - -[aliases] -test = pytest - -[pytest-watch] -nobeep = True diff --git a/xarray/__init__.py b/xarray/__init__.py index 830bc254a71..b63b0d81470 100644 --- a/xarray/__init__.py +++ b/xarray/__init__.py @@ -52,7 +52,7 @@ except Exception: # Local copy or not installed with setuptools. # Disable minimum version checks on downstream libraries. - __version__ = "999" + __version__ = "9999" # A hardcoded __all__ variable is necessary to appease # `mypy --strict` running in projects that import xarray.