xcube-dev / xcube-cds

An xcube plugin to generate data cubes from the Climate Data Store (CDS) API
MIT License
3 stars 1 forks source link

Pont 3 api key to constructor #11

Closed pont-us closed 4 years ago

pont-us commented 4 years ago

This PR adds cds_api_url and cds_api_key parameters to the CDSDataOpener and CDSDataStore constructors. Previously, the CDS API URl and key could only be specified via environment variables or a configuration file.

pont-us commented 4 years ago

@TonioF Thanks for the suggestions -- all implemented. I've put the new tests into a new ClientUrlTest class, added docstrings, added setUp and tearDown functions, and done some other refactoring to remove duplication and improve code readability. Existing environment variables are now properly saved and restored.