Closed malmans2 closed 4 months ago
Thanks for reporting this issue. The cds source authentication will be extended to match cdsapi.
This issue has been fixed in develop
. Please let me know if it works as expected .
Yes, it works as expected now. Thanks!
@sandorkertesz could you please let us know when you're planning to release this fix? It looks like there's been a few releases since this issue was closed. Thanks!
@malmans2 , 0.7.0 containing this fix is planned to be released today or tomorrow
@malmans2 0.7.0 with this feature has been released: https://earthkit-data.readthedocs.io/en/latest/release_notes/version_0.7_updates.html. Please note that some of the Python dependencies (e.g. cdsapi
) became optional. See the details here: https://earthkit-data.readthedocs.io/en/latest/install.html
Great, thanks. We'll give it a go when it's released on conda-forge as well.
What happened?
I'm encountering various issues:
earthkit
is not consistent withcdsapi
beacuse it does not use the environment variables"CDSAPI_{RC,KEY,URL}"
. Looks like users are expected to either store the credentials in~/.cdsapirc
or use the prompt.~/.cdsapirc
is missing, the prompt functionality fails using ipython (see snippet below)~/.cdsapirc
and I set the CDSAPI env vars, I'm able to skip the prompt andcdsapi
uses the env vars. I'm achieving what I need, but it looks like a bug because~/.cdsapirc
is mandatory but not used.In summary, I think earthkit-data should either define its own authentication rules or use cdsapi rules, whereas right now there's a mix of the two. Allowing only
~/.cdsapirc
would be a problem for our project because many users are working on a shared VM, so they need to be able to store their credentials in different files.Side note: the cds source requires the package
markdown
because it's imported at top-level. However, as far as I can tell that library is only needed for the prompt messages, so it might be easier to import it within the relevant method.What are the steps to reproduce the bug?
Version
0.5.1
Platform (OS and architecture)
Darwin MacBook-Pro-3.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/RELEASE_X86_64 x86_64
Relevant log output
Accompanying data
No response
Organisation
B-Open / CADS-EQC