Skip to content

Commit 9f1d030

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 89b6266 + 96168e6 commit 9f1d030

131 files changed

Lines changed: 5221 additions & 4452 deletions

File tree

Some content is hidden

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

.github/workflows/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Workflows
2+
3+
## Authenticating and Initializing Earth Engine in GitHub Actions
4+
5+
The
6+
[publish-to-pypi](https://github.com/google/earthengine-api/blob/master/.github/workflows/publish-to-pypi.yml)
7+
workflow uses the
8+
[google-github-actions/auth](https://github.com/google-github-actions/auth)
9+
GitHub action to authenticate with Google Cloud (see the snippet below).
10+
11+
### Authenticating via Workload Identity Federation
12+
13+
The Earth Engine smoke tests authenticate using workload identity federation.
14+
See
15+
[this guide](https://github.com/google-github-actions/auth?tab=readme-ov-file#workload-identity-federation-through-a-service-account) to
16+
create a workload identity provider and populate the resulting `service_account`
17+
and `workload_identity_provider` in your GitHub repository's Secrets and
18+
Variables settings.
19+
20+
```yml
21+
jobs:
22+
smoke-test:
23+
runs-on: ubuntu-latest
24+
permissions:
25+
id-token: write
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Python
29+
uses: actions/setup-python@v3
30+
with:
31+
python-version: 3.11
32+
- name: Authenticate with Google Cloud
33+
uses: 'google-github-actions/auth@v2'
34+
with:
35+
service_account: ${{ secrets.SERVICE_ACCOUNT }}
36+
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
37+
```
38+
39+
The path to the credentials is stored in the
40+
[`GOOGLE_APPLICATION_CREDENTIALS`](https://cloud.google.com/docs/authentication/application-default-credentials#GAC)
41+
environment variable. To authenticate and initialize Earth Engine using the
42+
credentials, see the snippet below.
43+
44+
```python
45+
import json
46+
import os
47+
48+
from google.auth import identity_pool
49+
50+
scopes = [
51+
"https://www.googleapis.com/auth/cloud-platform",
52+
"https://www.googleapis.com/auth/earthengine",
53+
]
54+
path = os.environ["GOOGLE_APPLICATION_CREDENTIALS"]
55+
info = json.load(open(path))
56+
credentials = identity_pool.Credentials.from_info(info).with_scopes(scopes)
57+
ee.Initialize(credentials, project=credentials.project_number)
58+
```

.github/workflows/ci-tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO(user): Fix or skip tests that fail on GitHub
21
name: ci-tests
32
on: [
43
push,
@@ -15,11 +14,10 @@ jobs:
1514
matrix:
1615
os: [ubuntu-latest]
1716
python-version: [
18-
"3.8",
19-
"3.9",
2017
"3.10",
2118
"3.11",
2219
"3.12",
20+
"3.13",
2321
]
2422
include:
2523
- os: macos-latest

.github/workflows/ci-type-verification.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
pip install pyright
2727
pip install pytype
2828
pip install mypy
29+
pip install pandas-stubs types-geopandas
30+
pip install types-httplib2 types-requests types-tensorflow
31+
pip install pillow
32+
pip install ipython ipykernel
2933
- name: pyright ee type verification
3034
run: |
3135
pyright --verifytypes ee

.github/workflows/publish-to-npm.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77

88
jobs:
99
smoke-test:
10-
if: "!github.event.release.prerelease" # Only run if not a prerelease.
1110
runs-on: ubuntu-latest
1211
permissions:
1312
id-token: write

.github/workflows/publish-to-pypi.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ jobs:
3737
];
3838
path = os.environ["GOOGLE_APPLICATION_CREDENTIALS"];
3939
info = json.load(open(path));
40-
ee.Initialize(identity_pool.Credentials.from_info(info).with_scopes(scopes));
40+
credentials = identity_pool.Credentials.from_info(info).with_scopes(scopes);
41+
ee.Initialize(credentials, project=credentials.project_number);
4142
4243
print(ee.Image("srtm90_v4").getInfo())'
4344
@@ -77,7 +78,7 @@ jobs:
7778
name: releases
7879
path: dist
7980
- name: Publish package to PyPI
80-
uses: pypa/gh-action-pypi-publish@v1.8.13
81+
uses: pypa/gh-action-pypi-publish@v1.13.0
8182
with:
8283
user: __token__
8384
password: ${{ secrets.PYPI_API_TOKEN }}

images/google_earthengine_powered.ai

Lines changed: 0 additions & 1301 deletions
This file was deleted.
-26.5 KB
Binary file not shown.
-11 KB
Binary file not shown.
-8.39 KB
Binary file not shown.

javascript/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@ Visit the [Google Earth Engine NPM installation
22
page](https://developers.google.com/earth-engine/npm_install) for set up
33
instructions, or [download
44
ee_api_js.js](https://github.com/google/earthengine-api/blob/master/javascript/build/ee_api_js.js).
5+
6+
Note that some classes and algorithms are loaded dynamically and are not
7+
included as part of the NPM package or visible in the
8+
[source code](https://github.com/google/earthengine-api/tree/master/javascript/src)
9+
(for example, `ee.Join` and `ee.Reducer`).
10+
For a complete listing of all Earth Engine client classes and methods, refer to
11+
the [API Reference](https://developers.google.com/earth-engine/apidocs).

0 commit comments

Comments
 (0)