Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "extensionHost",
"request": "launch",
"args": [
"--profile-temp",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
Expand Down
32 changes: 20 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# Change Log

## v0.0.1
## v0.2.0

- Initial release
- Provides the "EE Tasks: view" commands (interactive, default, or service account) for a default view of EE tasks:
- New authentication method: sign-in (or out) of an account directly through the extension.
- Breaking changes: selecting a default account/project moved: Instead of being a configuration option, you can now interatively select a default account/project to use (`EE Tasks: set default account`).
- Major [internal changes](https://github.com/lopezvoliver/eetasks/commit/2207a5331388bb69831bd15d54d8b38fa07cacad#comments) to accommodate signed in accounts.

| Id | Type | Description | State | CreateTime | EndTime | BatchEECU |
| --- | --- | --- | --- | --- | --- | --- |
## v0.1.2

- Bug fix [issue #5](https://github.com/gee-community/eetasks/issues/5)
- Internal improvements to `Export.image.to*`
- Completed the skeleton for `ui` and `Chart` so they can be silently ignored in `EE Tasks: run GEE scripts`.

## v0.1.1

- Bug fix [issue #3](https://github.com/gee-community/eetasks/issues/3)

- Provides "EE Tasks: update gcloud accounts list". Only required after using `gcloud` to authenticate additional users. This is done automatically the first time the extension is activated (if `gcloud` is available).

## v0.1.0

Expand All @@ -17,12 +24,13 @@
- Fixed a [bug](https://github.com/gee-community/eetasks/issues/1) that prevented the EndTime and BatchEECU columns to display.
- Renamed the `EE Tasks: update gcloud accounts list` command to `EE Tasks: update available accounts`. This reflects an implementation change that simplifies and groups all accounts (gcloud and "earthengine").

## v0.1.1

- Bug fix [issue #3](https://github.com/gee-community/eetasks/issues/3)
## v0.0.1

## v0.1.2
- Initial release
- Provides the "EE Tasks: view" commands (interactive, default, or service account) for a default view of EE tasks:

- Bug fix [issue #5](https://github.com/gee-community/eetasks/issues/5)
- Internal improvements to `Export.image.to*`
- Completed the skeleton for `ui` and `Chart` so they can be silently ignored in `EE Tasks: run GEE scripts`.
| Id | Type | Description | State | CreateTime | EndTime | BatchEECU |
| --- | --- | --- | --- | --- | --- | --- |

- Provides "EE Tasks: update gcloud accounts list". Only required after using `gcloud` to authenticate additional users. This is done automatically the first time the extension is activated (if `gcloud` is available).
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,47 @@ Open a table view of Earth Engine tasks for a user or service account.

Run GEE code from within vscode! Learn more about what is [currently supported here](https://github.com/gee-community/eetasks/blob/main/docs/runGEEscripts.md).

### EE Tasks: update available accounts

Use this command if you expect to use this extension for [multiple accounts](#multi-account-views). The command is run automatically upon first use of either the [view tasks](#ee-tasks-view) or [run gee script](#ee-tasks-run-gee-script) commands.

## Requirements

A [Google Earth Engine account](https://code.earthengine.google.com/register) is required to use the Earth Engine Tasks Manager extension. Additionally, either the [Earth Engine command line tool](https://developers.google.com/earth-engine/guides/command_line) (eecli) or the Earth Engine [python client library](https://developers.google.com/earth-engine/guides/python_install) must have been used to authenticate an account. If you are familiar with the [gcloud cli](https://cloud.google.com/sdk/docs/install) and have already [authenticated](https://cloud.google.com/sdk/gcloud/reference/auth/login) an earth engine account, you can also use `gcloud` to authenticate the Earth Engine library for this extension.
A [Google Earth Engine account](https://code.earthengine.google.com/register) is required to use the Earth Engine Tasks Manager extension.

### Sign in options

Use the `EE Tasks: sign in` command to add an account to use with the EE Tasks extension.

### Multi-account views
You might already have an account ready to use with the extension (no sign-in required) if you are a user of the Earth Engine [python client library](https://developers.google.com/earth-engine/guides/python_install) or the [Earth Engine command line tool](https://developers.google.com/earth-engine/guides/command_line) (eecli). Use the `EE Tasks: update available accounts` to make these accounts available to the extension. This command will run automatically upon first use of either the [view tasks](#ee-tasks-view) or [run gee script](#ee-tasks-run-gee-script) commands, if there are no signed-in accounts yet.

## Multi-account views

![eetasks-multi](https://raw.githubusercontent.com/gee-community/eetasks/main/docs/assets/eetasks-multi.png)

Multiple panels may be opened to view the tasks for different accounts.

#### Interactive account selection

The available user accounts are populated using the [EE Tasks: update available accounts](#ee-tasks-update-available-accounts) command at any time. This command is automatically called upon the first time you run either the [EE Tasks: view tasks](#ee-tasks-view-tasks) or the [EE Tasks: run GEE script](#ee-tasks-run-gee-script) commads.
### Interactive account selection

![eetasks-users](https://raw.githubusercontent.com/gee-community/eetasks/main/docs/assets/eetasks-users.png)

The `earthengine` account refers to the credentials stored and managed by the earthengine Python API. The EE Tasks extension will not modify these credentials.
If there are at least two accounts available to the extension, you will be prompted to select an account when using either the `EE Tasks: view tasks` or `EE Tasks: run GEE script`.

The `application-default` account refers to the
[application default credentials](https://cloud.google.com/sdk/gcloud/reference/auth/application-default) in `gcloud`.
Accounts signed-in through the extension (`EE Tasks: sign in`) show with a 👤 icon next to them.

The other accounts shown (if any) are managed by the `gcloud cli` (as well as the earthengine cli through `gcloud`). You can use `gcloud auth login` to add an additional user, and `gcloud auth list` to display the accounts. If you update the credentialed accounts with `gcloud`, update them in the extension by using the [EE Tasks: update available accounts](#ee-tasks-update-available-accounts).
> You can remove a signed-in account with `EE Tasks: sign out`.

When selecting an account other than `earthengine`, you will also be prompted to specify a project to use.
Other available accounts are updated with the `EE Tasks: update available accounts`.

#### Default account
The 🐍 `earthengine` account refers to the credentials stored and managed by the earthengine Python API. The EE Tasks extension will not modify these credentials.

![eetasks-default](https://raw.githubusercontent.com/gee-community/eetasks/main/docs/assets/eetasks-default.png)
You might also have [gcloud](https://cloud.google.com/sdk/docs/install) installed if you use the [Earth Engine command line tool](https://developers.google.com/earth-engine/guides/command_line) (the python API client also uses `gcloud` in some environments). The `application-default` account refers to the
[application default credentials](https://cloud.google.com/sdk/gcloud/reference/auth/application-default) used by gcloud.

You may also specify a default account and project to use with the `EE tasks: view tasks (default account)`. You may specify any of the available accounts.
Other `gcloud` accounts shown (if any) are accounts that have been authenticated using `gcloud auth login` (you can use `gcloud auth list` to display these accounts). If the account has already been signed-in through the extension, it will not be repeated under `gcloud`.

If the project is left blank and the account is not `earthengine`, you will be prompted for it. If the account is blank, you will prompted for it. Specifying an account that is not any of the available accounts will not work.
When using the `EE tasks: run GEE script` command, you will also be prompted for a [project](https://developers.google.com/earth-engine/cloud/projects).

#### Default account

The `EE Tasks: view tasks (default account)` can be used to open a tasks panel view without having to select the account. You can set the default account to use with the `EE Tasks: set default account`. This is only useful if there is more than one account available to the extension.

#### Service account (advanced use)

Expand All @@ -65,11 +70,6 @@ This extension contributes the following settings:

* `eetasks.limit`: Maximum number of tasks to request from earthengine. This value is set by default to null (blank), which means that there is no limit to the number of tasks to retrieve.

* `eetasks.defaultProject`: The default earthengine project to use with the `EE Tasks: view tasks (default account)` command.

* `eetasks.defaultAccount`: The default earthengine account to use with the `EE Tasks: view tasks (default account)` command.


## Known Issues

- The tasks tables do not refresh automatically. However, you can use the refresh button (🔄) to update the table on demand.
Expand Down
Binary file removed docs/assets/eetasks-default.png
Binary file not shown.
Binary file modified docs/assets/eetasks-users.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions media/auth.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*---------------------------------------------------------------------------------------------
Adapted from the github-authentication extension*
https://github.com/microsoft/vscode/blob/main/extensions/github-authentication/media

* Copyright (c) Microsoft Corporation, see:
https://github.com/microsoft/vscode/blob/main/LICENSE.txt

TODO: customize
*--------------------------------------------------------------------------------------------*/

html {
height: 100%;
}

body {
box-sizing: border-box;
min-height: 100%;
margin: 0;
padding: 15px 30px;
display: flex;
flex-direction: column;
color: white;
font-family: "Segoe UI","Helvetica Neue","Helvetica",Arial,sans-serif;
background-color: #2C2C32;
}

.branding {
background-size: 24px;
background-repeat: no-repeat;
background-position: left center;
padding-left: 0px;
font-size: 20px;
letter-spacing: -0.04rem;
font-weight: 400;
color: white;
text-decoration: none;
}

.message-container {
flex-grow: 1;
display: flex;
align-items: center;
justify-content: center;
margin: 0 30px;
}

.message {
font-weight: 300;
font-size: 1.4rem;
}

body.error .message {
display: none;
}

body.error .error-message {
display: block;
}

.error-message {
display: none;
font-weight: 300;
font-size: 1.3rem;
}

.error-text {
color: red;
font-size: 1rem;
}

@font-face {
font-family: 'Segoe UI';
src: url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.eot"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.eot?#iefix") format("embedded-opentype");
src: local("Segoe UI Light"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff2") format("woff2"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff") format("woff"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf") format("truetype"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.svg#web") format("svg");
font-weight: 200
}

@font-face {
font-family: 'Segoe UI';
src: url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.eot"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.eot?#iefix") format("embedded-opentype");
src: local("Segoe UI Semilight"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.woff2") format("woff2"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.woff") format("woff"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.ttf") format("truetype"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.svg#web") format("svg");
font-weight: 300
}

@font-face {
font-family: 'Segoe UI';
src: url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.eot"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.eot?#iefix") format("embedded-opentype");
src: local("Segoe UI"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.woff2") format("woff"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.woff") format("woff"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.ttf") format("truetype"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.svg#web") format("svg");
font-weight: 400
}

@font-face {
font-family: 'Segoe UI';
src: url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.eot"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.eot?#iefix") format("embedded-opentype");
src: local("Segoe UI Semibold"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.woff2") format("woff"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.woff") format("woff"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.ttf") format("truetype"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.svg#web") format("svg");
font-weight: 600
}

@font-face {
font-family: 'Segoe UI';
src: url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.eot"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.eot?#iefix") format("embedded-opentype");
src: local("Segoe UI Bold"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.woff2") format("woff"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.woff") format("woff"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.ttf") format("truetype"),url("https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.svg#web") format("svg");
font-weight: 700
}
44 changes: 44 additions & 0 deletions media/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!--
Adapted from the github-authentication extension*
https://github.com/microsoft/vscode/blob/main/extensions/github-authentication/media

* Copyright (c) Microsoft Corporation, see:
https://github.com/microsoft/vscode/blob/main/LICENSE.txt
-->
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<title>Google Earth Engine Authentication - Sign In</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="auth.css" />
<link rel="shortcut icon" href="#" type="image/x-icon">
</head>

<body>
<a class="branding" href="https://github.com/gee-community/eetasks">
Earth Engine Task Manager vscode extension
</a>
<div class="message-container">
<div class="message">
You are signed in now and can close this page.
</div>
<div class="error-message">
An error occurred while signing in:
<div class="error-text"></div>
</div>
</div>
<script>
var search = window.location.search;
var error = (/[?&^]error=([^&]+)/.exec(search) || [])[1];
if (error) {
document.querySelector('.error-text')
.textContent = decodeURIComponent(error);
document.querySelector('body')
.classList.add('error');
}
</script>
</body>

</html>
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "eetasks.signin",
"title": "EE Tasks: sign in"
},
{
"command": "eetasks.signout",
"title": "EE Tasks: sign out"
},
{
"command": "eetasks.setDefault",
"title": "EE Tasks: set default account"
},
{
"command": "eetasks.run",
"title": "EE Tasks: run GEE script"
Expand Down Expand Up @@ -54,18 +66,6 @@
"default": null,
"description": "Maximum number of tasks to return. Defaults to null (no limit).",
"order": 1
},
"eetasks.defaultProject": {
"type": "string",
"markdownDescription": "Default earthengine project to use. If left empty, the user will be prompted for it (except if `#eetasks.defaultAccount#` is \"earthengine\")",
"default": "",
"order": 2
},
"eetasks.defaultAccount": {
"type": "string",
"markdownDescription": "Default account to use. Set to `earthengine` to load the persistent credentials managed by the earthengine python client. Otherwise it must be an account authorized by gcloud (see [gcloud auth list](https://cloud.google.com/sdk/gcloud/reference/auth/list)), or \"application-default\". If left empty, the user will be prompted to choose an account.",
"default": "earthengine",
"order": 3
}
}
}
Expand Down
Loading