xee 0.0.2__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xee-0.0.4/.github/workflows/ci-build.yml +75 -0
- xee-0.0.4/.github/workflows/lint.yml +60 -0
- xee-0.0.4/.github/workflows/publish.yml +95 -0
- xee-0.0.4/.gitignore +11 -0
- {xee-0.0.2 → xee-0.0.4}/PKG-INFO +15 -8
- {xee-0.0.2 → xee-0.0.4}/README.md +7 -0
- xee-0.0.4/conftest.py +21 -0
- xee-0.0.4/docs/Makefile +20 -0
- xee-0.0.4/docs/README.md +34 -0
- xee-0.0.4/docs/api.md +25 -0
- xee-0.0.4/docs/code-of-conduct.md +93 -0
- xee-0.0.4/docs/conf.py +83 -0
- xee-0.0.4/docs/contributing.md +32 -0
- xee-0.0.4/docs/index.md +34 -0
- xee-0.0.4/docs/make.bat +35 -0
- xee-0.0.4/docs/requirements.txt +10 -0
- xee-0.0.4/docs/why-xee.md +84 -0
- xee-0.0.4/docs/xee-logo.png +0 -0
- xee-0.0.4/examples/README.md +27 -0
- xee-0.0.4/examples/ee_to_zarr.py +100 -0
- xee-0.0.4/examples/ee_to_zarr_reqs.txt +1 -0
- xee-0.0.4/pyproject.toml +63 -0
- {xee-0.0.2 → xee-0.0.4}/xee/ext.py +57 -48
- {xee-0.0.2 → xee-0.0.4}/xee/ext_integration_test.py +30 -10
- {xee-0.0.2 → xee-0.0.4}/xee/micro_benchmarks.py +3 -3
- {xee-0.0.2 → xee-0.0.4}/xee/types.py +9 -9
- {xee-0.0.2 → xee-0.0.4}/xee.egg-info/PKG-INFO +15 -8
- xee-0.0.4/xee.egg-info/SOURCES.txt +34 -0
- {xee-0.0.2 → xee-0.0.4}/xee.egg-info/requires.txt +1 -1
- xee-0.0.2/pyproject.toml +0 -5
- xee-0.0.2/setup.py +0 -78
- xee-0.0.2/xee.egg-info/SOURCES.txt +0 -16
- {xee-0.0.2 → xee-0.0.4}/LICENSE +0 -0
- {xee-0.0.2 → xee-0.0.4}/setup.cfg +0 -0
- {xee-0.0.2 → xee-0.0.4}/xee/__init__.py +0 -0
- {xee-0.0.2 → xee-0.0.4}/xee/ext_test.py +0 -0
- {xee-0.0.2 → xee-0.0.4}/xee.egg-info/dependency_links.txt +0 -0
- {xee-0.0.2 → xee-0.0.4}/xee.egg-info/entry_points.txt +0 -0
- {xee-0.0.2 → xee-0.0.4}/xee.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Copyright 2023 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# ==============================================================================
|
|
15
|
+
name: ci
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
# Triggers the workflow on push or pull request events but only for the main branch
|
|
19
|
+
push:
|
|
20
|
+
branches: [ main ]
|
|
21
|
+
pull_request:
|
|
22
|
+
branches: [ main ]
|
|
23
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
24
|
+
workflow_dispatch:
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build:
|
|
28
|
+
name: "python ${{ matrix.python-version }} tests"
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
python-version: [
|
|
34
|
+
"3.8",
|
|
35
|
+
"3.9",
|
|
36
|
+
"3.10",
|
|
37
|
+
"3.11",
|
|
38
|
+
"3.12",
|
|
39
|
+
]
|
|
40
|
+
permissions:
|
|
41
|
+
id-token: write # This is required for requesting the JWT.
|
|
42
|
+
steps:
|
|
43
|
+
- name: Cancel previous
|
|
44
|
+
uses: styfle/cancel-workflow-action@0.7.0
|
|
45
|
+
with:
|
|
46
|
+
access_token: ${{ github.token }}
|
|
47
|
+
if: ${{github.ref != 'refs/head/main'}}
|
|
48
|
+
- uses: actions/checkout@v2
|
|
49
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
50
|
+
uses: actions/setup-python@v2
|
|
51
|
+
with:
|
|
52
|
+
python-version: ${{ matrix.python-version }}
|
|
53
|
+
- name: Get pip cache dir
|
|
54
|
+
id: pip-cache
|
|
55
|
+
run: |
|
|
56
|
+
python -m pip install --upgrade pip wheel
|
|
57
|
+
echo "::set-output name=dir::$(pip cache dir)"
|
|
58
|
+
- name: pip cache
|
|
59
|
+
uses: actions/cache@v2
|
|
60
|
+
with:
|
|
61
|
+
path: ${{ steps.pip-cache.outputs.dir }}
|
|
62
|
+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
63
|
+
- name: Install Xee
|
|
64
|
+
run: |
|
|
65
|
+
pip install -e .[tests]
|
|
66
|
+
- uses: 'actions/checkout@v4'
|
|
67
|
+
- id: 'auth'
|
|
68
|
+
name: 'Authenticate to Google Cloud'
|
|
69
|
+
uses: 'google-github-actions/auth@v1'
|
|
70
|
+
with:
|
|
71
|
+
service_account: ${{ secrets.SERVICE_ACCOUNT }}
|
|
72
|
+
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
|
|
73
|
+
- name: Run unit tests
|
|
74
|
+
run: |
|
|
75
|
+
pytest xee
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Copyright 2023 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# ==============================================================================
|
|
15
|
+
name: lint
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
# Triggers the workflow on push or pull request events but only for the main branch
|
|
19
|
+
push:
|
|
20
|
+
branches: [ main ]
|
|
21
|
+
pull_request:
|
|
22
|
+
branches: [ main ]
|
|
23
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
24
|
+
workflow_dispatch:
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build:
|
|
28
|
+
name: "python ${{ matrix.python-version }} lint"
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
python-version: ["3.9", "3.10", "3.11"]
|
|
34
|
+
steps:
|
|
35
|
+
- name: Cancel previous
|
|
36
|
+
uses: styfle/cancel-workflow-action@0.7.0
|
|
37
|
+
with:
|
|
38
|
+
access_token: ${{ github.token }}
|
|
39
|
+
if: ${{github.ref != 'refs/head/main'}}
|
|
40
|
+
- uses: actions/checkout@v2
|
|
41
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
42
|
+
uses: actions/setup-python@v2
|
|
43
|
+
with:
|
|
44
|
+
python-version: ${{ matrix.python-version }}
|
|
45
|
+
- name: Get pip cache dir
|
|
46
|
+
id: pip-cache
|
|
47
|
+
run: |
|
|
48
|
+
python -m pip install --upgrade pip wheel
|
|
49
|
+
echo "::set-output name=dir::$(pip cache dir)"
|
|
50
|
+
- name: pip cache
|
|
51
|
+
uses: actions/cache@v2
|
|
52
|
+
with:
|
|
53
|
+
path: ${{ steps.pip-cache.outputs.dir }}
|
|
54
|
+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
55
|
+
- name: Install Xee
|
|
56
|
+
run: |
|
|
57
|
+
pip install -e .[tests]
|
|
58
|
+
- name: Lint with pyink
|
|
59
|
+
run: |
|
|
60
|
+
pyink --check .
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Copyright 2023 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
name: Publish to PyPi
|
|
15
|
+
|
|
16
|
+
on:
|
|
17
|
+
release:
|
|
18
|
+
types: [published]
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build-artifacts:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v2
|
|
25
|
+
- name: Set up Python
|
|
26
|
+
uses: actions/setup-python@v2.3.1
|
|
27
|
+
with:
|
|
28
|
+
python-version: 3.9
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: |
|
|
32
|
+
python -m pip install --upgrade pip
|
|
33
|
+
python -m pip install setuptools setuptools-scm wheel twine check-manifest
|
|
34
|
+
|
|
35
|
+
- name: Build tarball and wheels
|
|
36
|
+
run: |
|
|
37
|
+
git clean -xdf
|
|
38
|
+
git restore -SW .
|
|
39
|
+
python -m build --sdist --wheel .
|
|
40
|
+
- name: Check built artifacts
|
|
41
|
+
run: |
|
|
42
|
+
python -m twine check dist/*
|
|
43
|
+
pwd
|
|
44
|
+
- uses: actions/upload-artifact@v2
|
|
45
|
+
with:
|
|
46
|
+
name: releases
|
|
47
|
+
path: dist
|
|
48
|
+
|
|
49
|
+
test-built-dist:
|
|
50
|
+
needs: build-artifacts
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/setup-python@v2.3.1
|
|
54
|
+
name: Install Python
|
|
55
|
+
with:
|
|
56
|
+
python-version: 3.9
|
|
57
|
+
- uses: actions/download-artifact@v2
|
|
58
|
+
with:
|
|
59
|
+
name: releases
|
|
60
|
+
path: dist
|
|
61
|
+
- name: List contents of built dist
|
|
62
|
+
run: |
|
|
63
|
+
ls -ltrh
|
|
64
|
+
ls -ltrh dist
|
|
65
|
+
- name: Publish package to TestPyPI
|
|
66
|
+
if: github.event_name == 'push'
|
|
67
|
+
uses: pypa/gh-action-pypi-publish@v1.4.2
|
|
68
|
+
with:
|
|
69
|
+
user: __token__
|
|
70
|
+
password: ${{ secrets.TESTPYPI_TOKEN }}
|
|
71
|
+
repository_url: https://test.pypi.org/legacy/
|
|
72
|
+
verbose: true
|
|
73
|
+
|
|
74
|
+
- name: Check uploaded package
|
|
75
|
+
if: github.event_name == 'push'
|
|
76
|
+
run: |
|
|
77
|
+
sleep 3
|
|
78
|
+
python -m pip install --upgrade pip
|
|
79
|
+
python -m pip install --extra-index-url https://test.pypi.org/simple --upgrade xee
|
|
80
|
+
python -c "import xee; print(xee.__version__)"
|
|
81
|
+
upload-to-pypi:
|
|
82
|
+
needs: test-built-dist
|
|
83
|
+
if: github.event_name == 'release'
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/download-artifact@v2
|
|
87
|
+
with:
|
|
88
|
+
name: releases
|
|
89
|
+
path: dist
|
|
90
|
+
- name: Publish package to PyPI
|
|
91
|
+
uses: pypa/gh-action-pypi-publish@v1.4.2
|
|
92
|
+
with:
|
|
93
|
+
user: __token__
|
|
94
|
+
password: ${{ secrets.PYPI_TOKEN }}
|
|
95
|
+
verbose: true
|
xee-0.0.4/.gitignore
ADDED
{xee-0.0.2 → xee-0.0.4}/PKG-INFO
RENAMED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xee
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: A Google Earth Engine extension for Xarray.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Project-URL: Issue Tracking, https://github.com/google/Xee/issues
|
|
5
|
+
Author-email: Google LLC <noreply@google.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/google/xee
|
|
8
|
+
Project-URL: Issues, https://github.com/google/Xee/issues
|
|
10
9
|
Classifier: Development Status :: 4 - Beta
|
|
11
10
|
Classifier: Intended Audience :: Science/Research
|
|
12
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -18,11 +17,12 @@ Classifier: Operating System :: POSIX
|
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
22
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: xarray
|
|
25
|
+
Requires-Dist: xarray[parallel]
|
|
26
26
|
Requires-Dist: earthengine-api>=0.1.374
|
|
27
27
|
Requires-Dist: pyproj
|
|
28
28
|
Requires-Dist: affine
|
|
@@ -121,6 +121,13 @@ ds = xarray.open_mfdataset(['ee://ECMWF/ERA5_LAND/HOURLY', 'ee://NASA/GDDP-CMIP6
|
|
|
121
121
|
engine='ee', crs='EPSG:4326', scale=0.25)
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
+
Open a single Image by passing it to an ImageCollection:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
i = ee.ImageCollection(ee.Image("LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318"))
|
|
128
|
+
ds = xarray.open_dataset(i, engine='ee')
|
|
129
|
+
```
|
|
130
|
+
|
|
124
131
|
See [examples](examples/) or [docs](docs/) for more uses and integrations.
|
|
125
132
|
|
|
126
133
|
## License
|
|
@@ -83,6 +83,13 @@ ds = xarray.open_mfdataset(['ee://ECMWF/ERA5_LAND/HOURLY', 'ee://NASA/GDDP-CMIP6
|
|
|
83
83
|
engine='ee', crs='EPSG:4326', scale=0.25)
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
Open a single Image by passing it to an ImageCollection:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
i = ee.ImageCollection(ee.Image("LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318"))
|
|
90
|
+
ds = xarray.open_dataset(i, engine='ee')
|
|
91
|
+
```
|
|
92
|
+
|
|
86
93
|
See [examples](examples/) or [docs](docs/) for more uses and integrations.
|
|
87
94
|
|
|
88
95
|
## License
|
xee-0.0.4/conftest.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright 2023 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# ==============================================================================
|
|
15
|
+
"""Configure FLAGS with default values for absltest."""
|
|
16
|
+
from absl import app
|
|
17
|
+
|
|
18
|
+
try:
|
|
19
|
+
app.run(lambda argv: None)
|
|
20
|
+
except SystemExit:
|
|
21
|
+
pass
|
xee-0.0.4/docs/Makefile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
xee-0.0.4/docs/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Xee: A Google Earth Engine extension for Xarray
|
|
2
|
+
|
|
3
|
+
Xee is an Xarray extension for Google Earth Engine. It aims to help users view
|
|
4
|
+
Earth Engine's [data catalog](https://developers.google.com/earth-engine/datasets)
|
|
5
|
+
through the lense of arrays.
|
|
6
|
+
|
|
7
|
+
In this documentation, we assume readers have some familiarity with
|
|
8
|
+
[Earth Engine](https://earthengine.google.com/), [Xarray](https://xarray.dev/),
|
|
9
|
+
and Python. Here, we'll dive into core concepts related to the integration
|
|
10
|
+
between these tools.
|
|
11
|
+
|
|
12
|
+
## Contents
|
|
13
|
+
|
|
14
|
+
<!-- TODO(#38): Documentation Plan
|
|
15
|
+
- Why Xee?
|
|
16
|
+
- Core features
|
|
17
|
+
- `open_dataset()`
|
|
18
|
+
- `open_mfdatasets()`
|
|
19
|
+
- Projections & Geometry
|
|
20
|
+
- Xarray slicing & indexing 101
|
|
21
|
+
- Combining ee.ImageCollection and Xarray APIs.
|
|
22
|
+
- Plotting
|
|
23
|
+
- Lazy Evaluation & `load()`
|
|
24
|
+
- Advanced projections
|
|
25
|
+
- Performance tuning: A tale of two chunks
|
|
26
|
+
- Walkthrough: calculating NDVI
|
|
27
|
+
- Integration with Xarray-Beam
|
|
28
|
+
- Integration with ML pipeline clients -->
|
|
29
|
+
|
|
30
|
+
```{toctree}
|
|
31
|
+
:maxdepth: 1
|
|
32
|
+
why-xee.md
|
|
33
|
+
api.md
|
|
34
|
+
```
|
xee-0.0.4/docs/api.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# API docs
|
|
2
|
+
|
|
3
|
+
```{eval-rst}
|
|
4
|
+
.. currentmodule:: xee
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
## Core extension
|
|
8
|
+
|
|
9
|
+
```{eval-rst}
|
|
10
|
+
.. autosummary::
|
|
11
|
+
:toctree: _autosummary
|
|
12
|
+
|
|
13
|
+
EarthEngineBackendEntrypoint
|
|
14
|
+
EarthEngineStore
|
|
15
|
+
EarthEngineBackendArray
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Utility functions
|
|
19
|
+
|
|
20
|
+
```{eval-rst}
|
|
21
|
+
.. autosummary::
|
|
22
|
+
:toctree: _autosummary
|
|
23
|
+
|
|
24
|
+
geometry_to_bounds
|
|
25
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of
|
|
9
|
+
experience, education, socio-economic status, nationality, personal appearance,
|
|
10
|
+
race, religion, or sexual identity and orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or reject
|
|
41
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
42
|
+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
|
43
|
+
contributor for other behaviors that they deem inappropriate, threatening,
|
|
44
|
+
offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
This Code of Conduct also applies outside the project spaces when the Project
|
|
56
|
+
Steward has a reasonable belief that an individual's behavior may have a
|
|
57
|
+
negative impact on the project or its community.
|
|
58
|
+
|
|
59
|
+
## Conflict Resolution
|
|
60
|
+
|
|
61
|
+
We do not believe that all conflict is bad; healthy debate and disagreement
|
|
62
|
+
often yield positive results. However, it is never okay to be disrespectful or
|
|
63
|
+
to engage in behavior that violates the project’s code of conduct.
|
|
64
|
+
|
|
65
|
+
If you see someone violating the code of conduct, you are encouraged to address
|
|
66
|
+
the behavior directly with those involved. Many issues can be resolved quickly
|
|
67
|
+
and easily, and this gives people more control over the outcome of their
|
|
68
|
+
dispute. If you are unable to resolve the matter for any reason, or if the
|
|
69
|
+
behavior is threatening or harassing, report it. We are dedicated to providing
|
|
70
|
+
an environment where participants feel welcome and safe.
|
|
71
|
+
|
|
72
|
+
Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the
|
|
73
|
+
Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to
|
|
74
|
+
receive and address reported violations of the code of conduct. They will then
|
|
75
|
+
work with a committee consisting of representatives from the Open Source
|
|
76
|
+
Programs Office and the Google Open Source Strategy team. If for any reason you
|
|
77
|
+
are uncomfortable reaching out to the Project Steward, please email
|
|
78
|
+
opensource@google.com.
|
|
79
|
+
|
|
80
|
+
We will investigate every complaint, but you may not receive a direct response.
|
|
81
|
+
We will use our discretion in determining when and how to follow up on reported
|
|
82
|
+
incidents, which may range from not taking action to permanent expulsion from
|
|
83
|
+
the project and project-sponsored spaces. We will notify the accused of the
|
|
84
|
+
report and provide them an opportunity to discuss it before any action is taken.
|
|
85
|
+
The identity of the reporter will be omitted from the details of the report
|
|
86
|
+
supplied to the accused. In potentially harmful situations, such as ongoing
|
|
87
|
+
harassment or threats to anyone's safety, we may take action without notice.
|
|
88
|
+
|
|
89
|
+
## Attribution
|
|
90
|
+
|
|
91
|
+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
|
|
92
|
+
available at
|
|
93
|
+
https://www.contributor-covenant.org/version/1/4/code-of-conduct/
|
xee-0.0.4/docs/conf.py
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# This file only contains a selection of the most common options. For a full
|
|
4
|
+
# list see the documentation:
|
|
5
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
6
|
+
|
|
7
|
+
# -- Path setup --------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
10
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
11
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
12
|
+
#
|
|
13
|
+
# import os
|
|
14
|
+
# import sys
|
|
15
|
+
# sys.path.insert(0, os.path.abspath('.'))
|
|
16
|
+
|
|
17
|
+
# Print Python environment info for easier debugging on ReadTheDocs
|
|
18
|
+
|
|
19
|
+
import sys
|
|
20
|
+
import subprocess
|
|
21
|
+
import xee # verify this works
|
|
22
|
+
|
|
23
|
+
print('python exec:', sys.executable)
|
|
24
|
+
print('sys.path:', sys.path)
|
|
25
|
+
print('pip environment:')
|
|
26
|
+
subprocess.run([sys.executable, '-m', 'pip', 'list']) # pylint: disable=subprocess-run-check
|
|
27
|
+
|
|
28
|
+
print(f'xee: {xee.__version__}, {xee.__file__}')
|
|
29
|
+
|
|
30
|
+
# -- Project information -----------------------------------------------------
|
|
31
|
+
|
|
32
|
+
project = 'Xee'
|
|
33
|
+
copyright = '2023, Google LCC' # pylint: disable=redefined-builtin
|
|
34
|
+
author = 'The Xee authors'
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# -- General configuration ---------------------------------------------------
|
|
38
|
+
|
|
39
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
40
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
41
|
+
# ones.
|
|
42
|
+
extensions = [
|
|
43
|
+
'sphinx.ext.autodoc',
|
|
44
|
+
'sphinx.ext.autosummary',
|
|
45
|
+
'sphinx.ext.napoleon',
|
|
46
|
+
'myst_nb',
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
50
|
+
templates_path = ['_templates']
|
|
51
|
+
|
|
52
|
+
# List of patterns, relative to source directory, that match files and
|
|
53
|
+
# directories to ignore when looking for source files.
|
|
54
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
55
|
+
exclude_patterns = ['_build', '_templates', 'Thumbs.db', '.DS_Store']
|
|
56
|
+
|
|
57
|
+
intersphinx_mapping = {
|
|
58
|
+
'xarray': ('https://xarray.pydata.org/en/latest/', None),
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
# -- Options for HTML output -------------------------------------------------
|
|
62
|
+
|
|
63
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
64
|
+
# a list of builtin themes.
|
|
65
|
+
#
|
|
66
|
+
html_theme = 'sphinx_rtd_theme'
|
|
67
|
+
|
|
68
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
69
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
70
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
71
|
+
html_static_path = ['_static']
|
|
72
|
+
|
|
73
|
+
# -- Extension config
|
|
74
|
+
|
|
75
|
+
autosummary_generate = True
|
|
76
|
+
|
|
77
|
+
# https://myst-nb.readthedocs.io/en/latest/use/execute.html
|
|
78
|
+
jupyter_execute_notebooks = 'cache'
|
|
79
|
+
# https://myst-nb.readthedocs.io/en/latest/use/formatting_outputs.html#removing-stdout-and-stderr
|
|
80
|
+
nb_output_stderr = 'remove-warn'
|
|
81
|
+
|
|
82
|
+
# https://stackoverflow.com/a/66295922/809705
|
|
83
|
+
autodoc_typehints = 'description'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# How to Contribute
|
|
2
|
+
|
|
3
|
+
We would love to accept your patches and contributions to this project.
|
|
4
|
+
|
|
5
|
+
## Before you begin
|
|
6
|
+
|
|
7
|
+
### Sign our Contributor License Agreement
|
|
8
|
+
|
|
9
|
+
Contributions to this project must be accompanied by a
|
|
10
|
+
[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
|
|
11
|
+
You (or your employer) retain the copyright to your contribution; this simply
|
|
12
|
+
gives us permission to use and redistribute your contributions as part of the
|
|
13
|
+
project.
|
|
14
|
+
|
|
15
|
+
If you or your current employer have already signed the Google CLA (even if it
|
|
16
|
+
was for a different project), you probably don't need to do it again.
|
|
17
|
+
|
|
18
|
+
Visit <https://cla.developers.google.com/> to see your current agreements or to
|
|
19
|
+
sign a new one.
|
|
20
|
+
|
|
21
|
+
### Review our Community Guidelines
|
|
22
|
+
|
|
23
|
+
This project follows [Google's Open Source Community
|
|
24
|
+
Guidelines](https://opensource.google/conduct/).
|
|
25
|
+
|
|
26
|
+
## Contribution process
|
|
27
|
+
|
|
28
|
+
### Code Reviews
|
|
29
|
+
|
|
30
|
+
All submissions, including submissions by project members, require review. We
|
|
31
|
+
use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
|
|
32
|
+
for this purpose.
|
xee-0.0.4/docs/index.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Xee: A Google Earth Engine extension for Xarray
|
|
2
|
+
|
|
3
|
+
Xee is an Xarray extension for Google Earth Engine. It aims to help users view
|
|
4
|
+
Earth Engine's [data catalog](https://developers.google.com/earth-engine/datasets)
|
|
5
|
+
through the lense of arrays.
|
|
6
|
+
|
|
7
|
+
In this documentation, we assume readers have some familiarity with
|
|
8
|
+
[Earth Engine](https://earthengine.google.com/), [Xarray](https://xarray.dev/),
|
|
9
|
+
and Python. Here, we'll dive into core concepts related to the integration
|
|
10
|
+
between these tools.
|
|
11
|
+
|
|
12
|
+
## Contents
|
|
13
|
+
|
|
14
|
+
<!-- TODO(#38): Documentation Plan
|
|
15
|
+
- Why Xee?
|
|
16
|
+
- Core features
|
|
17
|
+
- `open_dataset()`
|
|
18
|
+
- `open_mfdatasets()`
|
|
19
|
+
- Projections & Geometry
|
|
20
|
+
- Xarray slicing & indexing 101
|
|
21
|
+
- Combining ee.ImageCollection and Xarray APIs.
|
|
22
|
+
- Plotting
|
|
23
|
+
- Lazy Evaluation & `load()`
|
|
24
|
+
- Advanced projections
|
|
25
|
+
- Performance tuning: A tale of two chunks
|
|
26
|
+
- Walkthrough: calculating NDVI
|
|
27
|
+
- Integration with Xarray-Beam
|
|
28
|
+
- Integration with ML pipeline clients -->
|
|
29
|
+
|
|
30
|
+
```{toctree}
|
|
31
|
+
:maxdepth: 1
|
|
32
|
+
why-xee.md
|
|
33
|
+
api.md
|
|
34
|
+
```
|