Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project from token #24

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dfguerrerom
Copy link

To make this package more useful not only for ee service accounts, I have added the following:

  • EARTHENGINE_TOKEN secrets, and make the authentication process optional when there is one or the other
  • When a local user authenticates using earthengine authenticate, there is a way to set a project, you can do it by using eartheingine set_project "project_name", and the value will be stored in the credentials file, I have modified the initialization method so it can get the project from there.
  • I've created a new test when there's a initialization from token

I hope I have gotten your idea with this.

@dfguerrerom dfguerrerom marked this pull request as ready for review February 16, 2024 21:27
@dfguerrerom
Copy link
Author

dfguerrerom commented Feb 16, 2024

@12rambau, I think there's something that doesn't allow to run the workflow jobs

@12rambau
Copy link
Member

that's normal you are a first time contributor on this one. Let authorize it

@12rambau
Copy link
Member

I'll take time to review it on sunday but as it is i think i won't let it fly. The reason why I force users to set the EARTHENGINE_PROJECT variable even when normal credentials are used is that i cannot rely on credentials to access the cloud project name consistently. So if any downstream code needs this variable then your test will only work with personnal token. I reported it in the Google issue tracker and I think it's a major flow of the project implementation: https://issuetracker.google.com/issues/325020447

@dfguerrerom
Copy link
Author

@12rambau, I understand the issue, but what if we set the PROJECT variable as the first option, if the var is not there, we can opt to extract the project_id from the credentials file... if it is set, it will be used for both auths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants