rgee
rgee copied to clipboard
Draft method for non-interactive authentication
Per #317 I've modified rgee so that it can work in a non-interactive setting using JSON format Google credentials. This seems to be working, as I've been able to use it in workflows for continuous integration via Github actions (see example here: https://github.com/AdamWilsonLab/emma_envdata ).
This PR is more of a "proof of concept". If you're happy with the general approach, I'll clean it up, fix the merge conflicts, etc. If not, I'm happy to take an alternative approach if you have options you prefer.
Hello @bmaitner, thank you for opening this PR.
I very much appreciate your work on implementing non-interactive authentication using rgee. I have a few suggestions to consider:
- To avoid adding more arguments to the
ee_Initialize
function, I will suggest overloading the existinguser
,drive
, andgcs
parameters like this:
ee_Initialize(
user="/EE_credential_path",
drive="/JSON_token_path",
gcs="/service_account_key_path"
)
- I recommend handling the authentication process within the
ee_Initialize
function itself, rather than adding thedrive_cred_path
argument toee_as_stars
oree_as_sf
. This way, all the necessary authentication steps can be performed in one place. To avoid conflicts and ensure a smooth transition (since the version ofee_Initialize
in this PR is not the one currently used by the latest rgee version, and it seems that some arguments are duplicated, i.e. see user and email). I can start a new PR and work together to make this work!
Please let me know what you think about these suggestions. Once again, thank you for addressing this important topic and your contributions to the project.