Skip to content

Commit 5627277

Browse files
committed
Merge branch 'main' into groupby-aggs-using-numpy-groupies
* main: (26 commits) Remove xarray.ufuncs (pydata#6491) Convert readme to markdown (pydata#6495) HTML repr fix for Furo Sphinx theme (pydata#6501) Restrict stalebot on projects & milestones (pydata#6498) Ensure datetime-like variables are left unmodified by `decode_cf_variable` (pydata#6489) Add link to xarray binder to readme (pydata#6494) Add details section to issue template (pydata#6486) [skip-ci] Redirect raster analysis questions to rioxarray (pydata#6455) Accessing the Exception message via e.args[0] (pydata#6451) Add support in the "zarr" backend for reading NCZarr data (pydata#6420) Propagate MultiIndex variables in broadcast (pydata#6477) Fix whatnsew build error (pydata#6480) allow other and drop arguments in where (gh#6466) (pydata#6467) [pre-commit.ci] pre-commit autoupdate (pydata#6472) Fix `xr.where(..., keep_attrs=True)` bug (pydata#6461) Fix `Number` import (pydata#6474) Support **kwargs form in `.chunk()` (pydata#6471) Bump actions/upload-artifact from 2 to 3 (pydata#6468) Bump codecov/codecov-action from 2.1.0 to 3.0.0 (pydata#6470) Bump actions/download-artifact from 2 to 3 (pydata#6469) ...
2 parents d613779 + 33cdabd commit 5627277

43 files changed

Lines changed: 714 additions & 698 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bugreport.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ body:
5454
attributes:
5555
label: Environment
5656
description: |
57-
Paste the output of `xr.show_versions()` here
57+
Paste the output of `xr.show_versions()` between the `<details>` tags, leaving an empty line following the opening tag.
58+
value: |
59+
<details>
60+
61+
62+
63+
</details>
5864
validations:
5965
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ contact_links:
66
Ask questions and discuss with other community members here.
77
If you have a question like "How do I concatenate a list of datasets?" then
88
please include a self-contained reproducible example if possible.
9+
- name: Raster analysis usage question
10+
url: https://github.com/corteva/rioxarray/discussions
11+
about: |
12+
If you are using the rioxarray extension (engine='rasterio'), or have questions about
13+
raster analysis such as geospatial formats, coordinate reprojection, etc.,
14+
please use the rioxarray discussion forum.

.github/stale.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Configuration for probot-stale - https://github.com/probot/stale
22

33
# Number of days of inactivity before an Issue or Pull Request becomes stale
4-
daysUntilStale: 700 # start with a large number and reduce shortly
4+
daysUntilStale: 600 # start with a large number and reduce shortly
55

66
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
77
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
@@ -14,10 +14,10 @@ exemptLabels:
1414
- "[Status] Maybe Later"
1515

1616
# Set to true to ignore issues in a project (defaults to false)
17-
exemptProjects: false
17+
exemptProjects: true
1818

1919
# Set to true to ignore issues in a milestone (defaults to false)
20-
exemptMilestones: false
20+
exemptMilestones: true
2121

2222
# Set to true to ignore issues with an assignee (defaults to false)
2323
exemptAssignees: true
@@ -31,6 +31,9 @@ markComment: |
3131
3232
If this issue remains relevant, please comment here or remove the `stale` label; otherwise it will be marked as closed automatically
3333
34+
closeComment: |
35+
The stalebot didn't hear anything for a while, so it closed this. Please reopen if this is still an issue.
36+
3437
# Comment to post when removing the stale label.
3538
# unmarkComment: >
3639
# Your comment here.
@@ -40,8 +43,7 @@ markComment: |
4043
# Your comment here.
4144

4245
# Limit the number of actions per hour, from 1-30. Default is 30
43-
limitPerRun: 1 # start with a small number
44-
46+
limitPerRun: 2 # start with a small number
4547

4648
# Limit to only `issues` or `pulls`
4749
# only: issues

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
cp benchmarks/README_CI.md benchmarks.log .asv/results/
6868
working-directory: ${{ env.ASV_DIR }}
6969

70-
- uses: actions/upload-artifact@v2
70+
- uses: actions/upload-artifact@v3
7171
if: always()
7272
with:
7373
name: asv-benchmark-results-${{ runner.os }}

.github/workflows/ci-additional.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
$PYTEST_EXTRA_FLAGS
110110
111111
- name: Upload code coverage to Codecov
112-
uses: codecov/codecov-action@v2.1.0
112+
uses: codecov/codecov-action@v3.0.0
113113
with:
114114
file: ./coverage.xml
115115
flags: unittests,${{ matrix.env }}

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ jobs:
9898

9999
- name: Upload test results
100100
if: always()
101-
uses: actions/upload-artifact@v2
101+
uses: actions/upload-artifact@v3
102102
with:
103103
name: Test results for ${{ runner.os }}-${{ matrix.python-version }}
104104
path: pytest.xml
105105

106106
- name: Upload code coverage to Codecov
107-
uses: codecov/codecov-action@v2.1.0
107+
uses: codecov/codecov-action@v3.0.0
108108
with:
109109
file: ./coverage.xml
110110
flags: unittests
@@ -118,7 +118,7 @@ jobs:
118118
if: github.repository == 'pydata/xarray'
119119
steps:
120120
- name: Upload
121-
uses: actions/upload-artifact@v2
121+
uses: actions/upload-artifact@v3
122122
with:
123123
name: Event File
124124
path: ${{ github.event_path }}

.github/workflows/pypi-release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
else
4242
echo "✅ Looks good"
4343
fi
44-
- uses: actions/upload-artifact@v2
44+
- uses: actions/upload-artifact@v3
4545
with:
4646
name: releases
4747
path: dist
@@ -54,7 +54,7 @@ jobs:
5454
name: Install Python
5555
with:
5656
python-version: 3.8
57-
- uses: actions/download-artifact@v2
57+
- uses: actions/download-artifact@v3
5858
with:
5959
name: releases
6060
path: dist
@@ -85,7 +85,7 @@ jobs:
8585
if: github.event_name == 'release'
8686
runs-on: ubuntu-latest
8787
steps:
88-
- uses: actions/download-artifact@v2
88+
- uses: actions/download-artifact@v3
8989
with:
9090
name: releases
9191
path: dist

.github/workflows/upstream-dev-ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
&& steps.status.outcome == 'failure'
9393
&& github.event_name == 'schedule'
9494
&& github.repository == 'pydata/xarray'
95-
uses: actions/upload-artifact@v2
95+
uses: actions/upload-artifact@v3
9696
with:
9797
name: output-${{ matrix.python-version }}-log
9898
path: output-${{ matrix.python-version }}-log
@@ -114,7 +114,7 @@ jobs:
114114
- uses: actions/setup-python@v3
115115
with:
116116
python-version: "3.x"
117-
- uses: actions/download-artifact@v2
117+
- uses: actions/download-artifact@v3
118118
with:
119119
path: /tmp/workspace/logs
120120
- name: Move all log files into a single directory

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# https://pre-commit.com/
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.1.0
4+
rev: v4.2.0
55
hooks:
66
- id: trailing-whitespace
77
- id: end-of-file-fixer
@@ -19,7 +19,7 @@ repos:
1919
hooks:
2020
- id: isort
2121
- repo: https://github.com/asottile/pyupgrade
22-
rev: v2.31.1
22+
rev: v2.32.0
2323
hooks:
2424
- id: pyupgrade
2525
args:

README.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# xarray: N-D labeled arrays and datasets
2+
3+
[![image](https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=main)](https://github.com/pydata/xarray/actions?query=workflow%3ACI)
4+
[![image](https://codecov.io/gh/pydata/xarray/branch/main/graph/badge.svg)](https://codecov.io/gh/pydata/xarray)
5+
[![image](https://readthedocs.org/projects/xray/badge/?version=latest)](https://docs.xarray.dev/)
6+
[![image](https://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat)](https://pandas.pydata.org/speed/xarray/)
7+
[![image](https://img.shields.io/pypi/v/xarray.svg)](https://pypi.python.org/pypi/xarray/)
8+
[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
9+
[![image](https://zenodo.org/badge/DOI/10.5281/zenodo.598201.svg)](https://doi.org/10.5281/zenodo.598201)
10+
[![image](https://img.shields.io/twitter/follow/xarray_dev?style=social)](https://twitter.com/xarray_dev)
11+
12+
**xarray** (formerly **xray**) is an open source project and Python
13+
package that makes working with labelled multi-dimensional arrays
14+
simple, efficient, and fun!
15+
16+
Xarray introduces labels in the form of dimensions, coordinates and
17+
attributes on top of raw [NumPy](https://www.numpy.org)-like arrays,
18+
which allows for a more intuitive, more concise, and less error-prone
19+
developer experience. The package includes a large and growing library
20+
of domain-agnostic functions for advanced analytics and visualization
21+
with these data structures.
22+
23+
Xarray was inspired by and borrows heavily from
24+
[pandas](https://pandas.pydata.org), the popular data analysis package
25+
focused on labelled tabular data. It is particularly tailored to working
26+
with [netCDF](https://www.unidata.ucar.edu/software/netcdf) files, which
27+
were the source of xarray\'s data model, and integrates tightly with
28+
[dask](https://dask.org) for parallel computing.
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. They are
34+
encountered in a wide range of fields, including physics, astronomy,
35+
geoscience, bioinformatics, engineering, finance, and deep learning. In
36+
Python, [NumPy](https://www.numpy.org) provides the fundamental data
37+
structure and API for working with raw ND arrays. However, real-world
38+
datasets are usually more than just raw numbers; they have labels which
39+
encode information about how the array values map to locations in space,
40+
time, etc.
41+
42+
Xarray doesn\'t just keep track of labels on arrays \-- it uses them to
43+
provide a 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+
## Documentation
58+
59+
Learn more about xarray in its official documentation at
60+
<https://docs.xarray.dev/>.
61+
62+
Try out an [interactive Jupyter
63+
notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/weather-data.ipynb).
64+
65+
## Contributing
66+
67+
You can find information about contributing to xarray at our
68+
[Contributing
69+
page](https://docs.xarray.dev/en/latest/contributing.html#).
70+
71+
## Get in touch
72+
73+
- Ask usage questions ("How do I?") on
74+
[StackOverflow](https://stackoverflow.com/questions/tagged/python-xarray).
75+
- Report bugs, suggest features or view the source code [on
76+
GitHub](https://github.com/pydata/xarray).
77+
- For less well defined questions or ideas, or to announce other
78+
projects of interest to xarray users, use the [mailing
79+
list](https://groups.google.com/forum/#!forum/xarray).
80+
81+
## NumFOCUS
82+
83+
[![image](https://numfocus.org/wp-content/uploads/2017/07/NumFocus_LRG.png)](https://numfocus.org/)
84+
85+
Xarray is a fiscally sponsored project of
86+
[NumFOCUS](https://numfocus.org), a nonprofit dedicated to supporting
87+
the open source scientific computing community. If you like Xarray and
88+
want to support our mission, please consider making a
89+
[donation](https://numfocus.salsalabs.org/donate-to-xarray/) to support
90+
our efforts.
91+
92+
## History
93+
94+
Xarray is an evolution of an internal tool developed at [The Climate
95+
Corporation](http://climate.com/). It was originally written by Climate
96+
Corp researchers Stephan Hoyer, Alex Kleeman and Eugene Brevdo and was
97+
released as open source in May 2014. The project was renamed from
98+
"xray" in January 2016. Xarray became a fiscally sponsored project of
99+
[NumFOCUS](https://numfocus.org) in August 2018.
100+
101+
## License
102+
103+
Copyright 2014-2019, xarray Developers
104+
105+
Licensed under the Apache License, Version 2.0 (the "License"); you
106+
may not use this file except in compliance with the License. You may
107+
obtain a copy of the License at
108+
109+
<https://www.apache.org/licenses/LICENSE-2.0>
110+
111+
Unless required by applicable law or agreed to in writing, software
112+
distributed under the License is distributed on an "AS IS" BASIS,
113+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
114+
See the License for the specific language governing permissions and
115+
limitations under the License.
116+
117+
Xarray bundles portions of pandas, NumPy and Seaborn, all of which are
118+
available under a "3-clause BSD" license:
119+
120+
- pandas: setup.py, xarray/util/print_versions.py
121+
- NumPy: xarray/core/npcompat.py
122+
- Seaborn: _determine_cmap_params in xarray/core/plot/utils.py
123+
124+
Xarray also bundles portions of CPython, which is available under the
125+
"Python Software Foundation License" in xarray/core/pycompat.py.
126+
127+
Xarray uses icons from the icomoon package (free version), which is
128+
available under the "CC BY 4.0" license.
129+
130+
The full text of these licenses are included in the licenses directory.

0 commit comments

Comments
 (0)