|
1 | 1 | #!/usr/bin/env python
|
2 |
| -import sys |
| 2 | +from setuptools import setup |
3 | 3 |
|
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