Skip to content

Commit

Permalink
v0.1.368
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 562013832
  • Loading branch information
Google Earth Engine Authors authored and bengalin committed Sep 7, 2023
1 parent 7aa25b2 commit cada813
Show file tree
Hide file tree
Showing 101 changed files with 714 additions and 601 deletions.
2 changes: 1 addition & 1 deletion demos/export-to-drive/appengine_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Loads third-party Python libraries.
`appengine_config.py` is automatically loaded when Google App Engine
Expand Down
2 changes: 1 addition & 1 deletion demos/export-to-drive/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Required credentials configuration."""

# See instructions in the README.md file for how to fill these in.
Expand Down
2 changes: 1 addition & 1 deletion demos/export-to-drive/drive.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Helpers for interfacing with Google Drive."""

import googleapiclient.discovery
Expand Down
2 changes: 1 addition & 1 deletion demos/export-to-drive/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Web server for the export-to-Google-Drive EE demo application.
The code in this file runs on App Engine. It's called when the user loads the
Expand Down
2 changes: 1 addition & 1 deletion demos/interactive-classifier/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Handles Earth Engine service account configuration."""

import ee
Expand Down
2 changes: 1 addition & 1 deletion demos/interactive-classifier/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""An example application that allows interactive classification training."""

import json
Expand Down
2 changes: 1 addition & 1 deletion demos/server-auth-python/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""An example config.py file."""

import ee
Expand Down
2 changes: 1 addition & 1 deletion demos/server-auth-python/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""A simple example of connecting to Earth Engine using App Engine."""


Expand Down
2 changes: 1 addition & 1 deletion demos/trendy-lights/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Required credentials configuration."""


Expand Down
2 changes: 1 addition & 1 deletion demos/trendy-lights/server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Web server for the Trendy Lights application.
The overall architecture looks like:
Expand Down
2 changes: 1 addition & 1 deletion demos/wmts/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Handle the routing for the application."""

import collections
Expand Down
2 changes: 1 addition & 1 deletion demos/wmts/appengine_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""App Engine config file, used for dependency management for the proxy."""
# appengine_config.py
from google.appengine.ext import vendor
Expand Down
2 changes: 1 addition & 1 deletion demos/wmts/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""Configuration constants."""

import os
Expand Down
475 changes: 237 additions & 238 deletions javascript/build/ee_api_js.js

Large diffs are not rendered by default.

227 changes: 132 additions & 95 deletions javascript/build/ee_api_js_debug.js

Large diffs are not rendered by default.

235 changes: 136 additions & 99 deletions javascript/build/ee_api_js_npm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@google/earthengine",
"version": "0.1.367",
"version": "0.1.368",
"description": "JavaScript client for Google Earth Engine API.",
"author": "Google LLC",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion javascript/src/apiclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const {PromiseRequestService} = goog.require('eeapiclient.promise_request_servic
/** @namespace */
const apiclient = {};

const API_CLIENT_VERSION = '0.1.367';
const API_CLIENT_VERSION = '0.1.368';

exports.VERSION = apiVersion.VERSION;
exports.API_CLIENT_VERSION = API_CLIENT_VERSION;
Expand Down
35 changes: 10 additions & 25 deletions javascript/src/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,38 +81,23 @@ class ExportTask {
googAsserts.assert(
this.config_, 'Task config must be specified for tasks to be started.');

this.id = this.id || data.newTaskId(1)[0];
googAsserts.assertString(this.id, 'Failed to obtain task ID.');

// Synchronous task start.
if (!opt_success) {
this.id = this.id || data.newTaskId(1)[0];
googAsserts.assertString(this.id, 'Failed to obtain task ID.');
data.startProcessing(this.id, this.config_);
const response = data.startProcessing(this.id, this.config_);
this.id = response.taskId ?? null;
return;
}

// Asynchronous task start.
const startProcessing = () => {
googAsserts.assertString(this.id);
data.startProcessing(this.id, this.config_, (_, error) => {
if (error) {
opt_error(error);
} else {
opt_success();
}
});
};

if (this.id) {
startProcessing();
return;
}

data.newTaskId(1, (ids) => {
const id = ids && ids[0];
if (id) {
this.id = id;
startProcessing();
data.startProcessing(this.id, this.config_, (response, error) => {
if (error) {
opt_error(error);
} else {
opt_error('Failed to obtain task ID.');
this.id = response.taskId ?? null;
opt_success();
}
});
}
Expand Down
Loading

0 comments on commit cada813

Please sign in to comment.