Skip to content
forked from pydata/xarray

Commit b03f6ab

Browse files
committed
Merge branch 'master' of github.com:pydata/xarray into min-deps-15
* 'master' of github.com:pydata/xarray: setuptools-scm and one-liner setup.py (pydata#3714)
2 parents d0d9c14 + 27a3929 commit b03f6ab

File tree

11 files changed

+108
-2573
lines changed

11 files changed

+108
-2573
lines changed

.coveragerc

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ omit =
55
xarray/core/npcompat.py
66
xarray/core/pdcompat.py
77
xarray/core/pycompat.py
8-
xarray/_version.py

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# reduce the number of merge conflicts
22
doc/whats-new.rst merge=union
3-
xarray/_version.py export-subst

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ doc/savefig
1515
# Packages
1616
*.egg
1717
*.egg-info
18+
.eggs
1819
dist
1920
build
2021
eggs
@@ -65,7 +66,6 @@ dask-worker-space/
6566
# xarray specific
6667
doc/_build
6768
doc/generated
68-
xarray/version.py
6969
xarray/tests/data/*.grib.*.idx
7070

7171
# Sync tools

MANIFEST.in

-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ recursive-include doc *
44
prune doc/_build
55
prune doc/generated
66
global-exclude .DS_Store
7-
include versioneer.py
8-
include xarray/_version.py
97
recursive-include xarray/static *

ci/requirements/doc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies:
1717
- numba
1818
- numpy
1919
- numpydoc
20-
- pandas<0.25 # Hack around https://github.com/pydata/xarray/issues/3369
20+
- pandas
2121
- rasterio
2222
- seaborn
2323
- sphinx

doc/whats-new.rst

+3
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ Internal Changes
142142
- Removed internal method ``Dataset._from_vars_and_coord_names``,
143143
which was dominated by ``Dataset._construct_direct``. (:pull:`3565`)
144144
By `Maximilian Roos <https://github.com/max-sixty>`_
145+
- Replaced versioneer with setuptools-scm. Moved contents of setup.py to setup.cfg.
146+
Removed pytest-runner from setup.py, as per deprecation notice on the pytest-runner
147+
project. (:pull:`3714`) by `Guido Imperiale <https://github.com/crusaderky>`_
145148

146149

147150
v0.14.1 (19 Nov 2019)

setup.cfg

+95-18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,95 @@
1+
[metadata]
2+
name = xarray
3+
author = xarray Developers
4+
author_email = [email protected]
5+
license = Apache
6+
description = N-D labeled arrays and datasets in Python
7+
long_description_content_type=x-rst
8+
long_description =
9+
**xarray** (formerly **xray**) is an open source project and Python package
10+
that makes working with labelled multi-dimensional arrays simple,
11+
efficient, and fun!
12+
13+
xarray introduces labels in the form of dimensions, coordinates and
14+
attributes on top of raw NumPy_-like arrays, which allows for a more
15+
intuitive, more concise, and less error-prone developer experience.
16+
The package includes a large and growing library of domain-agnostic functions
17+
for advanced analytics and visualization with these data structures.
18+
19+
xarray was inspired by and borrows heavily from pandas_, the popular data
20+
analysis package focused on labelled tabular data.
21+
It is particularly tailored to working with netCDF_ files, which were the
22+
source of xarray's data model, and integrates tightly with dask_ for parallel
23+
computing.
24+
25+
.. _NumPy: https://www.numpy.org
26+
.. _pandas: https://pandas.pydata.org
27+
.. _dask: https://dask.org
28+
.. _netCDF: https://www.unidata.ucar.edu/software/netcdf
29+
30+
Why xarray?
31+
-----------
32+
Multi-dimensional (a.k.a. N-dimensional, ND) arrays (sometimes called
33+
"tensors") are an essential part of computational science.
34+
They are encountered in a wide range of fields, including physics, astronomy,
35+
geoscience, bioinformatics, engineering, finance, and deep learning.
36+
In Python, NumPy_ provides the fundamental data structure and API for
37+
working with raw ND arrays.
38+
However, real-world datasets are usually more than just raw numbers;
39+
they have labels which encode information about how the array values map
40+
to locations in space, time, etc.
41+
42+
xarray doesn't just keep track of labels on arrays -- it uses them to provide a
43+
powerful and concise interface. For example:
44+
45+
- Apply operations over dimensions by name: ``x.sum('time')``.
46+
- Select values by label instead of integer location:
47+
``x.loc['2014-01-01']`` or ``x.sel(time='2014-01-01')``.
48+
- Mathematical operations (e.g., ``x - y``) vectorize across multiple
49+
dimensions (array broadcasting) based on dimension names, not shape.
50+
- Flexible split-apply-combine operations with groupby:
51+
``x.groupby('time.dayofyear').mean()``.
52+
- Database like alignment based on coordinate labels that smoothly
53+
handles missing values: ``x, y = xr.align(x, y, join='outer')``.
54+
- Keep track of arbitrary metadata in the form of a Python dictionary:
55+
``x.attrs``.
56+
57+
Learn more
58+
----------
59+
- Documentation: `<http://xarray.pydata.org>`_
60+
- Issue tracker: `<http://github.com/pydata/xarray/issues>`_
61+
- Source code: `<http://github.com/pydata/xarray>`_
62+
- SciPy2015 talk: `<https://www.youtube.com/watch?v=X0pAhJgySxk>`_
63+
64+
url = https://github.com/pydata/xarray
65+
classifiers =
66+
Development Status :: 5 - Production/Stable
67+
License :: OSI Approved :: Apache Software License
68+
Operating System :: OS Independent
69+
Intended Audience :: Science/Research
70+
Programming Language :: Python
71+
Programming Language :: Python :: 3
72+
Programming Language :: Python :: 3.6
73+
Programming Language :: Python :: 3.7
74+
Topic :: Scientific/Engineering
75+
76+
[options]
77+
packages = xarray
78+
zip_safe = True
79+
include_package_data = True
80+
python_requires = >=3.6
81+
install_requires =
82+
numpy >= 1.14
83+
pandas >= 0.24
84+
setup_requires = setuptools_scm
85+
86+
[options.package_data]
87+
xarray =
88+
py.typed
89+
tests/data/*
90+
static/css/*
91+
static/html/*
92+
193
[tool:pytest]
294
python_files=test_*.py
395
testpaths=xarray/tests properties
@@ -23,6 +115,7 @@ ignore=
23115
# line break before binary operator
24116
W503
25117
exclude=
118+
.eggs
26119
doc
27120

28121
[isort]
@@ -87,35 +180,19 @@ ignore_missing_imports = True
87180
ignore_missing_imports = True
88181
[mypy-seaborn.*]
89182
ignore_missing_imports = True
183+
[mypy-setuptools]
184+
ignore_missing_imports = True
90185
[mypy-sparse.*]
91186
ignore_missing_imports = True
92187
[mypy-toolz.*]
93188
ignore_missing_imports = True
94189
[mypy-zarr.*]
95190
ignore_missing_imports = True
96-
97-
# setuptools is not typed
98-
[mypy-setup]
99-
ignore_errors = True
100-
# versioneer code
101-
[mypy-versioneer.*]
102-
ignore_errors = True
103-
# written by versioneer
104-
[mypy-xarray._version]
105-
ignore_errors = True
106191
# version spanning code is hard to type annotate (and most of this module will
107192
# be going away soon anyways)
108193
[mypy-xarray.core.pycompat]
109194
ignore_errors = True
110195

111-
[versioneer]
112-
VCS = git
113-
style = pep440
114-
versionfile_source = xarray/_version.py
115-
versionfile_build = xarray/_version.py
116-
tag_prefix = v
117-
parentdir_prefix = xarray-
118-
119196
[aliases]
120197
test = pytest
121198

setup.py

+2-108
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,4 @@
11
#!/usr/bin/env python
2-
import sys
2+
from setuptools import setup
33

4-
import versioneer
5-
from setuptools import find_packages, setup
6-
7-
DISTNAME = "xarray"
8-
LICENSE = "Apache"
9-
AUTHOR = "xarray Developers"
10-
AUTHOR_EMAIL = "[email protected]"
11-
URL = "https://github.com/pydata/xarray"
12-
CLASSIFIERS = [
13-
"Development Status :: 5 - Production/Stable",
14-
"License :: OSI Approved :: Apache Software License",
15-
"Operating System :: OS Independent",
16-
"Intended Audience :: Science/Research",
17-
"Programming Language :: Python",
18-
"Programming Language :: Python :: 3",
19-
"Programming Language :: Python :: 3.6",
20-
"Programming Language :: Python :: 3.7",
21-
"Topic :: Scientific/Engineering",
22-
]
23-
24-
PYTHON_REQUIRES = ">=3.6"
25-
INSTALL_REQUIRES = ["numpy >= 1.15", "pandas >= 0.25"]
26-
needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv)
27-
SETUP_REQUIRES = ["pytest-runner >= 4.2"] if needs_pytest else []
28-
TESTS_REQUIRE = ["pytest >= 2.7.1"]
29-
30-
DESCRIPTION = "N-D labeled arrays and datasets in Python"
31-
LONG_DESCRIPTION = """
32-
**xarray** (formerly **xray**) is an open source project and Python package
33-
that makes working with labelled multi-dimensional arrays simple,
34-
efficient, and fun!
35-
36-
Xarray introduces labels in the form of dimensions, coordinates and
37-
attributes on top of raw NumPy_-like arrays, which allows for a more
38-
intuitive, more concise, and less error-prone developer experience.
39-
The package includes a large and growing library of domain-agnostic functions
40-
for advanced analytics and visualization with these data structures.
41-
42-
Xarray was inspired by and borrows heavily from pandas_, the popular data
43-
analysis package focused on labelled tabular data.
44-
It is particularly tailored to working with netCDF_ files, which were the
45-
source of xarray's data model, and integrates tightly with dask_ for parallel
46-
computing.
47-
48-
.. _NumPy: https://www.numpy.org
49-
.. _pandas: https://pandas.pydata.org
50-
.. _dask: https://dask.org
51-
.. _netCDF: https://www.unidata.ucar.edu/software/netcdf
52-
53-
Why xarray?
54-
-----------
55-
56-
Multi-dimensional (a.k.a. N-dimensional, ND) arrays (sometimes called
57-
"tensors") are an essential part of computational science.
58-
They are encountered in a wide range of fields, including physics, astronomy,
59-
geoscience, bioinformatics, engineering, finance, and deep learning.
60-
In Python, NumPy_ provides the fundamental data structure and API for
61-
working with raw ND arrays.
62-
However, real-world datasets are usually more than just raw numbers;
63-
they have labels which encode information about how the array values map
64-
to locations in space, time, etc.
65-
66-
Xarray doesn't just keep track of labels on arrays -- it uses them to provide a
67-
powerful and concise interface. For example:
68-
69-
- Apply operations over dimensions by name: ``x.sum('time')``.
70-
- Select values by label instead of integer location:
71-
``x.loc['2014-01-01']`` or ``x.sel(time='2014-01-01')``.
72-
- Mathematical operations (e.g., ``x - y``) vectorize across multiple
73-
dimensions (array broadcasting) based on dimension names, not shape.
74-
- Flexible split-apply-combine operations with groupby:
75-
``x.groupby('time.dayofyear').mean()``.
76-
- Database like alignment based on coordinate labels that smoothly
77-
handles missing values: ``x, y = xr.align(x, y, join='outer')``.
78-
- Keep track of arbitrary metadata in the form of a Python dictionary:
79-
``x.attrs``.
80-
81-
Learn more
82-
----------
83-
84-
- Documentation: http://xarray.pydata.org
85-
- Issue tracker: http://github.com/pydata/xarray/issues
86-
- Source code: http://github.com/pydata/xarray
87-
- SciPy2015 talk: https://www.youtube.com/watch?v=X0pAhJgySxk
88-
"""
89-
90-
91-
setup(
92-
name=DISTNAME,
93-
version=versioneer.get_version(),
94-
cmdclass=versioneer.get_cmdclass(),
95-
license=LICENSE,
96-
author=AUTHOR,
97-
author_email=AUTHOR_EMAIL,
98-
classifiers=CLASSIFIERS,
99-
description=DESCRIPTION,
100-
long_description=LONG_DESCRIPTION,
101-
python_requires=PYTHON_REQUIRES,
102-
install_requires=INSTALL_REQUIRES,
103-
setup_requires=SETUP_REQUIRES,
104-
tests_require=TESTS_REQUIRE,
105-
url=URL,
106-
packages=find_packages(),
107-
package_data={
108-
"xarray": ["py.typed", "tests/data/*", "static/css/*", "static/html/*"]
109-
},
110-
)
4+
setup(use_scm_version=True)

0 commit comments

Comments
 (0)